]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Fix firefox '-' key mapping.
authorJoel Martin <github@martintribe.org>
Sun, 18 Apr 2010 21:19:10 +0000 (16:19 -0500)
committerJoel Martin <github@martintribe.org>
Sun, 18 Apr 2010 21:19:10 +0000 (16:19 -0500)
TODO
canvas.js

diff --git a/TODO b/TODO
index 74c97dafdbc82ea7cdf03391f5e4a092d1ce685a..d9eea2367fc8af1a6170ca1aea721e53a64cd5ba 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-- Fix firefox key codes ('-', etc)
-
 - Make packet sequence number optional based on WebSockets 'path'.
 
 - Better status and error feedback.
index 4f2640df8f992634a86b23a71afa169cf1332834..5a95172684f1970b8d5f2faa6a7c6f68f508f9f9 100644 (file)
--- a/canvas.js
+++ b/canvas.js
@@ -24,7 +24,6 @@ mouseUp: function (e) {
 
 mouseMove: function (e) {
     var evt = e.event || window.event;
-    //e.stop();
     console.log('mouse ' + evt.which + '/' + evt.button + ' up:' +
             (evt.clientX - Canvas.c_x) + "," + (evt.clientY - Canvas.c_y));
 },
@@ -164,7 +163,6 @@ copyImage: function(old_x, old_y, new_x, new_y, width, height) {
 getKeysym: function(e) {
     evt = e.event || window.event;
     var keysym;
-    //console.log(dirObj(e, null, 1));
 
     /* Remap modifier and special keys */
     switch ( evt.keyCode ) {
@@ -205,7 +203,9 @@ getKeysym: function(e) {
         case 186       : keysym = 59; break; // ;  (IE)
         case 187       : keysym = 61; break; // =  (IE)
         case 188       : keysym = 44; break; // ,  (Mozilla, IE)
-        //case 109       :                     // -  (Mozilla)
+        case 109       :                     // -  (Mozilla)
+            if (Browser.Engine.gecko)
+                         keysym = 45; break;
         case 189       : keysym = 45; break; // -  (IE)
         case 190       : keysym = 46; break; // .  (Mozilla, IE)
         case 191       : keysym = 47; break; // /  (Mozilla, IE)