IDEMPIERE-4671 : Shortcut for the menu box (#2054)

This commit is contained in:
Zuhri Utama 2023-10-14 20:47:10 +07:00 committed by GitHub
parent 793ffe6aef
commit 2cbf7438fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -339,7 +339,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
keyListener = new Keylistener();
keyListener.setPage(this.getPage());
keyListener.setCtrlKeys("@a@c@d@e@f@h@l@m@n@o@p@q@r@s@t@w@x@z@#left@#right@#up@#down@#home@#end#enter^u@u@#pgdn@#pgup$#f2^#f2");
keyListener.setCtrlKeys("@a@c@d@e@f@g@h@l@m@n@o@p@q@r@s@t@w@x@z@#left@#right@#up@#down@#home@#end#enter^u@u@#pgdn@#pgup$#f2^#f2");
keyListener.setAutoBlur(false);
//create IDesktop instance

View File

@ -67,6 +67,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
private MenuTreePanel menuTreePanel;
private GlobalSearch globalSearch;
/**
* Default constructor
*/
@ -124,7 +126,7 @@ public class HeaderPanel extends Panel implements EventListener<Event>
* Create global search box
*/
protected void createSearchPanel() {
GlobalSearch globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
globalSearch = new GlobalSearch(new MenuSearchController(menuTreePanel.getMenuTree()));
Component stub = getFellow("menuLookup");
stub.getParent().insertBefore(globalSearch, stub);
stub.detach();
@ -161,6 +163,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
popMenu.setFocus(true);
}else if (ke.getKeyCode() == 27) {
popMenu.close();
}else if (ke.getKeyCode() == 71) {
globalSearch.setFocus(true);
}
} else if(event.getName().equals(ZoomEvent.EVENT_NAME)) {
Clients.clearBusy();