aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-10-26 10:10:31 +0100
committerMartin Fischer <martin@push-f.com>2026-10-26 16:49:21 +0100
commit9095b46c60fee21123d3146255ac2222de52e2e5 (patch)
treee1dcd44bc8355793b986be01c06a074505174e5c /nixos
parente1db0d1b5380704b833c2b15c4d36f405a9b5b79 (diff)
feat(hamac): remap TrackPoint buttons to prev/next tab
Diffstat (limited to 'nixos')
-rw-r--r--nixos/hosts/hamac/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/hosts/hamac/default.nix b/nixos/hosts/hamac/default.nix
index b5c473e..0d2cdc3 100644
--- a/nixos/hosts/hamac/default.nix
+++ b/nixos/hosts/hamac/default.nix
@@ -30,6 +30,29 @@ in
ServerName ev
'';
+ # Remap the physical TrackPoint buttons to make them usable in keybindings.
+ services.evremap = {
+ enable = true;
+ settings = {
+ device_name = "TPPS/2 Elan TrackPoint";
+ phys = "isa0060/serio1/input0";
+ # I would use F13/F14 as the output but Firefox does not support remapping the
+ # prev/next tab shortcuts (https://bugzilla.mozilla.org/show_bug.cgi?id=2012210).
+ # So I just use the Firefox shortcuts as outputs.
+ # Left Alt gets remapped to Ctrl by XKB's ctrl(swap_lalt_lctl).
+ remap = [
+ {
+ input = ["BTN_LEFT"];
+ output = ["KEY_LEFTALT" "KEY_LEFTSHIFT" "KEY_TAB"];
+ }
+ {
+ input = ["BTN_RIGHT"];
+ output = ["KEY_LEFTALT" "KEY_TAB"];
+ }
+ ];
+ };
+ };
+
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave