How to trigger an action on double-tap of a keyboard button?

5

I'd like to learn how to trigger something in my debian box on double-tap of a key (let's say l-shift). My setup is X11 based. Should I look into doing in my MW (xmonad) or on a lower level? Forgive my ignorance, but I'm used to windows and the wonderful autohotkey. Why? To remap ctrl to capslock, and have capslock on double-tap of l-shift.

97-109-107

Posted 2013-01-13T20:54:02.190

Reputation: 63

Answers

2

The action of double-tapping would ideally be program-independent and should thus be implemented at a lower level than user programs or even window managers (which you don't want grabbing all keypresses to check for double-tapping).

The correct place to implement a feature like this would be in the X keyboard extensions. It could detect double tapping and let the user configure the keyname associated with it. Unfortunately, XKB does not yet support the action of double-tapping. You can do other cool things though, like remapping keys with xmodmap or even writing novel keyboard layouts (have look at the files in /usr/share/X11/xkb/symbols)

hedgie

Posted 2013-01-13T20:54:02.190

Reputation: 486