QEMU RFB extension - new file xtscancodes.js

This new file contains the XT scancode mapping that
the extension will use in rfb.js file.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
This commit is contained in:
Daniel Henrique Barboza 2016-08-26 15:47:03 -03:00
parent aa171cb607
commit 7ab542ef74
8 changed files with 167 additions and 14 deletions

View File

@ -17,6 +17,7 @@ is not limited to):
include/util.js
include/websock.js
include/webutil.js
include/xtscancodes.js
The HTML, CSS, font and images files that included with the noVNC
source distibution (or repository) are not considered part of the
@ -45,7 +46,7 @@ the noVNC core library. Here is a list of those files and the original
licenses (all MPL 2.0 compatible):
include/base64.js : MPL 2.0
include/des.js : Various BSD style licenses
include/chrome-app/tcp-stream.js
@ -53,7 +54,7 @@ licenses (all MPL 2.0 compatible):
utils/websockify
utils/websocket.py : LGPL 3
utils/inflator.partial.js
include/inflator.js : MIT (for pako)

View File

@ -18,8 +18,9 @@ var UI;
// Load supporting scripts
window.onscriptsload = function () { UI.load(); };
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"rfb.js", "keysym.js", "inflator.js"]);
"keysymdef.js", "xtscancodes.js", "keyboard.js",
"input.js", "display.js", "rfb.js", "keysym.js",
"inflator.js"]);
UI = {

146
include/xtscancodes.js Normal file
View File

@ -0,0 +1,146 @@
var XtScancode = {};
XtScancode["Escape"] = 0x0001;
XtScancode["Digit1"] = 0x0002;
XtScancode["Digit2"] = 0x0003;
XtScancode["Digit3"] = 0x0004;
XtScancode["Digit4"] = 0x0005;
XtScancode["Digit5"] = 0x0006;
XtScancode["Digit6"] = 0x0007;
XtScancode["Digit7"] = 0x0008;
XtScancode["Digit8"] = 0x0009;
XtScancode["Digit9"] = 0x000A;
XtScancode["Digit0"] = 0x000B;
XtScancode["Minus"] = 0x000C;
XtScancode["Equal"] = 0x000D;
XtScancode["Backspace"] = 0x000E;
XtScancode["Tab"] = 0x000F;
XtScancode["KeyQ"] = 0x0010;
XtScancode["KeyW"] = 0x0011;
XtScancode["KeyE"] = 0x0012;
XtScancode["KeyR"] = 0x0013;
XtScancode["KeyT"] = 0x0014;
XtScancode["KeyY"] = 0x0015;
XtScancode["KeyU"] = 0x0016;
XtScancode["KeyI"] = 0x0017;
XtScancode["KeyO"] = 0x0018;
XtScancode["KeyP"] = 0x0019;
XtScancode["BracketLeft"] = 0x001A;
XtScancode["BracketRight"] = 0x001B;
XtScancode["Enter"] = 0x001C;
XtScancode["ControlLeft"] = 0x001D;
XtScancode["KeyA"] = 0x001E;
XtScancode["KeyS"] = 0x001F;
XtScancode["KeyD"] = 0x0020;
XtScancode["KeyF"] = 0x0021;
XtScancode["KeyG"] = 0x0022;
XtScancode["KeyH"] = 0x0023;
XtScancode["KeyJ"] = 0x0024;
XtScancode["KeyK"] = 0x0025;
XtScancode["KeyL"] = 0x0026;
XtScancode["Semicolon"] = 0x0027;
XtScancode["Quote"] = 0x0028;
XtScancode["Backquote"] = 0x0029;
XtScancode["ShiftLeft"] = 0x002A;
XtScancode["Backslash"] = 0x002B;
XtScancode["KeyZ"] = 0x002C;
XtScancode["KeyX"] = 0x002D;
XtScancode["KeyC"] = 0x002E;
XtScancode["KeyV"] = 0x002F;
XtScancode["KeyB"] = 0x0030;
XtScancode["KeyN"] = 0x0031;
XtScancode["KeyM"] = 0x0032;
XtScancode["Comma"] = 0x0033;
XtScancode["Period"] = 0x0034;
XtScancode["Slash"] = 0x0035;
XtScancode["ShiftRight"] = 0x0036;
XtScancode["NumpadMultiply"] = 0x0037;
XtScancode["AltLeft"] = 0x0038;
XtScancode["Space"] = 0x0039;
XtScancode["CapsLock"] = 0x003A;
XtScancode["F1"] = 0x003B;
XtScancode["F2"] = 0x003C;
XtScancode["F3"] = 0x003D;
XtScancode["F4"] = 0x003E;
XtScancode["F5"] = 0x003F;
XtScancode["F6"] = 0x0040;
XtScancode["F7"] = 0x0041;
XtScancode["F8"] = 0x0042;
XtScancode["F9"] = 0x0043;
XtScancode["F10"] = 0x0044;
XtScancode["Pause"] = 0xE045;
XtScancode["ScrollLock"] = 0x0046;
XtScancode["Numpad7"] = 0x0047;
XtScancode["Numpad8"] = 0x0048;
XtScancode["Numpad9"] = 0x0049;
XtScancode["NumpadSubtract"] = 0x004A;
XtScancode["Numpad4"] = 0x004B;
XtScancode["Numpad5"] = 0x004C;
XtScancode["Numpad6"] = 0x004D;
XtScancode["NumpadAdd"] = 0x004E;
XtScancode["Numpad1"] = 0x004F;
XtScancode["Numpad2"] = 0x0050;
XtScancode["Numpad3"] = 0x0051;
XtScancode["Numpad0"] = 0x0052;
XtScancode["NumpadDecimal"] = 0x0053;
XtScancode["IntlBackslash"] = 0x0056;
XtScancode["F11"] = 0x0057;
XtScancode["F12"] = 0x0058;
XtScancode["IntlYen"] = 0x007D;
XtScancode["MediaTrackPrevious"] = 0xE010;
XtScancode["MediaTrackNext"] = 0xE019;
XtScancode["NumpadEnter"] = 0xE01C;
XtScancode["ControlRight"] = 0xE01D;
XtScancode["VolumeMute"] = 0xE020;
XtScancode["MediaPlayPause"] = 0xE022;
XtScancode["MediaStop"] = 0xE024;
XtScancode["VolumeDown"] = 0xE02E;
XtScancode["VolumeUp"] = 0xE030;
XtScancode["BrowserHome"] = 0xE032;
XtScancode["NumpadDivide"] = 0xE035;
XtScancode["PrintScreen"] = 0xE037;
XtScancode["AltRight"] = 0xE038;
XtScancode["NumLock"] = 0x0045;
XtScancode["Home"] = 0xE047;
XtScancode["ArrowUp"] = 0xE048;
XtScancode["PageUp"] = 0xE049;
XtScancode["ArrowLeft"] = 0xE04B;
XtScancode["ArrowRight"] = 0xE04D;
XtScancode["End"] = 0xE04F;
XtScancode["ArrowDown"] = 0xE050;
XtScancode["PageDown"] = 0xE051;
XtScancode["Insert"] = 0xE052;
XtScancode["Delete"] = 0xE053;
XtScancode["OSLeft"] = 0xE05B;
XtScancode["OSRight"] = 0xE05C;
XtScancode["ContextMenu"] = 0xE05D;
XtScancode["BrowserSearch"] = 0xE065;
XtScancode["BrowserFavorites"] = 0xE066;
XtScancode["BrowserRefresh"] = 0xE067;
XtScancode["BrowserStop"] = 0xE068;
XtScancode["BrowserForward"] = 0xE069;
XtScancode["BrowserBack"] = 0xE06A;
XtScancode["NumpadComma"] = 0x007E;
XtScancode["NumpadEqual"] = 0x0059;
XtScancode["F13"] = 0x0064;
XtScancode["F14"] = 0x0065;
XtScancode["F15"] = 0x0066;
XtScancode["F16"] = 0x0067;
XtScancode["F17"] = 0x0068;
XtScancode["F18"] = 0x0069;
XtScancode["F19"] = 0x006A;
XtScancode["F20"] = 0x006B;
XtScancode["F21"] = 0x006C;
XtScancode["F22"] = 0x006D;
XtScancode["F23"] = 0x006E;
XtScancode["F24"] = 0x0076;
XtScancode["KanaMode"] = 0x0070;
XtScancode["Lang2"] = 0x0071;
XtScancode["Lang1"] = 0x0072;
XtScancode["IntlRo"] = 0x0073;
XtScancode["Convert"] = 0x0079;
XtScancode["NonConvert"] = 0x007B;
XtScancode["LaunchApp2"] = 0xE021;
XtScancode["Power"] = 0xE05E;
XtScancode["LaunchApp1"] = 0xE06B;
XtScancode["LaunchMail"] = 0xE06C;
XtScancode["MediaSelect"] = 0xE06D;

View File

@ -115,6 +115,7 @@ module.exports = function(config) {
'include/base64.js',
'include/keysym.js',
'include/keysymdef.js',
'include/xtscancodes.js',
'include/keyboard.js',
'include/input.js',
'include/websock.js',

View File

@ -20,16 +20,17 @@
</body>
<!--
<script type='text/javascript'
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
-->
<script src="../include/util.js"></script>
<script src="../include/webutil.js"></script>
<script src="../include/webutil.js"></script>
<script src="../include/base64.js"></script>
<script src="../include/keysym.js"></script>
<script src="../include/keysymdef.js"></script>
<script src="../include/keyboard.js"></script>
<script src="../include/input.js"></script>
<script src="../include/xtscancodes.js"></script>
<script src="../include/keyboard.js"></script>
<script src="../include/input.js"></script>
<script src="../include/display.js"></script>
<script>
var msg_cnt = 0, iterations,

View File

@ -50,8 +50,9 @@
// Load supporting scripts
Util.load_scripts(["base64.js", "websock.js", "des.js", "keysym.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"rfb.js", "playback.js", "inflator.js", fname]);
"keysymdef.js", "xtscancodes.js", "keyboard.js",
"input.js", "display.js", "rfb.js", "playback.js",
"inflator.js", fname]);
} else {
msg("Must specifiy data=FOO.js in query string.");
}

View File

@ -60,8 +60,9 @@
message("Loading " + fname);
// Load supporting scripts
Util.load_scripts(["base64.js", "websock.js", "des.js", "keysym.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"rfb.js", "playback.js", "inflator.js", fname]);
"keysymdef.js", "xtscancodes.js", "keyboard.js",
"input.js", "display.js", "rfb.js", "playback.js",
"inflator.js", fname]);
} else {
message("Must specify data=FOO in query string.");

View File

@ -78,8 +78,9 @@
// Load supporting scripts
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"inflator.js", "rfb.js", "keysym.js"]);
"keysymdef.js", "xtscancodes.js", "keyboard.js",
"input.js", "display.js", "inflator.js", "rfb.js",
"keysym.js"]);
var rfb;
var resizeTimeout;