Recognize "Command"/"Cmd" in keybindings

This commit is contained in:
Florian Bruhin 2018-08-28 18:57:47 +02:00
parent 3fa01ae84d
commit 8459afb76e
3 changed files with 8 additions and 2 deletions

View File

@ -35,6 +35,8 @@ Changed
to `<Shift-Escape>`, which makes pasting from the clipboard easier in
passthrough mode and is also unlikely to conflict with webpage bindings.
- The `app_id` is now set to `qutebrowser` for Wayland.
- `Command` or `Cmd` can now be used (instead of `Meta`) to map the Command key
on macOS.
v1.4.2 (unreleased)
-------------------

View File

@ -270,8 +270,10 @@ def _parse_special_key(keystr):
replacements = (
('control', 'ctrl'),
('windows', 'meta'),
('mod1', 'alt'),
('mod4', 'meta'),
('command', 'meta'),
('cmd', 'meta'),
('mod1', 'alt'),
('less', '<'),
('greater', '>'),
)

View File

@ -214,8 +214,10 @@ class TestKeySequence:
@pytest.mark.parametrize('orig, normalized', [
('<Control+x>', '<Ctrl+x>'),
('<Windows+x>', '<Meta+x>'),
('<Mod1+x>', '<Alt+x>'),
('<Mod4+x>', '<Meta+x>'),
('<Command+x>', '<Meta+x>'),
('<Cmd+x>', '<Meta+x>'),
('<Mod1+x>', '<Alt+x>'),
('<Control-->', '<Ctrl+->'),
('<Windows++>', '<Meta++>'),
('<ctrl-x>', '<Ctrl+x>'),