summaryrefslogtreecommitdiff
path: root/chrome/content/vkgdkmap.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/content/vkgdkmap.js')
-rw-r--r--chrome/content/vkgdkmap.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/content/vkgdkmap.js b/chrome/content/vkgdkmap.js
new file mode 100644
index 0000000..35a8fc5
--- /dev/null
+++ b/chrome/content/vkgdkmap.js
@@ -0,0 +1,27 @@
+var EXPORTED_SYMBOLS = [ "vkgdkmap" ];
+
+const Cu = Components.utils;
+
+Cu.import("chrome://topmenu/content/gdk.js");
+
+/* Hardcoding DOM_VK_* constants, how ugly. */
+/* But how to get a window scope from here? Need to access KeyEvent. */
+
+vkgdkmap = {
+ VK_F1 : gdk.GDK_KEY_F1,
+ VK_F2 : gdk.GDK_KEY_F2,
+ VK_F3 : gdk.GDK_KEY_F3,
+ VK_F4 : gdk.GDK_KEY_F4,
+ VK_F5 : gdk.GDK_KEY_F5,
+ VK_F6 : gdk.GDK_KEY_F6,
+ VK_F7 : gdk.GDK_KEY_F7,
+ VK_F8 : gdk.GDK_KEY_F8,
+ VK_F9 : gdk.GDK_KEY_F9,
+ VK_F10 : gdk.GDK_KEY_F10,
+ VK_F11 : gdk.GDK_KEY_F11,
+ VK_F12 : gdk.GDK_KEY_F12,
+
+ VK_TAB : gdk.GDK_KEY_Tab,
+ VK_DELETE : gdk.GDK_KEY_Delete
+
+}