From b6b1436c1bb5b00c458c3a78cd9f0021e5650f6e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 17 Jul 2012 15:11:35 +0530 Subject: [PATCH] Dont use Tab to cycle through completions as we have the arrow keys and Tab doesn't work when the completions popup is not visible --- resources/default_tweaks.py | 2 +- src/calibre/gui2/complete2.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 3bba5ecca5..b096cd1d65 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -522,5 +522,5 @@ enable_multicharacters_in_tag_browser = True # completions you will now have to press Tab to select one before pressing # Enter. Which technique you prefer will depend on the state of metadata in # your library and your personal editing style. -preselect_first_completion = False +preselect_first_completion = True diff --git a/src/calibre/gui2/complete2.py b/src/calibre/gui2/complete2.py index 603177498d..eb28c38881 100644 --- a/src/calibre/gui2/complete2.py +++ b/src/calibre/gui2/complete2.py @@ -193,8 +193,8 @@ class Completer(QListView): # {{{ if key in (Qt.Key_PageUp, Qt.Key_PageDown): # Let the list view handle these keys return False - if key in (Qt.Key_Tab, Qt.Key_Backtab, Qt.Key_Up, Qt.Key_Down): - self.next_match(previous=key in (Qt.Key_Backtab, Qt.Key_Up)) + if key in (Qt.Key_Up, Qt.Key_Down): + self.next_match(previous=key == Qt.Key_Up) e.accept() return True # Send to widget