 +
 +#endif  // LIBRARIES_NACL_MOUNTS_BASE_MAINTHREADRUNNER_H_
 diff -urN SDL-1.2.14/src/video/nacl/SDL_naclevents.cc SDL-1.2.14-nacl/src/video/nacl/SDL_naclevents.cc
---- SDL-1.2.14/src/video/nacl/SDL_naclevents.cc	1970-01-01 03:00:00.000000000 +0300
-+++ SDL-1.2.14-nacl/src/video/nacl/SDL_naclevents.cc	2011-11-30 16:15:14.093546234 +0400
-@@ -0,0 +1,196 @@
+--- SDL-1.2.14/src/video/nacl/SDL_naclevents.cc	1970-01-01 08:00:00.000000000 +0800
++++ SDL-1.2.14-nacl/src/video/nacl/SDL_naclevents.cc	2011-12-05 19:54:13.000000000 +0800
+@@ -0,0 +1,248 @@
 +#include "SDL_config.h"
 +
 +#include "SDL_nacl.h"

+}
+
+void SDL_NACL_PushEvent(const pp::InputEvent& ppevent) {
+  SDL_keysym keysym;
+  struct SDL_NACL_Event* event =
+    (struct SDL_NACL_Event*)malloc(sizeof(struct SDL_NACL_Event));

+    keysym.scancode = keyboard_event->GetKeyCode();
+    keysym.unicode = keyboard_event->GetCharacterText().AsString()[0];
+    keysym.sym = translateKey(keysym.scancode);
+    if (event->type == PP_INPUTEVENT_TYPE_KEYDOWN) {
+      last_scancode = keysym.scancode;
+      if (keysym.sym >= ' ' &&  keysym.sym <= 126) {
+        return;
+      }
+    } else if (event->type == PP_INPUTEVENT_TYPE_CHAR) {
+      if (keysym.sym >= ' ' &&  keysym.sym <= 126) {
+        keysym.scancode = translateAscii(keysym.unicode);
+        keysym.sym = translateKey(keysym.scancode);
+      } else if (last_scancode) {
+        keysym.scancode = last_scancode;
+        keysym.sym = translateKey(keysym.scancode);
+      }
+    } else {  // event->type == PP_INPUTEVENT_TYPE_KEYUP
+      last_scancode = 0;
+    }
+    keysym.mod = KMOD_NONE;
+    event->keysym = keysym;
