diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-10 11:59:23 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-10 11:59:23 -0800 |
commit | 42d72b79a14dc5055fe7025877484a17295fcb60 (patch) | |
tree | 57e4f9f1cbc8eeb3ddd8955b64cbbf37cb69459a /src | |
parent | dfd9cf8cc063158cbaeecc81bc0e4b27ef6bec20 (diff) | |
parent | e9e70172fabe16015246cb52003d9b058b69d63f (diff) |
Merge pull request #1987 from AlexPerrot/glut_numpad
Adding numpad keycodes to library_glut.js
Diffstat (limited to 'src')
-rw-r--r-- | src/library_glut.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library_glut.js b/src/library_glut.js index 76a52b73..65ac10c4 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -122,6 +122,8 @@ var LibraryGLUT = { return keycode; // numeric TODO handle shift? if (65 <= keycode && keycode <= 90) return event['shiftKey'] ? keycode : keycode + 32; + if (96 <= keycode && keycode <= 105) + return keycode - 48; // numpad numbers if (106 <= keycode && keycode <= 111) return keycode - 106 + 42; // *,+-./ TODO handle shift? |