diff options
Diffstat (limited to 'labsrv01/alt-arrow-vt.nix')
| -rw-r--r-- | labsrv01/alt-arrow-vt.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/labsrv01/alt-arrow-vt.nix b/labsrv01/alt-arrow-vt.nix new file mode 100644 index 0000000..d0dbb90 --- /dev/null +++ b/labsrv01/alt-arrow-vt.nix @@ -0,0 +1,29 @@ +{ + pkgs, + ... +}: +{ + # Disable Alt+Left/Right virtual terminal switching + console.keyMap = "us"; + + # Create systemd service to disable only Alt+Arrow VT switching + systemd.services.disable-alt-arrow-vt = { + description = "Disable Alt+Arrow VT switching"; + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-vconsole-setup.service" ]; + script = '' + # Define string sequences for Alt+Arrow that generate proper terminal escape sequences + cat << 'EOF' | ${pkgs.kbd}/bin/loadkeys + string F200 = "\033[1;3D" + string F201 = "\033[1;3C" + alt keycode 105 = F200 + alt keycode 106 = F201 + EOF + ''; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + }; + +} |
