From 2ef375ac784985212b1805e1d0431dc8f1b3c171 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 16 Mar 2021 10:56:17 +0100 Subject: Add input.media_keys setting --- doc/changelog.asciidoc | 10 ++++++++++ doc/help/settings.asciidoc | 16 ++++++++++++++++ qutebrowser/config/configdata.yml | 12 ++++++++++++ qutebrowser/config/qtargs.py | 3 +++ 4 files changed, 41 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 2d399ad6d..f6604f192 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -15,6 +15,16 @@ breaking changes (such as renamed commands) can happen in minor releases. // `Fixed` for any bug fixes. // `Security` to invite users to upgrade in case of vulnerabilities. +[[v2.2.0]] +v2.2.0 (unreleased) +------------------- + +Added +~~~~~ + +- New `input.media_keys` setting which can be used to disable Chromium's + handling of media keys. + [[v2.1.1]] v2.1.1 (unreleased) ------------------- diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 0ecd7d753..8b2964f4f 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -261,6 +261,7 @@ |<>|Leave insert mode when starting a new page load. |<>|Switch to insert mode when clicking flash and other plugins. |<>|Include hyperlinks in the keyboard focus chain when tabbing. +|<>|Whether the underlying Chromium should handle media keys. |<>|Enable back and forward buttons on the mouse. |<>|Enable Opera-like mouse rocker gestures. |<>|Timeout (in milliseconds) for partially typed key bindings. @@ -3392,6 +3393,21 @@ Type: <> Default: +pass:[true]+ +[[input.media_keys]] +=== input.media_keys +Whether the underlying Chromium should handle media keys. +On Linux, disabling this also disables Chromium's MPRIS integration. + +This setting requires a restart. + +On QtWebEngine, this setting requires Qt 5.14 or newer. + +On QtWebKit, this setting is unavailable. + +Type: <> + +Default: +pass:[true]+ + [[input.mouse.back_forward_buttons]] === input.mouse.back_forward_buttons Enable back and forward buttons on the mouse. diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 22a4b2151..45d8d1a7c 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1613,6 +1613,18 @@ input.spatial_navigation: Right key, heuristics determine whether there is an element he might be trying to reach towards the right and which element he probably wants. +input.media_keys: + default: true + type: Bool + backend: + QtWebEngine: Qt 5.14 + QtWebKit: false + restart: true + desc: >- + Whether the underlying Chromium should handle media keys. + + On Linux, disabling this also disables Chromium's MPRIS integration. + ## keyhint keyhint.blacklist: diff --git a/qutebrowser/config/qtargs.py b/qutebrowser/config/qtargs.py index 407ccb37e..d9564556a 100644 --- a/qutebrowser/config/qtargs.py +++ b/qutebrowser/config/qtargs.py @@ -157,6 +157,9 @@ def _qtwebengine_features( # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-89740 disabled_features.append('InstalledApp') + if not config.val.input.media_keys: + disabled_features.append('HardwareMediaKeyHandling') + return (enabled_features, disabled_features) -- cgit v1.2.3-54-g00ecf