Skip to content

Enhance modifier-only shortcuts

Yifan Zhu requested to merge work/fanzhuyifan/meta into master

Trigger modifier-only shortcuts trigger on release, and support multi-key modifier-only shortcuts, which trigger only when all the modifiers are released within some interval.

BUG: 464805 BUG: 470256

globalshortcutsregistry: treat super as meta

This conversion already exists in KKeySequenceRecorder. (see https://invent.kde.org/frameworks/kguiaddons/-/blob/master/src/recorder/kkeysequencerecorder.cpp?ref_type=heads#L359)

BUG: 481173

add API for listening to mouse events

This is needed so that Modifier+Click/Scroll does not trigger modifier-only shortcuts.

plugins/xcb: correctly handle modifier-only shortcuts

use XRecord to get XCB_KEY_PRESS, XCB_KEY_RELEASE, XCB_BUTTON_PRESS events. This is needed to correctly handle modifier-only shortcuts, so they don't trigger on Mod+Click, or Mod+Key; release Key; release Mod. Handle the events in XRecord, and don't handle them in nativeEventFilter.

Don't grab modifier-only shortcuts, so clients still get the modifier keys.

The commits won't be squashed unless marked "squash with..."

@teams/qa @teams/usability

Depends on frameworks/kguiaddons!115 (merged) and kwin!5251 (merged) and frameworks/kwindowsystem!148 (merged)

cc @apol because he implemented support for push-to-talk.

Edited by Yifan Zhu

Merge request reports