This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Quoting conversation from nb_usability mailing list: [tboudreau]: I remember when we introduced sliding views a while back, at least Dafe and I discussed the idea that pressing Escape in any view in the IDE should automatically send focus to the editor (unless you're dismissing quick search or an inline editor or similar - pretty easy to check if focus is on a JTextComponent and do nothing). Anyway, I notice we haven't done that (though I thought we did at least for a while). We should do it, unless there's some major blocking reason. [dsimonek] I remember, would be useful, but not as trivial as it may seem: - Esc is used for dialog escaping, shouldn't be mixed (should focus what was focused before, not editor by first key press) - Esc is used for escaping DnD, the same as above - Esc is used for escaping from sliding views So for example in quick search inside sliding view, first Esc will dismiss quick search, second one sliding view and third one will finally focus editor. Wow, truly hierarchical escape! :-) Complex, but not bad...
Btw, patch would be welcomed. Only fully working! :-)
In a smaller project with similar popups, I just did something like this: getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "hidePopup"); //NOI18N getActionMap().put ("hidePopup", popupComponentManager); //NOI18N where popupComponentManager.hide() gets called whenever esc is pressed - if something else has already consumed the key event, it shouldn't be triggered. Can't guarantee it will work given the weird stuff we do with actionmaps & such, but it might just work fine.