From 80d98f05b22838fd1104e4f86584d1ca04f5241d Mon Sep 17 00:00:00 2001 From: Vince Date: Tue, 29 Sep 2020 13:20:24 -0400 Subject: [PATCH] Add tab stops in Function List Add tab stops in Function List to switch between search field and list. Fix 8665, close #8924 --- .../FunctionList/functionListPanel.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index 414f44df0..f5033923a 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -575,6 +575,10 @@ void FunctionListPanel::notified(LPNMHDR notification) } PostMessage(_hParent, WM_COMMAND, SCEN_SETFOCUS << 16, reinterpret_cast((*_ppEditView)->getHSelf())); } + else if (ptvkd->wVKey == VK_TAB) + { + ::SetFocus(_hSearchEdit); + } else if (ptvkd->wVKey == VK_ESCAPE) { PostMessage(_hParent, WM_COMMAND, SCEN_SETFOCUS << 16, reinterpret_cast((*_ppEditView)->getHSelf())); @@ -696,6 +700,11 @@ static LRESULT CALLBACK funclstSearchEditProc(HWND hwnd, UINT message, WPARAM wP ::SendMessage(hwnd, WM_SETTEXT, 0, reinterpret_cast(TEXT(""))); return FALSE; } + else if (wParam == VK_TAB) + { + ::SendMessage(GetParent(hwnd), WM_COMMAND, VK_TAB, 1); + return FALSE; + } } } return oldFunclstSearchEditProc(hwnd, message, wParam, lParam); @@ -842,6 +851,14 @@ INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPA } } } + else if (wParam == VK_TAB) + { + if (_treeViewSearchResult.isVisible()) + ::SetFocus(_treeViewSearchResult.getHSelf()); + else + ::SetFocus(_treeView.getHSelf()); + return TRUE; + } switch (LOWORD(wParam)) {