Age | Commit message (Collapse) | Author |
|
We don't know if this is a valid Qt.Key at this point.
See #7045 and #7047
|
|
Workaround for #7047, supersedes #7045
|
|
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
|
|
|
|
This reverts commit e2c5fe6262564d9d85806bfa9d4486a411cf5045.
See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF
|
|
See #6100
|
|
https://bugs.python.org/issue40066
https://mail.python.org/archives/list/python-dev@python.org/message/CHQW6THTDYNPPFWQ2KDDTUYSAJDCZFNP/
https://github.com/python/cpython/commit/b775106d940e3d77c8af7967545bb9a5b7b162df
|
|
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 8976e6850317881ed1aebed55a273e73c17a50bd.
|
|
|
|
|
|
|
|
This reverts commit 1132324db9d665ba0f0143fb1d071995a3fc7715.
Causes various issues with Qt/QtWebEngine shortcuts.
Fixes #6174
Closes #6149
|
|
This reverts commit 708a7630e78251e9df9ae2b69796bad6c88ae7af.
|
|
|
|
See #6022, #6071
|
|
|
|
See https://github.com/qutebrowser/qutebrowser/discussions/5999#discussioncomment-297309
|
|
Closes #6015
|
|
See #6022
|
|
See #6022
|
|
See #6023
|
|
See #6023
|
|
See #6023
|
|
We know that QApplication.instance() will always be non-None for
practical purposes, but the stubs now (correctly) declare it as
Optional.
See https://github.com/stlehmann/PyQt5-stubs/pull/126
|
|
- Prefer None to ""
- Prefer implicit bool checking
- Try to fix mypy warnings
|
|
The last addition to Qt.Key is included in 5.12.0:
Ib5c37168990c9d9fa99fdd50f63b934c793e8dc
|
|
|
|
|
|
|
|
Update files in `keyinput`, `mainwindow`, and `misc`.
See #5396
|
|
Doesn't change values where they are chosen to line up with Qt enums.
See #4800
|
|
|
|
|
|
|
|
|
|
|
|
Closes #2817
|
|
|
|
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)
|
|
|
|
Before the changes in this commit, we've had to have a subclassed parser for
every mode, even if there was no special key handling going on in that mode.
With a couple of changes, we can avoid many of those subclasses and only have
subclasses for bigger changes (like hint or register modes).
- The awkward handling of self._modename in _read_config() is now removed.
_read_config() doesn't take an argument, always uses the mode in self._mode
and gets called from __init__.
- BaseKeyParser takes the mode as an argument to __init__.
- The class attributes (do_log/passthrough/supports_count) now also get passed
via the constructor.
|