https://bugs.kde.org/show_bug.cgi?id=510697

--- Comment #2 from [email protected] ---
I have a fix (thanks to Claude, I have little clue about C++ or Qt), but it is
probably not the correct approach. But mitigates the issue for myself and I’ll
upload the patch as an attachment shortly.

Cause: the filter action has a bare Qt::Key_Backslash shortcut. A modifier
press is a separate key event. It arrives before the modified key and has no
text. The text field does not claim it, so Qt runs shortcut matching on it. If
the keysym is not Latin-1, QXkbCommon::possibleKeyCombinations also tries the
Latin-1keysym of that keycode in the other layouts. Neo2 right Mod3
(ISO_Level3_Shift) is on the keycode that gives backslash in US. The Mod3 press
alone matches the shortcut, so the filter opens before the underscore arrives.

Fix: KFileWidget installs an event filter on itself. The filter accepts a
QEvent::ShortcutOverride if key() is a modifier key, a dead key, Key_Multi_key,
0 or Key_unknown. Tested on my Arch machine with KIO 6.30.0.

Limits: this is a workaround with a hand-written key list. The veto only
applies when the focus is inside the KFileWidget. The correct fix is in Qt:
skip the Latin fallback for modifier keysyms.

Why Dolphin is not affected: its filter bar uses Ctrl+I and Qt::Key_Slash, and
no Neo2 modifier is on a keycode that gives slash in another layout. 

There seems to be no general KDE-side solution: every bare printable-key
shortcut has the same fallback.

This change was drafted and tested with Claude Fable 5.1 via Claude Code and
reviewed by me.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to