From 1fbcb3f7bf7ddf955193d798837ab88cf2815112 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 23 Feb 2014 18:32:00 +0100 Subject: convert into a restartless extension --- chrome/content/vkgdkmap.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'chrome/content/vkgdkmap.js') diff --git a/chrome/content/vkgdkmap.js b/chrome/content/vkgdkmap.js index 35a8fc5..088a212 100644 --- a/chrome/content/vkgdkmap.js +++ b/chrome/content/vkgdkmap.js @@ -1,13 +1,20 @@ +"use strict"; + 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. */ +var vkgdkmap = { + VK_TAB : gdk.GDK_KEY_Tab, + VK_RETURN : gdk.GDK_KEY_Return, + + VK_HOME : gdk.GDK_KEY_Home, + VK_END : gdk.GDK_KEY_End, + + VK_DELETE : gdk.GDK_KEY_Delete, -vkgdkmap = { VK_F1 : gdk.GDK_KEY_F1, VK_F2 : gdk.GDK_KEY_F2, VK_F3 : gdk.GDK_KEY_F3, @@ -20,8 +27,4 @@ vkgdkmap = { 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