diff options
Diffstat (limited to 'qutebrowser')
-rw-r--r-- | qutebrowser/config/configdata.yml | 11 | ||||
-rw-r--r-- | qutebrowser/keyinput/basekeyparser.py | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index e034fe8f5..3c5dc6f2f 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1794,6 +1794,17 @@ input.media_keys: On Linux, disabling this also disables Chromium's MPRIS integration. +input.match_counts: + default: true + type: Bool + desc: >- + Interpret number prefixes as counts for bindings. + + This enables for vi-like bindings that can be prefixed with a number to + indicate a count. + Disabling it allows for emacs-like bindings where number keys are passed + through (according to `input.forward_unbound_keys`) instead. + ## keyhint keyhint.blacklist: diff --git a/qutebrowser/keyinput/basekeyparser.py b/qutebrowser/keyinput/basekeyparser.py index 7e688dab1..4db1d5d76 100644 --- a/qutebrowser/keyinput/basekeyparser.py +++ b/qutebrowser/keyinput/basekeyparser.py @@ -254,6 +254,9 @@ class BaseKeyParser(QObject): def _match_count(self, sequence: keyutils.KeySequence, dry_run: bool) -> bool: """Try to match a key as count.""" + if not config.val.input.match_counts: + return False + txt = str(sequence[-1]) # To account for sequences changed above. if (txt in string.digits and self._supports_count and not (not self._count and txt == '0')): |