aboutsummaryrefslogtreecommitdiff
path: root/src/library_glut.js
diff options
context:
space:
mode:
authorPierre Renaux <pierre@talansoft.com>2012-04-04 13:18:57 +0800
committerPierre Renaux <pierre@talansoft.com>2012-04-06 07:23:03 +0800
commit7576b2ae14865d3df282411c92d72033d0c336c4 (patch)
treebb4856171323cc765e6a5aebfa362e4b5f898c12 /src/library_glut.js
parent43a676c172531d67c60074f51d205b65611cb65b (diff)
[src/library_gl.js]: GLUT.getSpecialKey handles GLUT_KEY_SHIFT/CONTROL/ALT_R/L ;
Diffstat (limited to 'src/library_glut.js')
-rw-r--r--src/library_glut.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/library_glut.js b/src/library_glut.js
index 11e448b2..cdbb347b 100644
--- a/src/library_glut.js
+++ b/src/library_glut.js
@@ -72,6 +72,30 @@ var LibraryGLUT = {
case 0x24 /*DOM_VK_HOME*/: key = 106 /* GLUT_KEY_HOME */; break;
case 0x23 /*DOM_VK_END*/: key = 107 /* GLUT_KEY_END */; break;
case 0x2d /*DOM_VK_INSERT*/: key = 108 /* GLUT_KEY_INSERT */; break;
+
+ case 16 /*DOM_VK_SHIFT*/:
+ case 0x05 /*DOM_VK_LEFT_SHIFT*/:
+ key = 112 /* GLUT_KEY_SHIFT_L */;
+ break;
+ case 0x06 /*DOM_VK_RIGHT_SHIFT*/:
+ key = 113 /* GLUT_KEY_SHIFT_R */;
+ break;
+
+ case 17 /*DOM_VK_CONTROL*/:
+ case 0x03 /*DOM_VK_LEFT_CONTROL*/:
+ key = 114 /* GLUT_KEY_CONTROL_L */;
+ break;
+ case 0x04 /*DOM_VK_RIGHT_CONTROL*/:
+ key = 115 /* GLUT_KEY_CONTROL_R */;
+ break;
+
+ case 18 /*DOM_VK_ALT*/:
+ case 0x02 /*DOM_VK_LEFT_ALT*/:
+ key = 116 /* GLUT_KEY_ALT_L */;
+ break;
+ case 0x01 /*DOM_VK_RIGHT_ALT*/:
+ key = 117 /* GLUT_KEY_ALT_R */;
+ break;
};
return key;
},