5

I am using Archlinux.

For ergonomic reasons I am looking for a possibility to use xkb to map holding the space bar to the CTRL modifier and pressing and releasing the space bar to insert a " ".

So typing SPC + x would be cutting marked text. But typing SPC would insert the " " character.

Is it possible to do this with xkb? Do I have to use some different tool?

  • xmodmap can make the spacebar into a Ctrl key but then the spacebar would not work as a space character. Probably the best you can achieve is to have a combination (e.g. <spacebar> + M should be ergonomic on a qwerty keyboard) to produce the space character. The Ctrl function is quite special. – grochmal Aug 27 '16 at 15:53

1 Answers1

5

The software xcape can do that.

$ apt-cache search xcape
xcape - Configure modifier keys to act as other keys when pressed and released

With the keyword xcape you'll find how-tos for most desires

  • xcape is awesome, it runs as a daemon and (therefore) has -t (for timeout) which xmodmap (plain xkb) does not. Just note that OP is on Arch Linux, so he needs to go through the xcape build from AUR with makepkg and pacman. – grochmal Aug 27 '16 at 16:54