How are people detecting numpad keypresses?

Monkey Forums/Monkey Programming/How are people detecting numpad keypresses?

Grey Alien(Posted 2013) [#1]
If GLFW and Flash I'd like to use 456789 (for movement) but not to clash with the normal number keys. There are no keycodes for them and a forum search didn't reveal any clues. Thanks for any help!


Grey Alien(Posted 2013) [#2]
Bumping this because I just made an online Math game and of course people want to use the numpad :-(

http://www.kongregate.com/games/GreyAlien/math-forever-2


muddy_shoes(Posted 2013) [#3]
As I mentioned on Twitter, the Flash keycodes are passed through but just not listed as Mojo constants.

GLFW can be made to support them by adding this to the switch statement in the TransKey function in mojo.glfw.cpp:




Grey Alien(Posted 2013) [#4]
Thanks!

@Mark Sibly: Please can you add those keycodes to the official GLFW version?

Here are the Flash Keycodes for reference:

Numpad 0 = 96

Numpad 1 = 97

Numpad 2 = 98

Numpad 3 = 99

Numpad 4 = 100

Numpad 5 = 101

Numpad 6 = 102

Numpad 7 = 103

Numpad 8 = 104

Numpad 9 = 105


MikeHart(Posted 2013) [#5]
@Grey, I would post this in the bug forum as Mark will most likely not notice this here. I doubt that he will read every single forum post.


Grey Alien(Posted 2013) [#6]
OK done: http://www.monkeycoder.co.nz/Community/posts.php?topic=4693