Bug 378178

Summary: Kate ignores some xkb keys associated with the right alt key
Product: [Applications] kate Reporter: Jakub Macháček <jakub.machacek>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: christoph, justin.zobel, simgunz
Priority: NOR    
Version First Reported In: 16.04   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: xkb definition file for modified Programmer Dvorak layout

Description Jakub Macháček 2017-03-27 21:00:35 UTC
Created attachment 104767 [details]
xkb definition file for modified Programmer Dvorak layout

Kate ignores some xkb keys associated with the right alt key. I have attached an example of a custom keyboard that doesn't work properly in Kate. Kate ignores all the following:
Left, Right, Up, Down, BackSpace, Home, End, nobreakspace (and probably a lot more)

According to https://bugreports.qt.io/browse/QTBUG-36565 this used to be an issue in Qt but it should now be fixed. As stated by Igor Kushnir, this is probably a bug in Kate. A clear explanation on why it is not working can be found here: https://superuser.com/questions/801611/how-to-make-all-applications-respect-my-modified-xkb-layout/844673 .

I have spent considerable amount of time searching for suitable workarounds but none worked with the right alt key.

This bug is not present in Kate 3.13.3 but it is present in 16.04.3. I'm not sure about other versions.

The bug is extremely annoying, considering you have to move your right hand away from its standard position just to move the cursor. I tried to create my own keyboard shortcuts to fix the problem but Kate doesn't accept any combination that includes the right alt key (it's just ignored).
Comment 1 Christoph Cullmann 2019-07-14 12:12:53 UTC
*** Bug 409457 has been marked as a duplicate of this bug. ***
Comment 2 Simone Gaiarin 2019-07-18 08:43:33 UTC
I have noticed that my custom xkb configuration works in vi input mode (besides the key combination that I mapped to backspace) while it does not in normal mode.

In the function of KTextEditor called KateNormalInputMode::keyPress there is a comment regarding a quick hack, could it cause the problem?

This is my guess given that in KateViInputMode::keyPress there is different code.

If I find the time I can test this further.


XKB CUSTOM CONFIGURATION:

keycode 66 = Mode_switch
keysym h = h H Left Left ugrave Ugrave
keysym l = l L Right Right
keysym k = k K Up Up
keysym j = j J Down Down
keysym u = u U Prior Prior
keysym i = i I Home Home
keysym o = o O End End
keysym p = p P Next Next
keysym period = period greater Delete Delete oacute Oacute
keysym comma = comma less BackSpace BackSpace ograve Ograve
Comment 3 Justin Zobel 2020-11-13 03:38:11 UTC
Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 4 Simone Gaiarin 2020-11-13 06:24:49 UTC
Still occurring.
Comment 5 Christoph Cullmann 2023-08-05 16:14:08 UTC

*** This bug has been marked as a duplicate of bug 388138 ***