mmodif - Magic Modifier Keyboard
License: GPLv3 or later
This program overlays modifier keys on ordinary keys.
By using this, Space key can be used as Shift key in addition to ordinary Space key function.
That is, holding Space key and typing other key make the Space key work as Shift key.
On the other hand, just typing Space key make the Space key work as ordinary Space key.
Similarly, F/J keys work as Control key, V/M keys work as Alt key,
in addition to corresponding ordinary key function.
Table 1
[Key] [Overlay]
Space : Shift
F : Control
J : Control
V : Alt
M : Alt
F/J key can be used as Control key in addition to ordinary F/J key function.
V/M key can be used as Alt key in addition to ordinary V/M key function.
Currently, this program is for Linux only since it is implemented by using evdev and uinput.
Usually, to run this program, root privilege is required
since it accesses to /dev/input/eventX and /dev/uinput .
Use sudo command to run with root privilege.
If you want to run this program without root privilege,
follow the subsequent procedure.
----------------------------------------------------------------
On Linux systems without systemd such as Devuan
----------------------------------------------------------------
Add your user (username: $username) to 'input' group:
usermod -a -G input $username
Create new system group named 'uinput':
groupadd -r uinput
And add your user to uinput group:
usermod -a -G uinput $username
Create a file named /etc/udev/rules.d/99-uinput.rules whose content is:
KERNEL=="uinput", SUBSYSTEM=="misc", GROUP="uinput", MODE="0660"
Add a line to /etc/modules :
uinput
Reboot the system (or use more smart method):
reboot
----------------------------------------------------------------
On Linux systems with systemd such as Debian
----------------------------------------------------------------
Add your user (username: $username) to input group:
usermod -a -G input $username
Create a file named /etc/udev/rules.d/99-uinput.rules whose content is:
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"
Reboot the system (or use more smart method):
reboot
----------------------------------------------------------------
Compilation
To compile mmodif, gcc and make are required.
make
Usage
./mmodif
Automatically find a keyboard with 32 or more keys.
./mmodif /dev/input/eventX
Associate mmodif pseudo device to /dev/input/eventX .
Options
-v, --verbose
show actual input device
-d, --delay=DELAY
set key repeat delay to DELAY milliseconds
Example
./mmodif --delay=1000
Automatically find a keyboard and make it mmodif powered,
setting key repeat delay to 1000 ms.
It may be helpful to set longer repeat delay by --delay option
in order to avoid unintended ordinary key input by holding magic modifier keys long.
When you have some trouble, unplug your USB keyboard and mmodif will die.
You may find it useful to use evtest and evemu-tools to find which event device is your keyboard.
https://cgit.freedesktop.org/evtest/
https://www.freedesktop.org/wiki/Evemu/
This program's event filtering part is based on:
evtest - https://cgit.freedesktop.org/evtest/
Getting Started with uinput - http://thiemonge.org/getting-started-with-uinput
Description
Languages
C
94.8%
Makefile
5.2%