Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Getting KeyCode for NUMPAD_ENTER in JavaFX
Getting KeyCode for NUMPAD_ENTER in JavaFX [message #1744358] Mon, 26 September 2016 09:58 Go to next message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 66
Registered: January 2013
Member
I hope this is an appropriate place for this question, I didn't find any other forum for JavaFX problems....

However, here is my problem:

We want to listen to the ENTER key to notice when the user finishes an input.

Checking if the "normal" ENTER key is pressed, is no problem.

KeyCode.ENTER.equals(event.getCode())


event is an instance of a JavaFX-KeyEvent.


BUT if we want to listen if the Enter-key on the NUMPAD is pressed, this check will not work, because event.getCode() returns UNDEFINED in that case...

Is it possible to check if the ENTER-key on the NUMPAD is pressed? Or isn't this possible at all?
Re: Getting KeyCode for NUMPAD_ENTER in JavaFX [message #1744430 is a reply to message #1744358] Mon, 26 September 2016 20:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
It looks to me like you can't find this out. No idea why because any other numpad-key can be detected - the only idea i have is that you you need to listen to KeyTyped and check the char-sequence Sad
Re: Getting KeyCode for NUMPAD_ENTER in JavaFX [message #1744443 is a reply to message #1744430] Tue, 27 September 2016 06:28 Go to previous message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 66
Registered: January 2013
Member
Hy Tom,

thanks for your fast reply =).

Listening for onKeyTyped() works! =)
Then we are checking the character like this: "\r".equals(event.getCharacter());




Previous Topic:Implementation of PerspectiveTransitionService / WindowTransitionService
Next Topic:E4 Tools with e(fx)clipse
Goto Forum:
  


Current Time: Thu Apr 25 21:27:16 GMT 2024

Powered by FUDForum. Page generated in 0.03393 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top