mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-23 06:02:49 +02:00
Media Play key is expected to behave like Toggle Media Play/Pause
Looks like Qt maps "Media Play" to the common play/pause button on keyboards: https://github.com/qt/qtbase/blob/5.15/src/platformsupport/input/xkbcommon/qxkbcommon.cpp#L293 https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/windows/qwindowskeymapper.cpp#L392 https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/android/androidjniinput.cpp#L519 https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/android/androidjniinput.cpp#L607 While "Toggle Media Play/Pause" is some special case: https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/windows/qwindowskeymapper.cpp#L488 https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/ios/quiview.mm#L584 It is worth to behave on "Media Play" like on "Toggle Media Play/Pause".
This commit is contained in:
parent
8819938bf2
commit
86be105c25
1 changed files with 1 additions and 1 deletions
|
@ -737,7 +737,7 @@ void Instance::setupShortcuts() {
|
|||
) | rpl::start_with_next([=](not_null<Shortcuts::Request*> request) {
|
||||
using Command = Shortcuts::Command;
|
||||
request->check(Command::MediaPlay) && request->handle([=] {
|
||||
play();
|
||||
playPause();
|
||||
return true;
|
||||
});
|
||||
request->check(Command::MediaPause) && request->handle([=] {
|
||||
|
|
Loading…
Add table
Reference in a new issue