Florian Bruhin
be609d5779
Improve logging for BaseKeyParser
...
See #1653
2016-07-27 10:27:53 +02:00
Jan Verbeek
bbc46d28ff
Use lists instead of tuples for comparing
...
Per one of the diff comments on #1597 :
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Florian Bruhin
299fea830e
Simplify some bool conditions
2016-06-07 15:42:59 +02:00
Jakub Klinkovský
82da79d05a
Renumber hints when filtering in numeric mode
...
(addresses #308 )
2016-06-07 13:07:56 +02:00
Jakub Klinkovský
3690ead5e0
Fix backspace handling in numeric hint mode
...
addresses #1186
2016-06-07 11:37:47 +02:00
Jakub Klinkovský
6e494605dd
Add timeout after auto-followed hint
2016-06-07 10:30:08 +02:00
Ryan Roden-Corrent
b1440a1804
Implement utils.is_special_key.
...
The check `key.startswith('<') and key.endswith('>') is repeated many
times in code to check for a special key. Replace all these with a call
to the same function.
2016-05-19 20:48:48 -04:00
Florian Bruhin
4a551a6758
Show exception stack when handling cmdexc errors.
2016-05-13 07:43:44 +02:00
Florian Bruhin
2d5ffbfd02
Revert "Handle counts for special keys."
...
This reverts commit c881730fad
.
This is just a temporary solution until we can properly fix this.
See #1464
2016-04-29 14:20:11 +02:00
Florian Bruhin
60f8681b41
Improve name of unused variable
2016-04-28 22:28:12 +02:00
Florian Bruhin
8b227f4ba4
Merge branch 'special_key_count' of https://github.com/rcorre/qutebrowser into rcorre-special_key_count
2016-04-28 22:22:23 +02:00
Florian Bruhin
2a343cb3a1
Various code style improvements
2016-04-27 20:25:27 +02:00
Florian Bruhin
77a9bbb4b4
Fix accidental double-import
2016-04-21 23:12:54 +02:00
Florian Bruhin
5b34f1b429
Fix ModeManager.leave docstring
2016-04-21 20:12:02 +02:00
Florian Bruhin
e0aa35b05a
Fix type in @pyqtSlot for ModeManager.leave
...
For some reason it worked with str as well, but the signal emits a
KeyMode member.
2016-04-21 20:10:58 +02:00
Ryan Roden-Corrent
600b5082a9
Touch up tests and add pyqtSlot for marks.
...
Small code review changes.
2016-04-20 21:53:12 -04:00
Ryan Roden-Corrent
c881730fad
Handle counts for special keys.
...
Now 3<ctrl-o> will execute whatever <ctrl-o> is mapped to with count=3.
2016-04-19 23:39:02 -04:00
Ryan Roden-Corrent
268d490e25
Return False when MarkKeyParser gets special key.
2016-04-19 17:30:57 -04:00
Ryan Roden-Corrent
6466ff919a
Don't limit marks to alpha characters.
2016-04-19 08:28:11 -04:00
Ryan Roden-Corrent
ae267c466f
Small fixes for marks.
...
Mark two callbacks with pyqtSlot as appropriate.
Return False instead of raising NotImplementedException to avoid pylint
identifying MarkKeyParser as abstract.
2016-04-19 08:28:02 -04:00
Ryan Roden-Corrent
4b00a17d71
Fix MarkKeyParser crash when changing keyconfig.
...
Ensure MarkKeyParser implements on_keyconfig_changed, so it doesn't fail when
rebinding a key. It doesn't have keybindings, so the implementation is just
`pass`.
This also fixes a few flake8 style errors.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
f4b9573744
Remove cyclic dependency from MarkKeyParser.
...
Rather than calling modeman.leave directly, modeman hooks into a request_leave
signal that is fired when MarkKeyParser wants to exit mark mode.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
49b2f6e967
Move jump_mark logic to TabbedBrowser.
...
This simplifies the MarkKeyParser by removing its dependency on the
commandrunner. It also removes the need for a new exception type.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
c7b830d69d
Fix up mistakes caught by pylint.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
7bfea773db
Add set_mark and jump_mark modes.
...
These modes use a custom handler to pass whatever the next keypress is
to either set_mark or jump_mark.
2016-04-17 21:04:08 -04:00
Florian Bruhin
27b31b7ded
Avoid DownloadView being focused when pressing tab
...
The previous fix didn't work in situations where the web view was
actually focused, but had no focused element (like about:blank).
The new fix always works, and even is a lot simpler!
Fixes #504 .
2016-03-31 19:45:36 +02:00
Florian Bruhin
a5f2ac5f03
Adjust copyright years.
2016-01-04 07:12:39 +01:00
Florian Bruhin
c1d3a94936
Don't pass through shifted characters.
...
See #1207 - turns out that was a problem for *any* character.
2016-01-04 07:10:23 +01:00
Florian Bruhin
f78fb0c027
basekeyparser: Remove dead code.
...
We added this in 836a5e04a5
for the old INI-based
config, but this is not needed anymore as the keys.conf syntax does not allow
this.
2015-08-26 20:31:17 +02:00
Alexander Cogneau
09161faca5
Refactor read_config for easier testing
2015-08-25 12:04:22 +02:00
Alexander Cogneau
af9647221a
Add tests for BaseKeyParser
2015-08-24 18:12:12 +02:00
Alexander Cogneau
193a8d5242
Add unit tests for KeyInput.BaseKeyParser
2015-08-22 23:26:13 +02:00
Florian Bruhin
5310c60d58
Remove unused import.
2015-06-07 01:24:24 +02:00
Florian Bruhin
def41e70bf
Fix some spelling mistakes.
2015-06-07 01:24:02 +02:00
Martin Tournoij
dfada850e0
Update code after refactor, and add migration
2015-06-05 16:52:33 +02:00
Martin Tournoij
a7b10a090f
Merge branch 'master' into issue-716
2015-06-05 16:45:52 +02:00
Florian Bruhin
b55e22b5c3
Refactor key mode/parser handling in modeman.
2015-06-05 15:29:09 +02:00
Martin Tournoij
fa65f345ac
Perhaps fix it more properly after all :-)
2015-06-05 15:19:40 +02:00
Martin Tournoij
57ddd8e95e
Always handle the <Esc> key, even if it's bound.
...
This fixes #716 , which sufficiently annoyed me to make this quick fix. It's not
a great fix, but it's not worse than what we had already, and the current
behaviour is very surprising IMHO.
2015-06-05 14:26:17 +02:00
Florian Bruhin
7102459c81
Rename _get_modeman() to instance().
2015-06-05 11:15:18 +02:00
Florian Bruhin
947dcd556b
Clean up CaretKeyParser.
2015-05-13 22:29:21 +02:00
Florian Bruhin
bc54eb8671
Make get_modeman private again.
2015-05-13 22:27:54 +02:00
Florian Bruhin
a36c0fcd4c
Fix lint.
2015-05-11 20:32:27 +02:00
Artur Shaik
178d0dfa58
Add count for actions. Zero key treat as command.
2015-05-07 11:51:10 +06:00
Artur Shaik
d594798db8
Implement caret selection and positioning
...
Added option to webview for selection enabled caret mode.
In status bar checking value of this option to identificate about it.
Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop
selection and keep selection mode enabled.
In webview added javascript snippet to position caret at top of the
viewport after caret enabling. This code mostly was taken from cVim sources.
2015-05-05 10:18:24 +06:00
Artur Shaik
aeaa20c3b7
Disable support count for CaretKeyParser
...
Allow using '0' for move caret to beginnig of the line.
2015-05-04 18:00:40 +06:00
Florian Bruhin
32562c6878
Fix lint.
2015-04-28 16:50:42 +02:00
Florian Bruhin
6c8e073dc8
Merge branch 'caret_visual_mode' of https://github.com/artur-shaik/qutebrowser into visual
...
Conflicts:
qutebrowser/browser/commands.py
qutebrowser/browser/webview.py
qutebrowser/config/configdata.py
2015-04-21 21:29:00 +02:00
Florian Bruhin
83dbe48469
Refactor EventFilter.
2015-04-09 20:22:00 +02:00
Florian Bruhin
f77ba5744b
Add a ui -> hide-mouse-cursor option.
2015-04-09 19:59:16 +02:00