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-30 18:02:24 +0100
commitfb900b9eb8966bd0786ac9d4aacb30367ac53f95 (patch)
tree8b31d80d8352b902a80c7e18f0e251b37a999574 /nixos
parent0a34e444cc5156b799ad57c6efac8b25a8046ad7 (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