-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pressing ESC while searching clears searchfield and selects first available entry #3760
Pressing ESC while searching clears searchfield and selects first available entry #3760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick follow-up! The code is almost good to go.
|
||
// Clears search on ESC & select first entry, if available | ||
searchField.setOnKeyPressed((event -> { | ||
if (event.getCode() == KeyCode.ESCAPE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Clear search" shortcut is customizable. Please use
CLEAR_SEARCH("Clear search", Localization.lang("Clear search"), "ESCAPE", KeyBindingCategory.SEARCH), |
to check for the correct key (using a KeyBindingRepository).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just take a look at the setupKeyBindings in the EntryEditor, we use that code in several other classes, too.
No activity. @tobiasdiez or @Siedlerchr please take over or just close this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now finished the code. For me, this is now ready for merge.
As the title describes, search field gets cleared when pressing the escape key during search and selects first available entry, this time using JavaFX.
Description already existent in CHANGELOG.md from earlier pull request (on older Swing platform).
Reference: #3747