Closed planet36 closed 3 years ago
I found a solution using xmodmap, xcape, sxhkd, and xte.
(in .xinitrc)
# Look for unused KeyCodes
#xmodmap -pk
# Map F13 to an unused KeyCode
xmodmap -e 'keycode 253 = F13'
xcape -e 'Shift_L=F13'
(in .config/sxhkd/sxhkdrc)
@F13
xte 'mouseclick 1' 'mouseclick 1'
I want to map a momentary press of the Shift key to a mouse left click (or double click).
Is this possible with xcape?
In /usr/include/X11/keysymdef.h I found these definitions:
Trying to use any of those results in an error.
$ xcape -d -t 500 -e 'Shift_L=Pointer_Button_Dflt'
$ xcape -d -t 500 -e 'Shift_L=Pointer_Button1'
$ xcape -d -t 500 -e 'Shift_L=Pointer_DblClick_Dflt'
$ xcape -d -t 500 -e 'Shift_L=Pointer_DblClick1'