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: 55
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: 6363
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: 55
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: Mon Oct 23 04:46:11 GMT 2017

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

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