SUMMARY Is there any way to input data in calculator widget where i opened it with hotkey? Maybe some setting or hack? Please, add this to feature list. STEPS TO REPRODUCE 1. Link opening calculator widget with hotkey (Meta+K, for example) 2. Press hotkey, calculator widget is opened 3. Try to press digits or other keys — no reaction from widget — cause no focus on widget by default OBSERVED RESULT When user presses hotkey to open widget, all next keypresses ignored by calculator. Only if click on opened widget — user can start to input data. EXPECTED RESULT User presses hotkey to open calc widget and start to input digits and operands — no need to click on opened widget second time to activate it's focus. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kde Neon Latest KDE Plasma Version: 6 KDE Frameworks Version: 6 Qt Version: 6 ADDITIONAL INFORMATION When I click on the widget icon on the panel, I can immediately enter numbers into the calculator. I think that opening a widget using a hotkey should follow a similar way. I noticed that many widgets got auto-focus when activated via hotkey, AppMenu for example.
In general widgets do this, but it has to be implemented on a per-widget basis. I had thought we fixed this for the Calculator widget with Bug 479642 though. I'll have to investigate.
Ah, it looks like we only fixed it for when the Calculator is clicked on, not when it's activated with a keyboard shortcut. Strange that those have different codepaths.
(In reply to Nate Graham from comment #2) > Ah, it looks like we only fixed it for when the Calculator is clicked on, > not when it's activated with a keyboard shortcut. Strange that those have > different codepaths. Thank you for widget, Nate. Using it every day. Before this feature would be released, if somebody has same trouble — I've found temporary workaround. After activating calculator widget with hotkey, user can simply press Tab key — so widget getting focus on "C" button, and user can input any data. So, in my case, I use combo "Win+K, Tab" and widget works as I'm expecting.
For some reason it seems that when using keyboard shortcut, `Keys.onPressed` wont listen any input.
This is getting more weird. The part with `displayFrame.focus: { focus: main.expanded }` - If I press with mouse, main expanded true, focus is then set true - If I press with shortcut, main expanded true, but focus stays false.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1072
Git commit 988161d805526a527bf96a94af066757774c552b by Marco Martin. Committed on 06/03/2024 at 09:19. Pushed by mart into branch 'master'. Remove old focus workaround There was a workaround for an old bug (372476) that fixed the focus to the FullRepresentation item, but some applets wanted focus not on the root fullrepresentation item but on some descendant. For instance it breaks the calculator plasmoid keyboard input. Reverting that workaround on Plasma6 the original bug doesn't happen anymore. M +0 -9 src/plasmaquick/plasmoid/plasmoiditem.cpp https://invent.kde.org/plasma/libplasma/-/commit/988161d805526a527bf96a94af066757774c552b
Git commit 800ab725a6e72621ca81e0952d951b5a5ed1061a by Marco Martin. Committed on 06/03/2024 at 09:35. Pushed by mart into branch 'Plasma/6.0'. Remove old focus workaround There was a workaround for an old bug (372476) that fixed the focus to the FullRepresentation item, but some applets wanted focus not on the root fullrepresentation item but on some descendant. For instance it breaks the calculator plasmoid keyboard input. Reverting that workaround on Plasma6 the original bug doesn't happen anymore. M +0 -8 src/plasmaquick/plasmoid/plasmoiditem.cpp https://invent.kde.org/plasma/libplasma/-/commit/800ab725a6e72621ca81e0952d951b5a5ed1061a