VOOZH about

URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1584030

⇱ 1584030 - Implement global media keys on Linux


Closed Bug 1584030 Opened 6 years ago Closed 6 years ago

Implement global media keys on Linux

Implement global media keys on Linux
Core
Widget: Gtk
unspecified
Unspecified
Linux
task
Points:
---
RESOLVED DUPLICATE of bug 1353652
RESOLVED
DUPLICATE
of
Iteration:
---
a11y-review
Accessibility Severity
Performance Impact
Size Estimate
Webcompat Priority
Webcompat Score
Tracking Status
relnote-firefox
thunderbird_esr115
thunderbird_esr140
firefox-esr115
firefox-esr140
firefox-esr153
firefox152
firefox153
firefox154
---
QA Whiteboard:
---
Has STR:
---
Change Request:
---
Bug Flags:
Signature:
None
This bug is publicly visible.

 
Reporter

Description

β€’
6 years ago

We would like to support hardware media keys, such like play/pause, prev and next, to control media playback on Linux.

I can take this on.

Reporter

Comment 2

β€’
6 years ago

(In reply to paul.eliot.warner from comment #1)

I can take this on.

Sure, feel free to take it, thank you!

See Also: β†’ 1353652
Reporter

Comment 3

β€’
6 years ago

According to bug1584029 comment8, we can receive normal media keys from NSTextInputClient protocal, but it only works when Firefox is in the foreground (on focus).

But for media keys, we would like to use them to control media even if Firefox is not on focus. So we should use xgrabkey() [1] to capture them, like what Chrome did here [2].

[1] https://linux.die.net/man/3/xgrabkey
[2] https://cs.chromium.org/chromium/src/chrome/browser/extensions/global_shortcut_listener_x11.cc?l=102-130

Summary: Support hardware media keys on Linux β†’ Implement global media keys on Linux

Note that there's also a dbus API for registering interest in media keys.
https://github.com/GNOME/gnome-settings-daemon/tree/master/plugins/media-keys
This is probably friendlier than xgrabkey on desktops that use this.

Reporter

Updated

β€’
6 years ago
Component: Audio/Video: Playback β†’ Widget: Gtk
Reporter

Updated

β€’
6 years ago
Depends on: 1591288

Actually we shouldn't need XGrabKey as MPRIS should replace this while even providing more functionality.
This would only make sense if MPRIS wasn't supported. Platforms which don't run the DBUS, mainly. But I don't know if we even support that?
Anyway it is closely related to bug1353652

Depending on whether we want XGrabKey as a fallback, this bug is a duplicate (dependant) on bug1353652 or not.
If we want XGrabKey as a fallback, this should/would be implemented as bug1583858 (or whatever the web extension global hotkey support now is), but closely keeping an eye on not producing double events (one through the global hotkey implementation and one through MPRIS).

Reporter

Updated

β€’
6 years ago
No longer blocks: webext-commands-global
Reporter

Comment 6

β€’
6 years ago

Your're right, this one should be a duplication of bug1353652. If most Linux platform can handle media key directly and transfer them to MPRIS-based commands, I don't think we should have to implement XGrabKey at least for now.

Status: NEW β†’ RESOLVED
Closed: 6 years ago
Resolution: --- β†’ DUPLICATE
You need to log in before you can comment on or make changes to this bug.