-
Notifications
You must be signed in to change notification settings - Fork 236
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
Execute some code after ENTER Key pressed #319
Comments
Hi, if you are using 0.6.10, you actually need to look at this version of the file, which uses an older version of WellBehavedFX. You will need to do something like this: // define the event handler
EventHandler<KeyEvent> handler = EventHandlerHelper
.on(keyPressed(ENTER)).act(e -> { /* code to execute on Enter goes here */ })
.create();
// install the event handler
EventHandlerHelper.install(area.onKeyPressedProperty(), handler); |
Thank for answer. But this code override the Enter key behavior. I just need to add something Le mer. 25 mai 2016 18:48, Tomas Mikula notifications@github.com a écrit :
|
The most reliable way is to first replicate in your handler whatever EventHandler<KeyEvent> handler = EventHandlerHelper
.on(keyPressed(ENTER)).act(e -> {
area.replaceSelection("\n");
/* your code goes here */
})
.create(); |
You could also just try using the usual |
Ok thanks for your advice. It's ok for me |
Hi,
What is the best way with RichtexFx to execute some code after ENTER Key ? I use
0.6.10
release.I want if possible override this line for example, but i don't know how i can do that.
Can you explain me please ?
The text was updated successfully, but these errors were encountered: