The following invocation of the X11 setxkbmap
command disables Ctrl-Alt-Fn console/virtual terminal switching:
setxkbmap -option srvrkeys:none
To return to the previous behavior of the ctrl-alt-Fn keys, and also remove all other options, such as caps:ctrl_modifier
:
setxkbmap -option ''
To print the current settings invoke setxkbmap -print
.
To invoke per user, put the command in the ~/.xinitrc file.
To invoke when an Xsession starts, create a file in
/etc/X11/Xsession.d
such as
/etc/X11/Xsession.d/65srvrkeys-none
containing the above setxkbmap
command, and make it executable with sudo chmod +x /etc/X11/Xsession.d/65srvrkeys-none
.
For more information type man setxkbmap
at your shell prompt or see the Xorg setxkbmap man page.
I tested this with KDE on Ubuntu 14.04 LTS (Trusty). These settings are also available in System Settings > Input Devices > Keyboard > Advanced. If you change srvrkeys
in the GUI Settings, it shows up immediately in setxkbmap
and vice versa.
I prefer to modify the X window system via the X11 command line interfaces. If that does not work, then I attempt the desktop environment. As a last resort I would modify system configuration files. Implementations and file formats change, but command line interfaces live almost forever in the Unix/Linux tradition.