Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For some reasons on my Ubuntu 11.04 Natty running Linux 2.6.38-13, with an Italian layout for the keyboard, the keystrokes AltFx switch between virtual consoles (instead of the normal CtrlAltFx keys).

What could I change to avoid that?

I tried adding

Section "Serverflags"
Option "DontVTSwitch" "on"
EndSection

Section "InputClass"
     Identifier "keyboard defaults"
     MatchIsKeyboard "on"
     Option "XKbOptions" "srvrkeys:none"
EndSection

to the /etc/X11/xorg.conf file but to no avail. Is there an xmodmap setting that I could use?

share|improve this question
    
You want to completely disable the switch to ttys or to disable that particular keys combinations and use the usual ones? –  enzotib Mar 18 '12 at 22:19
    
Thanks for considering the question. I really don't case, any solution would be fine. –  giorgio Mar 19 '12 at 17:00
add comment

1 Answer 1

man xmodmap:

 EXPRESSION GRAMMAR
 keycode NUMBER = KEYSYMNAME ...<br>

 The list of keysyms is assigned to the indicated keycode (which may 
 be specified in decimal, hex or octal and can be determined by 
 running the xev program). Up to eight keysyms may be attached to a 
 key, however the last four are not used in any major X server 
 implementation. The first keysym is used when no modifier key 
 is pressed in conjunction with this key, the second with Shift, 
 the third when the Mode_switch key is used with this key and the 
 fourth when both the Mode_switch and Shift keys are used.

According to the arch wiki the fields are used like so:

  1. Key
  2. Shift+Key
  3. mode_switch+Key
  4. mode_switch+Shift+Key
  5. AltGr+Key
  6. AltGr+Shift+Key

However, when I run xmodmap -pke I get that the seventh field is assigned to switching the between VTs:

keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1

This will vary depending on which types your current layout is configured with. Do get the default, try running:

setxkbmap -v -types complete it
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of types
         Using command line, ignoring rules file
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+it+inet(evdev)
geometry:   pc(pc104)


It may also be the case that your window manager or desktop environment (kde, gnome) steals those keys and switches between VTs like you say.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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