I'm trying to imitate the setup I had on OS X (via Karabiner): Pressing the left Shift on its own key inserts a left (, but holding it down and pressing another key acts as a normal Shift key (and similarly with the right Shift & right )). Is this possible with xkb?
Asked
Active
Viewed 622 times
1 Answers
2
One way is to use xcape.
xcape [-d] [-t timeout] [-e map-expression]
This should do the trick:
xcape -e 'Shift_L=parenleft;Shift_R=parenright'
xcape is included as a package for some distributions.
Notes:
It has a default delay of 500ms after which the mapped key will not be emitted. It can be set by the -t
option.
Each map-expression run as a daemon and has it's own PID.
keyup-LShift
event and inserts a(
if no other key pressed. – kba Feb 16 '16 at 22:42xcape -e 'Shift_L=parenleft'
andxcape -e 'Shift_R=parenright'
, but not sure it meets your needs / restrictions etc. – Runium Feb 16 '16 at 23:22xcape -e 'Shift_L=parenleft;Shift_R=parenright'
... – Runium Feb 16 '16 at 23:41