Bug 357062 - Dead keys do not work correctly in vi input mode
Summary: Dead keys do not work correctly in vi input mode
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: 5.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 332935 388138 396376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-22 18:14 UTC by Matthijs
Modified: 2023-08-12 15:05 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This fixes the issue for me (2.11 KB, patch)
2015-12-22 18:15 UTC, Matthijs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthijs 2015-12-22 18:14:05 UTC
My keyboard setting (Us-intl, with dead keys) uses the dead keys (so for example: ') to compose characters like ', é, ë, ", etc.

The vi input mode does not work with correctly with this: the characters appear, but repeating an insert using . does not insert those characters, skipping them. Additionally, the characters appear even if they were typed in normal mode (which should ignore them).

I traced the cause of the problem, and it appears that different events are send for composed keys (QInputMethodEvent instead of QKeyEvent), and that code just inserts the characters, without passing them to the input mode code.

(I also sent an e-mail to the mailing list, but did not receive a reply, so I made this bug report)

Reproducible: Always

Steps to Reproduce:
1. Use a keyboard layout with dead keys
2. Type a character like é in vi mode (e.g. "café")
3. Repeat the insertion, by using .

Actual Results:  
The é is not present in the repeated insertion (so "caf" appears)

Expected Results:  
It should have shown "café"

My kate version is 15.12 (which I couldn't choose in the version box)
Comment 1 Matthijs 2015-12-22 18:15:25 UTC
Created attachment 96266 [details]
This fixes the issue for me

This patch solves the issue for me, but might introduce bugs, since I do not know the code very well.
Comment 2 Ansa 2019-07-14 07:05:33 UTC
This is possibly a duplicate of https://bugs.kde.org/show_bug.cgi?id=332935
Comment 3 Christoph Cullmann 2021-06-12 19:12:05 UTC
*** Bug 332935 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2021-06-12 19:12:17 UTC
*** Bug 396376 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Cullmann 2023-08-05 16:51:41 UTC

*** This bug has been marked as a duplicate of bug 388138 ***
Comment 6 Christoph Cullmann 2023-08-05 22:29:20 UTC
Keep the bug with the patch.
Comment 7 Christoph Cullmann 2023-08-05 22:29:28 UTC
*** Bug 388138 has been marked as a duplicate of this bug. ***
Comment 8 Bug Janitor Service 2023-08-06 15:02:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/588
Comment 9 Christoph Cullmann 2023-08-06 15:02:44 UTC
I tried to adapt the patch but I need someone to test if that now works in vi mode and still in the normal mode.
Comment 10 Christoph Cullmann 2023-08-12 15:05:31 UTC
Git commit 52a0a3bb228aba16c04e625e97e0cf071c323495 by Christoph Cullmann.
Committed on 12/08/2023 at 17:00.
Pushed by cullmann into branch 'master'.

support composed keys in vi mode

M  +3    -1    src/view/kateviewinternal.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/52a0a3bb228aba16c04e625e97e0cf071c323495