diff options
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()]) } } } |