[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Since chvt works, the problem must be the keymap



On Mon, Apr 30, 2007 at 00:26:12 +0100, David Claughton wrote:
> Florian Kulzer wrote:
>> It would be interesting to see which keycodes and keysyms are reported
>> if you run "xev", press (and hold) both CTRL and ALT, and then press F1,
>> F2, etc. Does xev really display the keycodes for the Fn keys and the
>> keysyms "XF86_Switch_VT_n"? Are the hexadecimal keysym values the same
>> as the ones that you get with "grep VT /usr/share/X11/XKeysymDB"?
>
> As another "sufferer" of this problem I thought I would give this a try
> - I get ...
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
>     root 0x3e, subw 0x0, time 1066810844, (622,696), root:(630,759),
>     state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
>     XLookupString gives 0 bytes:
>     XmbLookupString gives 0 bytes:
>     XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
>     root 0x3e, subw 0x0, time 1066810861, (622,696), root:(630,759),
>     state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
>     XLookupString gives 0 bytes:
>     XmbLookupString gives 0 bytes:
>     XFilterEvent returns: False
>
> KeyPress event, serial 29, synthetic NO, window 0x2600001,
>     root 0x3e, subw 0x0, time 1066815357, (622,696), root:(630,759),
>     state 0x1c, keycode 67 (keysym 0xffbe, F1), same_screen YES,
>     XLookupString gives 0 bytes:
>     XmbLookupString gives 0 bytes:
>     XFilterEvent returns: False

I think that is part of the problem: Even though you hold down CTRL and
ALT before you press F1, you still get the normal "F1" keysymbol and not
the "XF86_Switch_VT_1" one. If I run "xev" and press the three keys then
I never see the KeyPress event for F1 because X switches to the
terminal. If, on the other hand, I disable VT switching in my xorg.conf
then I still do not get any event for F1 if I press it while CTRL + ALT
are held down. Something within X obviously intercepts these events and
processes them or deletes them from the event queue, depending on the
settings in xorg.conf.

[ snip: we see the expected three KeyRelease events ]

> And "grep VT /usr/share/X11/XKeysymDB" returns :
>
> XF86_Switch_VT_1        :1008FE01

[...]

I have the same here.

> Does this tell anyone anything?

Check what is assigned to keycode 67. I see this:

$ xmodmap -pk | egrep '^[ ]+67 '
     67         0xffbe (F1)     0x1008fe01 (XF86_Switch_VT_1)

If your output looks different then you can try if

xmodmap -e 'keycode  67 = F1 XF86_Switch_VT_1'

restores the VT switching.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |



Reply to: