Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
Tab goes down while Shift+Tab goes up through the list.
Note that Tab doesn't work with ACO_UPDOWNKEYDROPSLIST on Windows so it doesn't here either.
dlls/shell32/autocomplete.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c index ca4227d..43c93ef 100644 --- a/dlls/shell32/autocomplete.c +++ b/dlls/shell32/autocomplete.c @@ -23,13 +23,13 @@ - ACO_AUTOAPPEND style - ACO_AUTOSUGGEST style - ACO_UPDOWNKEYDROPSLIST style + - ACO_USETAB style
- Handle pwzsRegKeyPath and pwszQuickComplete in Init
TODO: - implement ACO_SEARCH style - implement ACO_FILTERPREFIXES style - - implement ACO_USETAB style - implement ACO_RTLREADING style - implement ResetEnumerator - string compares should be case-insensitive, the content of the list should be sorted @@ -205,7 +205,7 @@ static LRESULT change_selection(IAutoCompleteImpl *ac, HWND hwnd, UINT key) } } } - else if (key == VK_UP) + else if (key == VK_UP || (key == VK_TAB && (GetKeyState(VK_SHIFT) & 0x8000))) sel = ((sel - 1) < -1) ? count - 1 : sel - 1; else sel = ((sel + 1) >= count) ? -1 : sel + 1; @@ -391,6 +391,14 @@ static LRESULT ACEditSubclassProc_KeyDown(IAutoCompleteImpl *ac, HWND hwnd, UINT if (select_item_with_return_key(ac, hwnd)) return 0; break; + case VK_TAB: + if ((ac->options & (ACO_AUTOSUGGEST | ACO_USETAB)) == (ACO_AUTOSUGGEST | ACO_USETAB) + && IsWindowVisible(ac->hwndListBox) && !(GetKeyState(VK_CONTROL) & 0x8000)) + { + ac->no_fwd_char = '\t'; + return change_selection(ac, hwnd, wParam); + } + break; case VK_UP: case VK_DOWN: case VK_PRIOR: @@ -646,7 +654,6 @@ static HRESULT WINAPI IAutoComplete2_fnInit(
if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); - if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n");
if (!hwndEdit || !punkACL)