Skip to content

Commit

Permalink
[src/library_gl.js]: GLUT.getSpecialKey handles GLUT_KEY_SHIFT/CONTRO…
Browse files Browse the repository at this point in the history
…L/ALT_R/L ;
  • Loading branch information
prenaux committed Apr 5, 2012
1 parent 43a676c commit 7576b2a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/library_glut.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 7576b2a

Please sign in to comment.