I am using an software which has a TUI and I would like to use it on a virtual terminal. The software uses Alt+ and Alt+ shortkeys to do perform some tasks. So I need to either disable, or change the predefined behaviour of those key combination on my linux machine (which currently switches between virtual terminals and X session)

So how can I change Alt+ shortkey ?


Assuming Linux (not FreeBSD...).

This should disable the special features on Alt+Left or Alt+Right, leaving only Alt+Fn keys working to change console. It should be run on a console and requires root to load a new keymap:

dumpkeys > backup-keymap
dumpkeys | sed 's/Decr_Console/Left/g;s/Incr_Console/Right/g' | loadkeys

To revert, use loadkeys < backup-keymap, or restart some system keyboard configuration tool.

I don't know how to integrate this correctly at boot in a keymap. It might depend on Distribution (and if using systemd ...)

The file /etc/console-setup/remap.inc on Debian might give more clues on how to properly override the keyboard instead of those low level commands, on Debian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.