From 2231b514e3646c6762818926b45b836e4263c0ea Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 28 Jan 2014 17:39:18 +0100 Subject: initial import --- chrome/content/vkgdkmap.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 chrome/content/vkgdkmap.js (limited to 'chrome/content/vkgdkmap.js') 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 + +} -- cgit v1.2.3