mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Invoke autosuggestion pop-up with arrow-key up/down
This commit is contained in:
parent
153849c01b
commit
a7cdff6d96
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ class TagEdit(QLineEdit):
|
||||||
self.showCompleter()
|
self.showCompleter()
|
||||||
|
|
||||||
def keyPressEvent(self, evt):
|
def keyPressEvent(self, evt):
|
||||||
|
if evt.key() in (Qt.Key_Up, Qt.Key_Down):
|
||||||
|
# show completer on arrow key up/down
|
||||||
|
if not self.completer.popup().isVisible():
|
||||||
|
self.showCompleter()
|
||||||
|
return
|
||||||
if (evt.key() == Qt.Key_Tab and evt.modifiers() & Qt.ControlModifier):
|
if (evt.key() == Qt.Key_Tab and evt.modifiers() & Qt.ControlModifier):
|
||||||
# select next completion
|
# select next completion
|
||||||
if not self.completer.popup().isVisible():
|
if not self.completer.popup().isVisible():
|
||||||
|
|
Loading…
Reference in a new issue