diff --git a/html5/js/Client.js b/html5/js/Client.js index 3fe0fe53..79780e3f 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -3242,7 +3242,7 @@ class XpraClient { reconfigure_all_trays() { const float_menu = document.querySelector(FLOAT_MENU_SELECTOR); - float_menu_width = float_menu_item_size * 4 + float_menu_padding; + let float_menu_width = float_menu_item_size * 4 + float_menu_padding; for (const twid in this.id_to_window) { const twin = this.id_to_window[twid]; if (twin && twin.tray) { diff --git a/html5/js/Keycodes.js b/html5/js/Keycodes.js index d1b7b0f8..ce3c809c 100644 --- a/html5/js/Keycodes.js +++ b/html5/js/Keycodes.js @@ -9,7 +9,7 @@ /** * Map javascript key names to the X11 naming convention the server expects: */ -KEY_TO_NAME = { +const KEY_TO_NAME = { Escape: "Escape", Tab: "Tab", CapsLock: "Caps_Lock", @@ -37,11 +37,11 @@ KEY_TO_NAME = { End: "End", PageDown: "Next", }; -DEAD_KEYS = { +const DEAD_KEYS = { "`": "dead_grave", "'": "dead_acute", }; -NUMPAD_TO_NAME = { +const NUMPAD_TO_NAME = { //Num pad: NumpadDivide: "KP_Divide", NumpadMultiply: "KP_Multiply", @@ -76,7 +76,7 @@ for (let index = 1; index <= 20; index++) { * sed 's/#define XKB_KEY_//g; s/ *0x.*U+/ 0x/g' | \ * awk '{print "\""$1"\" : "$2","}' */ -KEYSYM_TO_UNICODE = { +const KEYSYM_TO_UNICODE = { space: 0x00_20, exclam: 0x00_21, quotedbl: 0x00_22, @@ -1622,7 +1622,7 @@ KEYSYM_TO_UNICODE = { Sinh_kunddaliya: 0x0d_f4, }; -CHAR_TO_NAME = { +const CHAR_TO_NAME = { " ": "space", }; for (const keysym in KEYSYM_TO_UNICODE) { @@ -1632,7 +1632,7 @@ for (const keysym in KEYSYM_TO_UNICODE) { } //some keysyms require specific layouts -KEYSYM_TO_LAYOUT = { +const KEYSYM_TO_LAYOUT = { kana: "jp", Farsi: "ir", Arabic: "ar", @@ -1652,7 +1652,7 @@ KEYSYM_TO_LAYOUT = { * * TODO: some values are missing.. */ -CHARCODE_TO_NAME = { +const CHARCODE_TO_NAME = { 8: "BackSpace", 9: "Tab", 12: "KP_Begin",