Perhaps fix it more properly after all :-)
This commit is contained in:
parent
57ddd8e95e
commit
fa65f345ac
@ -685,6 +685,7 @@ How many steps to zoom out.
|
|||||||
[options="header",width="75%",cols="25%,75%"]
|
[options="header",width="75%",cols="25%,75%"]
|
||||||
|==============
|
|==============
|
||||||
|Command|Description
|
|Command|Description
|
||||||
|
|<<clear-keychain,clear-keychain>>|Clear the currently entered key chain.
|
||||||
|<<command-accept,command-accept>>|Execute the command currently in the commandline.
|
|<<command-accept,command-accept>>|Execute the command currently in the commandline.
|
||||||
|<<command-history-next,command-history-next>>|Go forward in the commandline history.
|
|<<command-history-next,command-history-next>>|Go forward in the commandline history.
|
||||||
|<<command-history-prev,command-history-prev>>|Go back in the commandline history.
|
|<<command-history-prev,command-history-prev>>|Go back in the commandline history.
|
||||||
@ -739,6 +740,10 @@ How many steps to zoom out.
|
|||||||
|<<toggle-selection,toggle-selection>>|Toggle caret selection mode.
|
|<<toggle-selection,toggle-selection>>|Toggle caret selection mode.
|
||||||
|<<yank-selected,yank-selected>>|Yank the selected text to the clipboard or primary selection.
|
|<<yank-selected,yank-selected>>|Yank the selected text to the clipboard or primary selection.
|
||||||
|==============
|
|==============
|
||||||
|
[[clear-keychain]]
|
||||||
|
=== clear-keychain
|
||||||
|
Clear the currently entered key chain.
|
||||||
|
|
||||||
[[command-accept]]
|
[[command-accept]]
|
||||||
=== command-accept
|
=== command-accept
|
||||||
Execute the command currently in the commandline.
|
Execute the command currently in the commandline.
|
||||||
|
@ -1143,7 +1143,7 @@ KEY_DATA = collections.OrderedDict([
|
|||||||
])),
|
])),
|
||||||
|
|
||||||
('normal', collections.OrderedDict([
|
('normal', collections.OrderedDict([
|
||||||
('search', ['<Escape>']),
|
('search ;; clear-keychain', ['<Escape>']),
|
||||||
('set-cmd-text -s :open', ['o']),
|
('set-cmd-text -s :open', ['o']),
|
||||||
('set-cmd-text :open {url}', ['go']),
|
('set-cmd-text :open {url}', ['go']),
|
||||||
('set-cmd-text -s :open -t', ['O']),
|
('set-cmd-text -s :open -t', ['O']),
|
||||||
|
@ -298,14 +298,6 @@ class BaseKeyParser(QObject):
|
|||||||
"""
|
"""
|
||||||
handled = self._handle_special_key(e)
|
handled = self._handle_special_key(e)
|
||||||
|
|
||||||
# Special case for <Esc>. See:
|
|
||||||
# https://github.com/The-Compiler/qutebrowser/issues/716
|
|
||||||
if e.key() == Qt.Key_Escape:
|
|
||||||
self._debug_log("Escape pressed, discarding '{}'.".format(
|
|
||||||
self._keystring))
|
|
||||||
self._keystring = ''
|
|
||||||
self.keystring_updated.emit(self._keystring)
|
|
||||||
|
|
||||||
if handled or not self._supports_chains:
|
if handled or not self._supports_chains:
|
||||||
return handled
|
return handled
|
||||||
match = self._handle_single_key(e)
|
match = self._handle_single_key(e)
|
||||||
@ -362,3 +354,9 @@ class BaseKeyParser(QObject):
|
|||||||
"defined!")
|
"defined!")
|
||||||
if mode == self._modename:
|
if mode == self._modename:
|
||||||
self.read_config()
|
self.read_config()
|
||||||
|
|
||||||
|
def clear_keystring(self):
|
||||||
|
"""Clear the currently entered key sequence."""
|
||||||
|
self._debug_log("discarding keystring '{}'.".format(self._keystring))
|
||||||
|
self._keystring = ''
|
||||||
|
self.keystring_updated.emit(self._keystring)
|
||||||
|
@ -332,3 +332,8 @@ class ModeManager(QObject):
|
|||||||
return self._eventFilter_keypress(event)
|
return self._eventFilter_keypress(event)
|
||||||
else:
|
else:
|
||||||
return self._eventFilter_keyrelease(event)
|
return self._eventFilter_keyrelease(event)
|
||||||
|
|
||||||
|
@cmdutils.register(instance='mode-manager', scope='window', hide=True)
|
||||||
|
def clear_keychain(self):
|
||||||
|
"""Clear the currently entered key chain."""
|
||||||
|
self._handlers[self.mode].__self__.clear_keystring()
|
||||||
|
Loading…
Reference in New Issue
Block a user