Summary: | Nothing happens when I press the keyboard shortcut of Keyboard Layout applet by the first time | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Patrick Silva <bugseforuns> |
Component: | Keyboard Layout | Assignee: | Andrey <butirsky> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | butirsky, doggoofspeed, Dr, nate, notmart, sephiroth_pk, zrenfire |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Neon | ||
OS: | Linux | ||
URL: | https://zren.github.io/2018/11/25/hiding-plasma-widget-global-shortcut-tab | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=438460 https://bugs.kde.org/show_bug.cgi?id=457273 |
||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/commit/098a965b5df31a7b6a212b5269eecb36b9dadc6c | Version Fixed In: | 5.26 |
Sentry Crash Report: | |||
Attachments: | screenshot |
Currently the shortcut is not handled in any special way, so that behavior lead from standard plasmoid's handling. Intended common behavior is to activate the applet - the same as you do clicking it. In the screenshot we see the applet starts behave as it have Compact Mode, but is wasn't designed to have one. So it seems some weird side effects from Plasma side. Not sure what we can do in the applet itself. keyboard shortcuts work consistently with all applets I have tried (sound, notifications, battery, vautls, disks & devices). Yes, that's because they all have Compact Representation probably UPSTREAM is not logical status here. Andrey is correct that the intended means of changing the layout is in the keyboard KCM, but Patrick is also right that assigning a shortcut to the applet itself is buggy and should work properly. It's a valid concern. I notice that assigning a shortcut to the Night Color applet also behaves oddly, and it also has no popup, same as the Keyboard Layout applet. One of the possible solutions Nate suggested is to get rid of that shortcut's setting altogether. Because it's useless anyway. Still, I don't know if it possible. To be clear, we can remove the keyboard shortcut for activating the applet itself because there are already existing global keyboard shortcuts for switching keyboard layouts. So there is no need to have two methods to set different shortcuts to do the exact same thing. Some links I got form the community, thanks driglu4it: Hiding Plasma Widget Global Shortcut Tab: https://zren.github.io/2018/11/25/hiding-plasma-widget-global-shortcut-tab https://github.com/Zren/plasma-applet-tiledmenu/blob/master/package/contents/ui/config/ConfigGeneral.qml *** Bug 438460 has been marked as a duplicate of this bug. *** The widget shows the full representation only from the system tray (from the panel it works as it should). *** Bug 451993 has been marked as a duplicate of this bug. *** To prevent the assignment of a third-party shortcut, you can remove the remove tab from the widget settings. Put this in the root element of the widget settings page (configGeneral.qml - formLayout): function getTopItem(item) { var curItem = item while (curItem.parent) { curItem = curItem.parent } return curItem } function hideKeyboardShortcutTab() { var appletConfiguration appletConfiguration = getTopItem(app) if (typeof appletConfiguration !== "undefined" && typeof appletConfiguration.globalConfigModel !== "undefined") { appletConfiguration.globalConfigModel.removeCategoryAt(0) } } Component.onCompleted: { hideKeyboardShortcutTab() } Or we can override the action of the shortcut to activate the plasmoid so that it switches the layout without opening the full widget representation. Keep in mind that I recently had to refactor the hide keyboard shortcut code as the AppletConfiguration is no longer the top root item in Plasma 5.24 * https://github.com/Zren/plasma-applet-tiledmenu/blame/master/package/contents/ui/config/ConfigGeneral.qml#L21 * https://github.com/Zren/plasma-applet-tiledmenu/commit/ea15d8a2f141f0676b9608815a20707f0070b503 Thanks you for let us know, Chris (In reply to Chris Holland from comment #13) > * > https://github.com/Zren/plasma-applet-tiledmenu/blame/master/package/ > contents/ui/config/ConfigGeneral.qml#L21 > * > https://github.com/Zren/plasma-applet-tiledmenu/commit/ > ea15d8a2f141f0676b9608815a20707f0070b503 We still need to remove existing shortcut from the config, any ideas? A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1065 Git commit 098a965b5df31a7b6a212b5269eecb36b9dadc6c by Andrey Butirsky. Committed on 29/07/2022 at 10:51. Pushed by butirsky into branch 'master'. applets/keyboardlayout: fix unexpected expansion to full representation As a workaround, remove Keyboard Shortcuts configuration tab and already assigned shortcuts for the applet M +11 -0 applets/keyboardlayout/contents/ui/configGeneral.qml A +25 -0 desktoppackage/contents/updates/keyboardlayout_remove_shortcut.js https://invent.kde.org/plasma/plasma-desktop/commit/098a965b5df31a7b6a212b5269eecb36b9dadc6c |
Created attachment 136912 [details] screenshot STEPS TO REPRODUCE 1. start Wayland session 2, enable Keyboard Layout applet in system tray 3. enable flag and assign a keyboard shortcut in the settings of Keyboard Layout applet 4. press the assigned keyboard shortcut: nothing happens 5. press the assigned keyboard shortcut again: as we can see in the attached screenshot, keyboard layout popup opens with blurry flag and the flag disappears from system tray EXPECTED RESULT I'm not sure what is the purpose of the keyboard shortcut of Keyboard Layout applet, but clearly the current behavior is not correct. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.21.80 KDE Frameworks Version: 5.81.0 Qt Version: 5.15.2 Graphics Platform: Wayland