[Development] Qt/XCB applications and deadkeys (which cease working) (way to reproduce)

René J. V. Bertin rjvbertin at gmail.com
Fri Jun 9 23:13:25 CEST 2017


Thiago Macieira wrote:

>> AltGr. This is with a US-international layout so it requires AltGr to
>> trigger the deadkey accents.
> 
> I know what it is (I have it too, so I can get æ and ø). I was asking about
> where the KeyPress for it is. Neither your nor René's paste showed it.
> 

Did it? That was an oversight then:

KeyPress event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884486, (142,95), root:(1328,147),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884592, (142,95), root:(1328,147),
    state 0x80, keycode 26 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884752, (142,95), root:(1328,147),
    state 0x80, keycode 26 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884808, (142,95), root:(1328,147),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884957, (142,95), root:(1328,147),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XmbLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: True

KeyPress event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136884957, (142,95), root:(1328,147),
    state 0x0, keycode 0 (keysym 0xe9, eacute), same_screen YES,
    XKeysymToKeycode returns keycode: 11
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 a9) "é"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x5400001,
    root 0xf6, subw 0x0, time 136885057, (142,95), root:(1328,147),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

The keypress also shows up in qev:

QKeyEvent(ShortcutOverride, Key_AltGr, GroupSwitchModifier) 
QKeyEvent(KeyPress, Key_AltGr, GroupSwitchModifier) 
QKeyEvent(KeyRelease, Key_Dead_Acute, GroupSwitchModifier) 
QKeyEvent(KeyRelease, Key_AltGr) 
QInputMethodEvent(, commit="U+e9") 
QInputMethodQueryEvent(queries=0x1, {}) 
QInputMethodQueryEvent(queries=0x2, {}) 
QInputMethodQueryEvent(queries=0x1, {}) 
QInputMethodQueryEvent(queries=0x2, {}) 
QInputMethodQueryEvent(queries=0x1, {}) 
QInputMethodQueryEvent(queries=0x2, {}) 
QInputMethodQueryEvent(queries=0x1, {}) 
QInputMethodQueryEvent(queries=0x2, {}) 
QKeyEvent(KeyRelease, Key_E, text="e") 


Something curious, when I let xev snoop the events from my wheeltest 
demonstrator, certain events appear to be inverted (release shows before the 
press):

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137048790, (68,42), root:(73,89),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137059575, (68,42), root:(73,89),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137059575, (68,42), root:(73,89),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

PropertyNotify event, serial 22, synthetic NO, window 0x5400026,
    atom 0x15f (_NET_WM_USER_TIME), time 137059578, state PropertyNewValue

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137059760, (68,42), root:(73,89),
    state 0x80, keycode 26 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XFilterEvent returns: False

KeyPress event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137059760, (68,42), root:(73,89),
    state 0x80, keycode 26 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

PropertyNotify event, serial 22, synthetic NO, window 0x5400026,
    atom 0x15f (_NET_WM_USER_TIME), time 137059762, state PropertyNewValue

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137059946, (68,42), root:(73,89),
    state 0x80, keycode 26 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XFilterEvent returns: False

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137060176, (68,42), root:(73,89),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137061031, (68,42), root:(73,89),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

KeyPress event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137061031, (68,42), root:(73,89),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XmbLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: True

KeyPress event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137061031, (68,42), root:(73,89),
    state 0x0, keycode 0 (keysym 0xe9, eacute), same_screen YES,
    XKeysymToKeycode returns keycode: 11
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 a9) "é"
    XFilterEvent returns: False

PropertyNotify event, serial 22, synthetic NO, window 0x5400026,
    atom 0x15f (_NET_WM_USER_TIME), time 137061033, state PropertyNewValue

KeyRelease event, serial 22, synthetic NO, window 0x5400026,
    root 0xf6, subw 0x0, time 137061162, (68,42), root:(73,89),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False


R.




More information about the Development mailing list