016bf59397f337967cac74bcd233e0c5b484da59
[guacamole.git] / web / guacamole-default-webapp / src / main / webapp / guac-web-lib / javascript / keymap.js
1
2 /*
3  *  Guacamole - Clientless Remote Desktop
4  *  Copyright (C) 2010  Michael Jumper
5  *
6  *  This program is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU Affero General Public License as published by
8  *  the Free Software Foundation, either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Affero General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Affero General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20
21 // Keymap
22
23 var unshiftedKeySym = new Array();
24 unshiftedKeySym[8]   = 0xFF08; // backspace
25 unshiftedKeySym[9]   = 0xFF09; // tab
26 unshiftedKeySym[13]  = 0xFF0D; // enter
27 unshiftedKeySym[16]  = 0xFFE1; // shift
28 unshiftedKeySym[17]  = 0xFFE3; // ctrl
29 unshiftedKeySym[18]  = 0xFFE9; // alt
30 unshiftedKeySym[19]  = 0xFF13; // pause/break
31 unshiftedKeySym[20]  = 0xFFE5; // caps lock
32 unshiftedKeySym[27]  = 0xFF1B; // escape
33 unshiftedKeySym[33]  = 0xFF55; // page up
34 unshiftedKeySym[34]  = 0xFF56; // page down
35 unshiftedKeySym[35]  = 0xFF57; // end
36 unshiftedKeySym[36]  = 0xFF50; // home
37 unshiftedKeySym[37]  = 0xFF51; // left arrow
38 unshiftedKeySym[38]  = 0xFF52; // up arrow
39 unshiftedKeySym[39]  = 0xFF53; // right arrow
40 unshiftedKeySym[40]  = 0xFF54; // down arrow
41 unshiftedKeySym[45]  = 0xFF63; // insert
42 unshiftedKeySym[46]  = 0xFFFF; // delete
43 unshiftedKeySym[91]  = 0xFFEB; // left window key (super_l)
44 unshiftedKeySym[92]  = 0xFF67; // right window key (menu key?)
45 unshiftedKeySym[93]  = null; // select key
46 unshiftedKeySym[112] = 0xFFBE; // f1
47 unshiftedKeySym[113] = 0xFFBF; // f2
48 unshiftedKeySym[114] = 0xFFC0; // f3
49 unshiftedKeySym[115] = 0xFFC1; // f4
50 unshiftedKeySym[116] = 0xFFC2; // f5
51 unshiftedKeySym[117] = 0xFFC3; // f6
52 unshiftedKeySym[118] = 0xFFC4; // f7
53 unshiftedKeySym[119] = 0xFFC5; // f8
54 unshiftedKeySym[120] = 0xFFC6; // f9
55 unshiftedKeySym[121] = 0xFFC7; // f10
56 unshiftedKeySym[122] = 0xFFC8; // f11
57 unshiftedKeySym[123] = 0xFFC9; // f12
58 unshiftedKeySym[144] = 0xFF7F; // num lock
59 unshiftedKeySym[145] = 0xFF14; // scroll lock
60
61 // Shifted versions, IF DIFFERENT FROM UNSHIFTED!
62 // If any of these are null, the unshifted one will be used.
63 var shiftedKeySym  = new Array();
64 shiftedKeySym[18]  = 0xFFE7; // alt
65
66 // Constants for keysyms for special keys
67 var KEYSYM_CTRL = 65507;
68 var KEYSYM_ALT = 65513;
69 var KEYSYM_DELETE = 65535;
70 var KEYSYM_SHIFT = 65505;
71
72