Age | Commit message (Collapse) | Author |
|
Doing `Qt.Key | Qt.KeyboardModifier` now results in a QKeyCombination.
append_event() always does that (even if the modifier is NoModifier).
Previous hacks round this area:
e61597ca817e369c95 (initial keyhack, partially corrected in this commit)
1cc87d4d47bc15754d (initial QKeyCombination introduction)
ab447bd396b46247f6 (Earlier attempt at a fix, mostly corrected in this commit)
|
|
`QKeySequence.SequenceMatch` is one of the enums for which `Enum(0)` is
no-longer falsey, compare to NoMatch instead. Otherwise the conditional
is always false and forwarded keys don't work.
Eg
> from PyQt6.QtGui import QKeySequence, QKeyEvent
> bool(QKeySequence.SequenceMatch.NoMatch)
True
> bool(QKeySequence.SequenceMatch(0))
True
For `QKeySequence.SequenceMatch` and `QtCore.Qt.Key` and
`QtCore.Qt.KeyboardModifier` int(enum_value) no longer works, eg
> int(QtCore.Qt.KeyboardModifier(0))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier'
|
|
|
|
|
|
|
|
|
|
|
|
See #5904
|
|
|
|
See #6100
|
|
Otherwise, when e.g. doing "<Meta+Up>": "gg" in bindings.key_mappings,
there's a crash like:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 105, in eventFilter
return handler(typing.cast(QKeyEvent, event))
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 75, in _handle_key_event
return man.handle_event(event)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 462, in handle_event
return handler(cast(QKeyEvent, event))
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 283, in _handle_keypress
match = parser.handle(event, dry_run=dry_run)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeparsers.py", line 105, in handle
match = super().handle(e, dry_run=dry_run)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 309, in handle
result = self._match_key_mapping(result.sequence)
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 246, in _match_key_mapping
mapped = sequence.with_mappings(
File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/keyutils.py", line 675, in with_mappings
assert len(new_seq) == 1
AssertionError
While this isn't the intended way to use this setting, we shouldn't
crash - and let's just make it work instead of forbidding it.
|
|
|
|
This reverts commit 1132324db9d665ba0f0143fb1d071995a3fc7715.
Causes various issues with Qt/QtWebEngine shortcuts.
Fixes #6174
Closes #6149
|
|
|
|
See https://github.com/qutebrowser/qutebrowser/discussions/5999#discussioncomment-297309
|
|
Closes #6015
|
|
See #6023
|
|
See #6023
|
|
See #6023
|
|
The last addition to Qt.Key is included in 5.12.0:
Ib5c37168990c9d9fa99fdd50f63b934c793e8dc
|
|
|
|
|
|
Update files in `keyinput`, `mainwindow`, and `misc`.
See #5396
|
|
Instead of binding hints to fake :follow-hint commands, we now use a separate
CommandKeyParser and ask that for its match result.
If the key matches with the command parser, it is bound in hint mode, so we
clear the hint keystring and defer to the command handling instead.
If it doesn't, we continue hint handling as usual - however, the HintKeyParser
is now not a CommandKeyParser anymore, so we don't have to deal with command
parsing (and have a custom execute implementation instead).
Closes #4504
Fixes #4392
Fixes #4368
Helps with #5084, though it doesn't completely fix that yet.
Supersedes #3742 (fix for #3735)
Supersedes #4691 (fix for #4264)
|
|
See #5368
|
|
See #5368
|
|
See #5368
|
|
|
|
|
|
Thanks to user202729 for the patch.
Fixes #4491
|
|
|
|
|
|
|
|
We now convert from int to Qt.Key as soon as we get a key (with no modifiers
added) from a QKeyEvent.
Also add missing _assert_plain_key calls.
|
|
|
|
This way, we can store the real KeyInfo objects in BindingTrie instead of
having to use .to_int().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On Qt 5.13, all those keys are defined, so this line never gets hit.
(For some reason, this wasn't a problem before moving _SPECIAL_NAMES out of the
function it was in - not sure why...)
|
|
|
|
Modules can only get imported once (in other words, imports are cached by
Python).
|
|
|
|
This also fixes some calls to utils.KeySequence with a string.
See #4928
|
|
Fixes #4264.
|
|
This was broken in PR #3742.
|
|
mode keychain
|