Commit b4a979a0 authored by samhed's avatar samhed

Added a new file for the key symbols, using the well recognized names for the constants from X11:

* The list is found in /usr/include/X11/keysymdef.h
* I did only include the most common symbols for now..
parent 04d6a834
......@@ -10,6 +10,7 @@ is not limited to):
include/display.js
include/input.js
include/jsunzip.js
include/keysym.js
include/logo.js
include/rfb.js
include/ui.js
......
This diff is collapsed.
......@@ -14,7 +14,8 @@
// Load supporting scripts
window.onscriptsload = function () { UI.load(); };
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"input.js", "display.js", "jsunzip.js", "rfb.js"]);
"input.js", "display.js", "jsunzip.js", "rfb.js",
"keysym.js"]);
var UI = {
......@@ -764,43 +765,39 @@ showExtraKeys: function() {
},
toggleCtrl: function() {
var ctrlKeysum = 0xFFE3;
UI.keepKeyboard();
if(UI.ctrlOn === false) {
UI.rfb.sendKey(ctrlKeysum, true);
UI.rfb.sendKey(XK_Control_L, true);
$D('toggleCtrlButton').className = "noVNC_status_button_selected";
UI.ctrlOn = true;
} else if(UI.ctrlOn === true) {
UI.rfb.sendKey(ctrlKeysum, false);
UI.rfb.sendKey(XK_Control_L, false);
$D('toggleCtrlButton').className = "noVNC_status_button";
UI.ctrlOn = false;
}
},
toggleAlt: function() {
var altKeysum = 0xFFE9;
UI.keepKeyboard();
if(UI.altOn === false) {
UI.rfb.sendKey(altKeysum, true);
UI.rfb.sendKey(XK_Alt_L, true);
$D('toggleAltButton').className = "noVNC_status_button_selected";
UI.altOn = true;
} else if(UI.altOn === true) {
UI.rfb.sendKey(altKeysum, false);
UI.rfb.sendKey(XK_Alt_L, false);
$D('toggleAltButton').className = "noVNC_status_button";
UI.altOn = false;
}
},
sendTab: function() {
var tabKeysum = 0xFF09;
UI.keepKeyboard();
UI.rfb.sendKey(tabKeysum);
UI.rfb.sendKey(XK_Tab);
},
sendEsc: function() {
var escKeysum = 0xFF1B;
UI.keepKeyboard();
UI.rfb.sendKey(escKeysum);
UI.rfb.sendKey(XK_Escape);
},
setKeyboard: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment