summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKj Tsanaktsidis <kjtsanaktsidis@groq.com>2025-09-12 19:40:51 +1000
committerKj Tsanaktsidis <kjtsanaktsidis@groq.com>2025-09-12 19:40:51 +1000
commita8c14387285310407796fbf45dc490bf7534d173 (patch)
treeeac782be2c04fab75fdb813c113fdafe3bb5292a
parente7c38fc0e3f1d444468fa817c5a61b40575c7138 (diff)
disable vt switching
-rw-r--r--kj-laptop01/configuration.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/kj-laptop01/configuration.nix b/kj-laptop01/configuration.nix
index ce0891b..3ea33f9 100644
--- a/kj-laptop01/configuration.nix
+++ b/kj-laptop01/configuration.nix
@@ -108,4 +108,29 @@
# Enable zsh system-wide
programs.zsh.enable = true;
+
+ # Disable Alt+Left/Right virtual terminal switching
+ console.keyMap = "us";
+ environment.etc."vconsole.conf".text = ''
+ KEYMAP=us
+ '';
+
+ # Create custom keymap that disables Alt+Arrow VT switching
+ environment.etc."kbd/keymaps/disable-vt-switch.map".text = ''
+ alt keycode 105 = noop
+ alt keycode 106 = noop
+ '';
+
+ systemd.services.disable-vt-switching = {
+ description = "Disable VT switching on Alt+Arrow keys";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "systemd-vconsole-setup.service" ];
+ script = ''
+ ${pkgs.kbd}/bin/loadkeys /etc/kbd/keymaps/disable-vt-switch.map
+ '';
+ serviceConfig = {
+ Type = "oneshot";
+ RemainAfterExit = true;
+ };
+ };
}