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

--- Comment #7 from zvova7...@gmail.com ---
Guys, how about this:

>> I have suggestion about how it also can be done on wayland(and maybe x11) 
>> session. It is just like MacOS behavior. If you are press
>> Meta+Space(assuming this is us shortcut for layout switch), you switch 1st 
>> -> 2nd layout. Then if in second switch you release Meta key and
>> build combination again by pressing Meta+Space - you switch back 2nd -> 1st. 
>> If you are don't release Meta key and continue pressing
>> Space you going by simple circle switch as usually.

I have take a look into shortcut code processor in kwin, found
src/keyboard_layout.cpp source, but this shortcut is rely to "Alternative
shortcut". Advanced tab is in another place and works way difference. Mentioned
source has dbus interface KeyboardLayoutDBusInterface, I think advanced tab
shortcut must use this interface to centralize switch logic.
keyboard_layout.cpp has switchToNextLayout and switchToPreviousLayout switching
methods, how about to add some "switchToPreferLayout" and add
KeyboardLayout::keyEvent(KeyEvent *event) override to track "Meta" key or any
key that represents in shortcut as first key in sequence? But if sequence
include just one key(caps for example) this won't work, and we are going to the
simple circle switch.

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

Reply via email to