How to set a toggle keybinding in Awesome's rc.lua
0
votes
1
answer
315
views
I'm running AwesomeWM on top of Ubuntu 20.04. I'd like to set a shortcut to disable the trackpad. My computer comes with built-in functionality to do that, but I'd like to change it from what it currently is.
The current keybinding is set to F10. I've determined via
xmodmap
that the keycode is 76, and that the functionality of the button (based on my understanding of xmodmap
) is XF86Switch_VT_10
(or, more specifically, F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10
, even though that seems insane and I don't know why it's like that).
I've discovered that the way to toggle the trackpad from the command line is via xinput set-prop "Device Enabled" 0
. So I know that I need to create some fuction in the rc.lua
that looks something along the lines of awful.key({}, "", function() awful.util.spawn("") end
. I just don't know precisely what to put there.
Can someone please help me out on this?
Asked by Yehuda
(331 rep)
Nov 11, 2020, 11:41 PM
Last activity: Jan 15, 2021, 01:33 PM
Last activity: Jan 15, 2021, 01:33 PM