  
        // This logic comes directly from the sdl implementation. We cannot
        // call preventDefault on all keydown events otherwise onKeyPress will
-@@ -391,7 +429,17 @@ var LibraryGLFW = {
+@@ -391,7 +402,17 @@ var LibraryGLFW = {
      },
  
      onKeyup: function(event) {

     Module["canvas"].removeEventListener("mousemove", GLFW.onMousemove, true);
     Module["canvas"].removeEventListener("mousedown", GLFW.onMouseButtonDown, true);
     Module["canvas"].removeEventListener("mouseup", GLFW.onMouseButtonUp, true);
@@ -1230,6 +1309,17 @@ var LibraryGLFW = {
   glfwGetInputMode: function(winid, mode) {
     var win = GLFW.WindowFromId(winid);
     if (!win) return;

 
       // correct unicode charCode is only available with onKeyPress event
       var charCode = event.charCode;
@@ -357,16 +359,17 @@ var LibraryGLFW = {
 #endif
     },
 
