Bug 410181 - when using an xmodmap, some key-combinations never reach the active application
Summary: when using an xmodmap, some key-combinations never reach the active application
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: libinput (show other bugs)
Version: 5.12.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-25 08:35 UTC by Arne Babenhauserheide
Modified: 2020-04-21 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
crie.xmodmap (14.32 KB, text/plain)
2019-07-25 08:35 UTC, Arne Babenhauserheide
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2019-07-25 08:35:58 UTC
Created attachment 121712 [details]
crie.xmodmap

SUMMARY

When I switch to a different keyboard layout with xmodmap, the CTRL-x key combination does not reach the applications.

Curiously the blinking cursor reacts to the keystroke by restarting the blinking.

STEPS TO REPRODUCE
1. switch to alternate keyboard layout with `setxkbmap de -option ctrl:nocaps; xmodmap path/to/crie.xmodmap` — take the xmodmap from the attachment.
2. Select some text.
3. On a German keyboard type CTRL-y, on a US keyboard type CTRL-z (this is mapped to CTRL-x in the xmodmap)
4. Observe that the text is not cut.
5. Switch back to your regular keyboard layout with `setxkbmap de -option ctrl:nocaps` (replace de by your locale)

OBSERVED RESULT

CTRL-x does not reach the text field, the text is not cut, but the cursor restarts blinking.

EXPECTED RESULT

CTRL-x reaches the text field and cuts the text.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 18.04, Kernel: 4.15.0-52-generic
(available in About System)
KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5

ADDITIONAL INFORMATION

This is a long-standing bug and I’ve been using a workaround for years in Emacs (use CTRL-SHIFT-x — this does not work in the browser, though). I also observed this in Gentoo GNU/Linux with a customized setup, so this is not from the distribution.

It might be connected to the switch to XCB with Qt5 (yes, the bug already exists for that long).
Comment 1 Arne Babenhauserheide 2019-07-25 08:46:19 UTC
This might be connected to https://bugs.kde.org/show_bug.cgi?id=310881
Comment 2 Arne Babenhauserheide 2019-07-25 08:50:10 UTC
xev info:

CTRL-c (which works):

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399383802, (116,-374), root:(3655,648),
    state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399384026, (116,-374), root:(3655,648),
    state 0x4, keycode 38 (keysym 0x63, c), same_screen YES,
    XLookupString gives 1 bytes: (03) ""
    XmbLookupString gives 1 bytes: (03) ""
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399384146, (116,-374), root:(3655,648),
    state 0x4, keycode 38 (keysym 0x63, c), same_screen YES,
    XLookupString gives 1 bytes: (03) ""
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399386210, (116,-374), root:(3655,648),
    state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False


CTRL-x (which does not work)

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399386883, (116,-374), root:(3655,648),
    state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 40, synthetic NO, window 0x8600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x8600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  54  0   0   0   0   0   16  0   4   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399387532, (116,-374), root:(3655,648),
    state 0x4, keycode 52 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (18) "▒"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399388844, (116,-374), root:(3655,648),
    state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False


CTRL-SHIFT-x (which does work):

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399489172, (-913,-277), root:(2626,745),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399489172, (-913,-277), root:(2626,745),
    state 0x1, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399490068, (-913,-277), root:(2626,745),
    state 0x5, keycode 52 (keysym 0x58, X), same_screen YES,
    XLookupString gives 1 bytes: (18) "▒"
    XmbLookupString gives 1 bytes: (18) "▒"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399490212, (-913,-277), root:(2626,745),
    state 0x5, keycode 52 (keysym 0x58, X), same_screen YES,
    XLookupString gives 1 bytes: (18) "▒"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399491852, (-913,-277), root:(2626,745),
    state 0x5, keycode 50 (keysym 0xffe6, Shift_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x8600001,
    root 0x236, subw 0x0, time 2399491876, (-913,-277), root:(2626,745),
    state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Comment 3 Martin Flöser 2019-07-25 12:34:47 UTC
KWin (and no KDE software) is responsible for xmodmap handling. Please report to the appropriate place where the incorrect handling occurs.
Comment 4 Arne Babenhauserheide 2019-07-25 14:59:58 UTC
Do you mean "is not responsible"?

Where is the appropriate place?

I filed it here because I now have a secondary workspace with Gnome and I do not see this happening there — with the same applications.
Comment 5 Arne Babenhauserheide 2020-04-21 12:17:18 UTC
This works in recent versions of Gnome, but it is still broken in KDE.