I recently upgraded to the latest version of Ubuntu (11.04) on my PC. I'm using the default Confity interface.
I have an application (Emacs) which uses many keyboard shortcuts of the form Ctrl-Alt-Fn or Ctrl-Alt-Shift-Fn.
I have managed to insert this Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
into my /etc/X11/xorg.conf
It partly works: Ctrl-Alt-Fn (with or without shift) no longer invokes virtual terminal n.
But, the Ctrl-Alt-Fn keystrokes don't get fed through to the applications.
An easy way to see this is to go to System Settings => Keyboard Shortcuts and try and define a new shortcut. For example, I can define any one of F5, Shift-F5, Alt-F5, Ctrl-F5, Shift-F5, Ctrl-Shift-F5, Alt-Shift-F5, but not Ctrl-Alt-F5 or Ctrl-Alt-Shift-F5. When I type one of the last two, it just sits there as if I did nothing at all.
I've seen many discussions on the web about disabling Ctrl-Alt-Fn keys, and explanations about DontVTSwitch, but I haven't seen anyone confirm that DontVTSwitch actually passes the desired keystrokes through to their application. Is this a known bug?
Relevant quote from http://www.x.org/archive/X11R6.8.0/doc/xorg.conf.5.html :
Option "DontVTSwitch" "boolean" This disallows the use of the Ctrl+Alt+Fn sequence (where Fn refers to one of the numbered function keys). That sequence is normally used to switch to another "virtual terminal" on operating systems that have this feature. When this option is enabled, that key sequence has no special meaning and is passed to clients. Default: off
Side note: if I really really want to invoke a non-X terminal (for some reason), I can use Alt-SysReq-r etc. I don't want to disable the virtual terminals. I just want to disable how X handles those key combinations, so I can have them in my application.
Bookmarks