diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-04-13 17:27:46 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-04-13 17:34:40 +0000 |
commit | af348ed95a09eb7b811bb00254dc695b6955ae95 (patch) | |
tree | 467226a675d6975fb0163ee791b3bb68bf8eb61a /modules/workstation/hardware | |
parent | 077b545ed655a81d0a6a9f88ab994371b7178da0 (diff) | |
download | nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar.gz nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar.bz2 nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar.lz nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar.xz nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.tar.zst nixlib-af348ed95a09eb7b811bb00254dc695b6955ae95.zip |
modules/hardware: use tab as super key
Diffstat (limited to 'modules/workstation/hardware')
-rw-r--r-- | modules/workstation/hardware/MAPPINGS | 7 | ||||
-rw-r--r-- | modules/workstation/hardware/default.nix | 5 | ||||
-rw-r--r-- | modules/workstation/hardware/events.dyon | 4 |
3 files changed, 15 insertions, 1 deletions
diff --git a/modules/workstation/hardware/MAPPINGS b/modules/workstation/hardware/MAPPINGS new file mode 100644 index 000000000000..60ded39c8cf1 --- /dev/null +++ b/modules/workstation/hardware/MAPPINGS @@ -0,0 +1,7 @@ +Key remappings are spread across several different places, because they +have to be done differently depending on the remapping. + +Here is an overview of remapped keys: + +Caps Lock: Escape if pressed, Ctrl if held +Tab: Super-L if pressed, Tab if held diff --git a/modules/workstation/hardware/default.nix b/modules/workstation/hardware/default.nix index bd5bd9ce12e8..18b43e6dc4f3 100644 --- a/modules/workstation/hardware/default.nix +++ b/modules/workstation/hardware/default.nix @@ -14,4 +14,9 @@ in services.evscript.enable = true; services.evscript.script = ./events.dyon; + + boot.postBootCommands = '' + # Remap tab to left super + /run/current-system/sw/bin/setkeycodes 0f 125 + ''; } diff --git a/modules/workstation/hardware/events.dyon b/modules/workstation/hardware/events.dyon index 2d8c8bfa87df..96cc15450e46 100644 --- a/modules/workstation/hardware/events.dyon +++ b/modules/workstation/hardware/events.dyon @@ -1,12 +1,14 @@ //! [events] -//! keys = ['ESC'] +//! keys = ['ESC', 'TAB'] fn main() ~ evdevs, uinput { should_esc := false + should_tab := false loop { evts := next_events(evdevs) for i { evt := evts[i] xcape(mut should_esc, evt, KEY_CAPSLOCK(), [KEY_ESC()]) + xcape(mut should_tab, evt, KEY_LEFTMETA(), [KEY_TAB()]) } } } |