Easy shift / ctrl / AltGr ... hack on xf86-input-evdev
Posted: 2011-06-25 06:19
Edit May 2023:
Use "interception-tools" (in debian) and its plugin "Dual Function Keys" to replace my hack. The latter is not packaged by Debian (yet), so get it from the upstream. Another plugin "interception-caps2esc" is provided by Debian, so learn from it how to build.
Hi. This hack, at-home-modifier (or ahm for short) provides for example "space/shift dual role key". When you press the space key alone, it's a space; but when you press it with another key, it's a shift. Any pairs of keys are possible. This means your hands stay almost always at their home positions.
It's a fork of Xorg "evdev" driver (= xf86-input-evdev, or in debian xserver-xorg-input-evdev).
* README tells the detail.
* homepage. You can get the source tarball and git access instruction.
News for 2.10.6 (Mar 2020)
* Kernel >= 5.4 bug workaround. This bug was fixed in the kernels 5.6, 5.5.14 and 5.4.29.
* Merges the upstream 2.10.6.
Installation
I'm not a debian user. Please help yourself. The post below by Yuri Khan may help. His Ubuntu PPA is not maintained any more.
Old, manual installation guide. (Kept here for record, but links are dead.)
The strategy is: Rip the source package debian/ directory from the squeeze version, fix it, and apply to my source.
1. Download the upstream source tarball, get my fork patch, and prepare debian/{rules,changelog}.
2. Do some apt-get:
$ cd somewhere-to-run-debuild
$ apt-get build-dep xserver-xorg-input-evdev
$ apt-get apt-get source xserver-xorg-input-evdev
3. Extract files, apply the patch, and build
$ cd at-home-modifier
$ cp -r ../xserver-xorg-input-evdev-<x.y.z>/debian ./
$ patch -p1 < ahm-<x.y.z>.patch
$ debuild
$ dpkg -i <generated deb file>
Notice
When you upgrade the xorg-server, you have to rebuild this hack, too, or your keyboards and mice won't work! More precisely, for xorg-server-x.y.z, a change in z doesn't affect, but x or y does. (In debian, it seems to be called xserver-xorg-core-2:x.y.z-rel.)
Configuration
Modify 80-ahm.conf in the package, and put it under /etc/X11/xorg.conf.d/. Config options are described in README. (Make sure the evdev driver is used. Today the default keyboard driver is libinput.)
FAQ
Q: Can I input Shift+Space if my Space is Space/Shift dual-role key?
A: Turn both of your Space and Shift into Space/Shift keys.
If you know how it can be automated with git-buildpackage, please tell me.
Contact
Read README.
Notice
Probably I don't develop any more this hack as a fork of xf86-input-evdev. It's better to do all in user space, rather than as an X driver.
With best regards.
Use "interception-tools" (in debian) and its plugin "Dual Function Keys" to replace my hack. The latter is not packaged by Debian (yet), so get it from the upstream. Another plugin "interception-caps2esc" is provided by Debian, so learn from it how to build.
Hi. This hack, at-home-modifier (or ahm for short) provides for example "space/shift dual role key". When you press the space key alone, it's a space; but when you press it with another key, it's a shift. Any pairs of keys are possible. This means your hands stay almost always at their home positions.
It's a fork of Xorg "evdev" driver (= xf86-input-evdev, or in debian xserver-xorg-input-evdev).
* README tells the detail.
* homepage. You can get the source tarball and git access instruction.
News for 2.10.6 (Mar 2020)
* Kernel >= 5.4 bug workaround. This bug was fixed in the kernels 5.6, 5.5.14 and 5.4.29.
* Merges the upstream 2.10.6.
Installation
I'm not a debian user. Please help yourself. The post below by Yuri Khan may help. His Ubuntu PPA is not maintained any more.
Old, manual installation guide. (Kept here for record, but links are dead.)
The strategy is: Rip the source package debian/ directory from the squeeze version, fix it, and apply to my source.
1. Download the upstream source tarball, get my fork patch, and prepare debian/{rules,changelog}.
2. Do some apt-get:
$ cd somewhere-to-run-debuild
$ apt-get build-dep xserver-xorg-input-evdev
$ apt-get apt-get source xserver-xorg-input-evdev
3. Extract files, apply the patch, and build
$ cd at-home-modifier
$ cp -r ../xserver-xorg-input-evdev-<x.y.z>/debian ./
$ patch -p1 < ahm-<x.y.z>.patch
$ debuild
$ dpkg -i <generated deb file>
Notice
When you upgrade the xorg-server, you have to rebuild this hack, too, or your keyboards and mice won't work! More precisely, for xorg-server-x.y.z, a change in z doesn't affect, but x or y does. (In debian, it seems to be called xserver-xorg-core-2:x.y.z-rel.)
Configuration
Modify 80-ahm.conf in the package, and put it under /etc/X11/xorg.conf.d/. Config options are described in README. (Make sure the evdev driver is used. Today the default keyboard driver is libinput.)
FAQ
Q: Can I input Shift+Space if my Space is Space/Shift dual-role key?
A: Turn both of your Space and Shift into Space/Shift keys.
If you know how it can be automated with git-buildpackage, please tell me.
Contact
Read README.
Notice
Probably I don't develop any more this hack as a fork of xf86-input-evdev. It's better to do all in user space, rather than as an X driver.
With best regards.