summaryrefslogtreecommitdiff
path: root/qutebrowser/keyinput/modeman.py
AgeCommit message (Collapse)Author
2022-04-01Store raw key in modeman.KeyEventqt6-testFlorian Bruhin
We don't know if this is a valid Qt.Key at this point. See #7045 and #7047
2021-10-03even more keypress related hacksJimmy
`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'
2021-08-26Automatically rewrite enumsFlorian Bruhin
See #5904
2021-08-26Blanket PyQt5 -> PyQt6Florian Bruhin
2021-07-12Revert "Fix enum stringification for Python 3.10 a7+"Florian Bruhin
This reverts commit e2c5fe6262564d9d85806bfa9d4486a411cf5045. See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF
2021-04-08Fix enum stringification for Python 3.10 a7+Florian Bruhin
https://bugs.python.org/issue40066 https://mail.python.org/archives/list/python-dev@python.org/message/CHQW6THTDYNPPFWQ2KDDTUYSAJDCZFNP/ https://github.com/python/cpython/commit/b775106d940e3d77c8af7967545bb9a5b7b162df
2021-03-11Revert "Add deprecated aliases for renamed commands"Florian Bruhin
This reverts commit 8976e6850317881ed1aebed55a273e73c17a50bd.
2021-03-09Add log-sensitive-keys debug flagFlorian Bruhin
2021-01-27Add deprecated aliases for renamed commandsFlorian Bruhin
See #6022, #6071
2021-01-26doc: Switch URLs to httpsFlorian Bruhin
2021-01-20Bump copyright yearsFlorian Bruhin
Closes #6015
2021-01-20Rename :enter-mode and :leave-modeFlorian Bruhin
See #6022
2021-01-13dataclasses: Adjust import orderFlorian Bruhin
See #6023
2021-01-13dataclasses: Initial switchFlorian Bruhin
See #6023
2021-01-11Add objects.qapp to avoid needing to None-checkFlorian Bruhin
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
2020-11-02mypy: use annotations for typing instead of commentsTim Brown
2020-10-28mypy: use from-import style for typingTim Brown
Update files in `keyinput`, `mainwindow`, and `misc`. See #5396
2020-10-16Use signals to set status text from HintManagerFlorian Bruhin
2020-07-27Disallow register mode for :enter-modeFlorian Bruhin
2020-06-17Show partial keystrings for all modes in statusbarFlorian Bruhin
Closes #2817
2020-06-17modeparsers: Refactor to avoid subclassingFlorian Bruhin
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.
2020-06-09Modify modeman.instance() to return specific error when unavailable.Constantine Theocharis
This avoids the need to have a generic 'except KeyError' in statusbar/bar.py when querying the current mode, in the case when the mode manager has not been initialized yet.
2020-05-10mypy: Use explicit "type: ignore[...]" ignoresFlorian Bruhin
See #5368
2020-05-09mypy: Fix typing around eventfiltersFlorian Bruhin
See #5368
2020-05-09mypy: Use from-import in keyinput.modemanFlorian Bruhin
See #5368, #5396
2020-01-04Adjust copyrights for 2020Florian Bruhin
2019-11-25Use modeman.instance() to get mode managerFlorian Bruhin
See #640
2019-11-24Fix mypyFlorian Bruhin
2019-11-24Remove keyparsers from objregFlorian Bruhin
This gets rid of an exception/abort when tests are finished with the new PyQt exit scheme. See #5017, #640
2019-10-13objreg: Set command_only for hintmanager and prompt-containerFlorian Bruhin
See #640
2019-10-13Add some newlinesFlorian Bruhin
2019-10-09Add type annotations for keyinput.modemanFlorian Bruhin
2019-10-09ReindentFlorian Bruhin
2019-10-09Use usertypes.KeyMode for PassthroughKeyParser mode argumentFlorian Bruhin
More consistency with RegisterKeyParser and more type safety
2019-10-09Move HintManager from a per-tab to a per-window objectFlorian Bruhin
This means we use objreg less and we have less HintManager objects - what's there not to like?
2019-10-09Pass commandrunner object to mode parsersFlorian Bruhin
Apart from making things easier to test, this also means there is only one shared CommandRunner instead of there being one per parser.
2019-09-10Merge remote-tracking branch 'origin/pr/4536'Florian Bruhin
2019-05-22Improve :enter-mode docsFlorian Bruhin
2019-03-17Merge branch 'master' of https://github.com/qutebrowser/qutebrowser into ↵Jay Kamat
jay/keys-unneeeded-code
2019-03-16Cache hot config accesses in key parserJay Kamat
2019-02-22Update copyright for 2019Jay Kamat
2018-12-12Fix lintFlorian Bruhin
2018-11-29Move CommandError to api.cmdutilsFlorian Bruhin
2018-06-14Unconditionally restore mode after promptFlorian Bruhin
2018-06-14Make sure modeman.enter(KeyMode.normal) does something sensibleFlorian Bruhin
2018-03-16Merge 'origin/master' into tab-input-modeMarc Jauvin
2018-03-13address requested changesMarc Jauvin
- add INPUT_MODES & PROMPT_MODES constants in modeman - use those in tabbedbrowser and modeman - fix debug logs format to be more human readable - fix associated tests for new debug logs
2018-03-09Fix lintFlorian Bruhin
2018-03-08keyinput: Merge keyparser into modeparsersjakanakae-envangel
2018-03-07Save input modes when mode_on_change=='restore'Marc Jauvin