Elisa nightly flatpak from kdeapps repo Right now, the spacebar follows the typical focus rules: it "clicks" whatever's focused. In a music player, I think a more humane approach is to bind the spacebar to play/pause irrespective of focus.
Agree, I think we should have far more global hotkeys in Elisa. It would more ergonomic and customizable. Matthieu, what do you think about making a task in phabricator to track this?
Yes, please. I will follow kdeconnect lead and try to flags junior jobs and communicate about them.
I've already played around a little bit with this since I think this is quite useful, but it seems that the buttons from QQC2 have the action to the space key hardcoded into the component? I couldn't get the space key just to react to only the specified shortcut, it always clicked the focused button, too.
(In reply to Nate Graham from comment #0) > Elisa nightly flatpak from kdeapps repo > > Right now, the spacebar follows the typical focus rules: it "clicks" > whatever's focused. In a music player, I think a more humane approach is to > bind the spacebar to play/pause irrespective of focus. I do not know what other music players are doing here, but I am quite used to pressing spacebar to press buttons in any interface. That would be quite a pity for me if that would be a default. This is to say that we should add an application global shortcut to do that but I need to be convinced that spacebar is the right default.
I think we could look at what other media player software does. Most dedicated audio and video players use the spacebar for play/pause irrespective of focus (with the exception of when the user is in a text editor view or something). Basically sometimes an app-specific need ("spacebar does play/pause") should override a general rule ("spacebar clicks focused control"). For years YouTube's player didn't bind spacebar to play/pause and they got no end of complaints about it until they changed the behavior. :)
Git commit 5847d0e03f5ef3bfad0ae8e500c5640122983edb by Matthieu Gallien, on behalf of Ashwin Dhakaita. Committed on 15/01/2019 at 16:23. Pushed by mgallien into branch 'master'. Global shortcut for play/pause action using spacebar key Summary: Assign SpaceBar key as the global shortcut for play/pause action. Most of the media player out there already use spacebar as the global shortcut for play/pause action. So, it would be good to do the same for Elisa. Modified ElisaMainWindow.qml to add the shortcut component. Modified MediaPlayerControl.qml to prevent elements from getting focus as it causes interference with the shortcut keypressed events. FIXED-IN: elisa 0.3.80 Reviewers: #elisa, ngraham, mgallien Reviewed By: #elisa, ngraham, mgallien Subscribers: shubham, mgallien, ngraham Tags: #elisa Differential Revision: https://phabricator.kde.org/D17994 M +30 -0 src/elisaapplication.cpp M +6 -0 src/elisaapplication.h M +6 -0 src/qml/ElisaMainWindow.qml M +4 -0 src/qml/FlatButtonWithToolTip.qml M +19 -4 src/qml/MediaPlayListView.qml M +13 -1 src/qml/MediaPlayerControl.qml M +10 -0 src/qml/NavigationActionBar.qml https://commits.kde.org/elisa/5847d0e03f5ef3bfad0ae8e500c5640122983edb