Skip to content

Commit

Permalink
Merge pull request #1009 from tux21b/topic/lookup-autoselect
Browse files Browse the repository at this point in the history
focus the input field when the lookup window is activated
  • Loading branch information
TheaMorin authored Nov 10, 2018
2 parents badb268 + 5d7de52 commit 8ddc445
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plover/gui_qt/lookup_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ def on_lookup(self, pattern):
translation = unescape_translation(pattern.strip())
suggestion_list = self._engine.get_suggestions(translation)
self._update_suggestions(suggestion_list)

def changeEvent(self, event):
super().changeEvent(event)
if event.type() == QEvent.ActivationChange and self.isActiveWindow():
self.pattern.setFocus()
self.pattern.selectAll()

0 comments on commit 8ddc445

Please sign in to comment.