Joined: 11 Dec 2015
|Posted: Fri Dec 11, 2015 1:19 am Post subject: X keyboard shortcut issue (VT switching & zap)
|I'm having what seems to be a moderately common problem -- VT switching via "Ctrl+Alt+F(N)", where F(N) is e.g. F1, F2, ..., isn't working in X, and nor is "Ctrl+Alt+Backspace". By 'not working', I mean that there's no perceivable change in state when I press those keys. From 'the internet', I see others having a problem of switching to blank VTs, but that's not the case here; I just remain on the X display. I've dredged through many posts & articles but nothing I've tried has helped so far. A few bits of system information and the things I've fiddled with:
* Fresh gentoo installation, up-to-date as of 2015-12-11. x86_64, -multilib
* proprietary nvidia driver, GTX 970 card.
* installed X & xterm
* UK keyboard
* Starting X simply by typing "startx" after logging into a tty as root, or a non-root user (behaviour is the same in both cases)
* In my xinitrc I set:
setxkbmap -layout gb
setxkbmap -option "terminate:ctrl_alt_bksp"
[Interestingly, if I omit the second of these lines, the ctrl+alt+backspace behaviour is different -- a 'y umlaut' character appears in the xterm. If the line is there then no character at all appears]
* In my xorg.conf ServerFlags I've tried various permutations of "DontZap", "DontVTSwitch" and "HandleSpecialKeys" either being "off", or not having the line at all.
* Also, if it's useful, I can use "chvt" to switch to other ttys from X, though only when logged in as root. When in they tty I can use Alt + F(N) / arrow keys to switch terminals as normal, and I find the X server on TTY 7. This makes me think it isn't a graphics driver issue, since it is *possible* to access the terminals, but for some reason the keyboard shortcut is being gobbled. Same with the zap command.
* Looking at output of xev confirms that each of Ctrl, Alt, Backspace & F(N) keys are mapped as they ought to be. xmodmap shows Backspace mapping to Terminate_Server, and F(N) keys mapping to XF86Switch_VT_(N) -- these appear in the last column of xmodmap -pke. [[Is that column location significant?]]
Does anyone have any ideas of where I can look next to debug please? Maybe some more verbose logging is possible, to see whether the keyboard shortcuts are indeed getting registered somewhere? Thanks very much!