susi-qemu 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/susi +9 -4
- data/lib/disk.rb +7 -5
- data/lib/novnc/core/base64.js +104 -0
- data/lib/novnc/core/crypto/aes.js +178 -0
- data/lib/novnc/core/crypto/bigint.js +34 -0
- data/lib/novnc/core/crypto/crypto.js +90 -0
- data/lib/novnc/core/crypto/des.js +330 -0
- data/lib/novnc/core/crypto/dh.js +55 -0
- data/lib/novnc/core/crypto/md5.js +82 -0
- data/lib/novnc/core/crypto/rsa.js +132 -0
- data/lib/novnc/core/decoders/copyrect.js +27 -0
- data/lib/novnc/core/decoders/h264.js +321 -0
- data/lib/novnc/core/decoders/hextile.js +181 -0
- data/lib/novnc/core/decoders/jpeg.js +146 -0
- data/lib/novnc/core/decoders/raw.js +59 -0
- data/lib/novnc/core/decoders/rre.js +44 -0
- data/lib/novnc/core/decoders/tight.js +393 -0
- data/lib/novnc/core/decoders/tightpng.js +27 -0
- data/lib/novnc/core/decoders/zlib.js +51 -0
- data/lib/novnc/core/decoders/zrle.js +185 -0
- data/lib/novnc/core/deflator.js +84 -0
- data/lib/novnc/core/display.js +575 -0
- data/lib/novnc/core/encodings.js +53 -0
- data/lib/novnc/core/inflator.js +65 -0
- data/lib/novnc/core/input/domkeytable.js +311 -0
- data/lib/novnc/core/input/fixedkeys.js +129 -0
- data/lib/novnc/core/input/gesturehandler.js +567 -0
- data/lib/novnc/core/input/keyboard.js +294 -0
- data/lib/novnc/core/input/keysym.js +616 -0
- data/lib/novnc/core/input/keysymdef.js +688 -0
- data/lib/novnc/core/input/util.js +191 -0
- data/lib/novnc/core/input/vkeys.js +116 -0
- data/lib/novnc/core/input/xtscancodes.js +173 -0
- data/lib/novnc/core/ra2.js +312 -0
- data/lib/novnc/core/rfb.js +3257 -0
- data/lib/novnc/core/util/browser.js +172 -0
- data/lib/novnc/core/util/cursor.js +249 -0
- data/lib/novnc/core/util/element.js +32 -0
- data/lib/novnc/core/util/events.js +138 -0
- data/lib/novnc/core/util/eventtarget.js +35 -0
- data/lib/novnc/core/util/int.js +15 -0
- data/lib/novnc/core/util/logging.js +56 -0
- data/lib/novnc/core/util/strings.js +28 -0
- data/lib/novnc/core/websock.js +365 -0
- data/lib/novnc/screen.html +21 -0
- data/lib/novnc/vendor/pako/lib/utils/common.js +45 -0
- data/lib/novnc/vendor/pako/lib/zlib/adler32.js +27 -0
- data/lib/novnc/vendor/pako/lib/zlib/constants.js +47 -0
- data/lib/novnc/vendor/pako/lib/zlib/crc32.js +36 -0
- data/lib/novnc/vendor/pako/lib/zlib/deflate.js +1846 -0
- data/lib/novnc/vendor/pako/lib/zlib/gzheader.js +35 -0
- data/lib/novnc/vendor/pako/lib/zlib/inffast.js +324 -0
- data/lib/novnc/vendor/pako/lib/zlib/inflate.js +1527 -0
- data/lib/novnc/vendor/pako/lib/zlib/inftrees.js +322 -0
- data/lib/novnc/vendor/pako/lib/zlib/messages.js +11 -0
- data/lib/novnc/vendor/pako/lib/zlib/trees.js +1195 -0
- data/lib/novnc/vendor/pako/lib/zlib/zstream.js +24 -0
- data/lib/output.rb +11 -0
- data/lib/qmp.rb +6 -0
- data/lib/ssh.rb +3 -1
- data/lib/susi.rb +7 -6
- data/lib/version.rb +1 -1
- data/lib/vm.rb +44 -26
- data/lib/vnc.rb +34 -31
- metadata +57 -1
| @@ -0,0 +1,65 @@ | |
| 1 | 
            +
            /*
         | 
| 2 | 
            +
             * noVNC: HTML5 VNC client
         | 
| 3 | 
            +
             * Copyright (C) 2020 The noVNC Authors
         | 
| 4 | 
            +
             * Licensed under MPL 2.0 (see LICENSE.txt)
         | 
| 5 | 
            +
             *
         | 
| 6 | 
            +
             * See README.md for usage and integration instructions.
         | 
| 7 | 
            +
             */
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            import { inflateInit, inflate, inflateReset } from "../vendor/pako/lib/zlib/inflate.js";
         | 
| 10 | 
            +
            import ZStream from "../vendor/pako/lib/zlib/zstream.js";
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            export default class Inflate {
         | 
| 13 | 
            +
                constructor() {
         | 
| 14 | 
            +
                    this.strm = new ZStream();
         | 
| 15 | 
            +
                    this.chunkSize = 1024 * 10 * 10;
         | 
| 16 | 
            +
                    this.strm.output = new Uint8Array(this.chunkSize);
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    inflateInit(this.strm);
         | 
| 19 | 
            +
                }
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                setInput(data) {
         | 
| 22 | 
            +
                    if (!data) {
         | 
| 23 | 
            +
                        //FIXME: flush remaining data.
         | 
| 24 | 
            +
                        /* eslint-disable camelcase */
         | 
| 25 | 
            +
                        this.strm.input = null;
         | 
| 26 | 
            +
                        this.strm.avail_in = 0;
         | 
| 27 | 
            +
                        this.strm.next_in = 0;
         | 
| 28 | 
            +
                    } else {
         | 
| 29 | 
            +
                        this.strm.input = data;
         | 
| 30 | 
            +
                        this.strm.avail_in = this.strm.input.length;
         | 
| 31 | 
            +
                        this.strm.next_in = 0;
         | 
| 32 | 
            +
                        /* eslint-enable camelcase */
         | 
| 33 | 
            +
                    }
         | 
| 34 | 
            +
                }
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                inflate(expected) {
         | 
| 37 | 
            +
                    // resize our output buffer if it's too small
         | 
| 38 | 
            +
                    // (we could just use multiple chunks, but that would cause an extra
         | 
| 39 | 
            +
                    // allocation each time to flatten the chunks)
         | 
| 40 | 
            +
                    if (expected > this.chunkSize) {
         | 
| 41 | 
            +
                        this.chunkSize = expected;
         | 
| 42 | 
            +
                        this.strm.output = new Uint8Array(this.chunkSize);
         | 
| 43 | 
            +
                    }
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                    /* eslint-disable camelcase */
         | 
| 46 | 
            +
                    this.strm.next_out = 0;
         | 
| 47 | 
            +
                    this.strm.avail_out = expected;
         | 
| 48 | 
            +
                    /* eslint-enable camelcase */
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                    let ret = inflate(this.strm, 0); // Flush argument not used.
         | 
| 51 | 
            +
                    if (ret < 0) {
         | 
| 52 | 
            +
                        throw new Error("zlib inflate failed");
         | 
| 53 | 
            +
                    }
         | 
| 54 | 
            +
             | 
| 55 | 
            +
                    if (this.strm.next_out != expected) {
         | 
| 56 | 
            +
                        throw new Error("Incomplete zlib block");
         | 
| 57 | 
            +
                    }
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                    return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);
         | 
| 60 | 
            +
                }
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                reset() {
         | 
| 63 | 
            +
                    inflateReset(this.strm);
         | 
| 64 | 
            +
                }
         | 
| 65 | 
            +
            }
         | 
| @@ -0,0 +1,311 @@ | |
| 1 | 
            +
            /*
         | 
| 2 | 
            +
             * noVNC: HTML5 VNC client
         | 
| 3 | 
            +
             * Copyright (C) 2018 The noVNC Authors
         | 
| 4 | 
            +
             * Licensed under MPL 2.0 or any later version (see LICENSE.txt)
         | 
| 5 | 
            +
             */
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            import KeyTable from "./keysym.js";
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            /*
         | 
| 10 | 
            +
             * Mapping between HTML key values and VNC/X11 keysyms for "special"
         | 
| 11 | 
            +
             * keys that cannot be handled via their Unicode codepoint.
         | 
| 12 | 
            +
             *
         | 
| 13 | 
            +
             * See https://www.w3.org/TR/uievents-key/ for possible values.
         | 
| 14 | 
            +
             */
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            const DOMKeyTable = {};
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            function addStandard(key, standard) {
         | 
| 19 | 
            +
                if (standard === undefined) throw new Error("Undefined keysym for key \"" + key + "\"");
         | 
| 20 | 
            +
                if (key in DOMKeyTable) throw new Error("Duplicate entry for key \"" + key + "\"");
         | 
| 21 | 
            +
                DOMKeyTable[key] = [standard, standard, standard, standard];
         | 
| 22 | 
            +
            }
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            function addLeftRight(key, left, right) {
         | 
| 25 | 
            +
                if (left === undefined) throw new Error("Undefined keysym for key \"" + key + "\"");
         | 
| 26 | 
            +
                if (right === undefined) throw new Error("Undefined keysym for key \"" + key + "\"");
         | 
| 27 | 
            +
                if (key in DOMKeyTable) throw new Error("Duplicate entry for key \"" + key + "\"");
         | 
| 28 | 
            +
                DOMKeyTable[key] = [left, left, right, left];
         | 
| 29 | 
            +
            }
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            function addNumpad(key, standard, numpad) {
         | 
| 32 | 
            +
                if (standard === undefined) throw new Error("Undefined keysym for key \"" + key + "\"");
         | 
| 33 | 
            +
                if (numpad === undefined) throw new Error("Undefined keysym for key \"" + key + "\"");
         | 
| 34 | 
            +
                if (key in DOMKeyTable) throw new Error("Duplicate entry for key \"" + key + "\"");
         | 
| 35 | 
            +
                DOMKeyTable[key] = [standard, standard, standard, numpad];
         | 
| 36 | 
            +
            }
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            // 3.2. Modifier Keys
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            addLeftRight("Alt", KeyTable.XK_Alt_L, KeyTable.XK_Alt_R);
         | 
| 41 | 
            +
            addStandard("AltGraph", KeyTable.XK_ISO_Level3_Shift);
         | 
| 42 | 
            +
            addStandard("CapsLock", KeyTable.XK_Caps_Lock);
         | 
| 43 | 
            +
            addLeftRight("Control", KeyTable.XK_Control_L, KeyTable.XK_Control_R);
         | 
| 44 | 
            +
            // - Fn
         | 
| 45 | 
            +
            // - FnLock
         | 
| 46 | 
            +
            addLeftRight("Meta", KeyTable.XK_Super_L, KeyTable.XK_Super_R);
         | 
| 47 | 
            +
            addStandard("NumLock", KeyTable.XK_Num_Lock);
         | 
| 48 | 
            +
            addStandard("ScrollLock", KeyTable.XK_Scroll_Lock);
         | 
| 49 | 
            +
            addLeftRight("Shift", KeyTable.XK_Shift_L, KeyTable.XK_Shift_R);
         | 
| 50 | 
            +
            // - Symbol
         | 
| 51 | 
            +
            // - SymbolLock
         | 
| 52 | 
            +
            // - Hyper
         | 
| 53 | 
            +
            // - Super
         | 
| 54 | 
            +
             | 
| 55 | 
            +
            // 3.3. Whitespace Keys
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            addNumpad("Enter", KeyTable.XK_Return, KeyTable.XK_KP_Enter);
         | 
| 58 | 
            +
            addStandard("Tab", KeyTable.XK_Tab);
         | 
| 59 | 
            +
            addNumpad(" ", KeyTable.XK_space, KeyTable.XK_KP_Space);
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            // 3.4. Navigation Keys
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            addNumpad("ArrowDown", KeyTable.XK_Down, KeyTable.XK_KP_Down);
         | 
| 64 | 
            +
            addNumpad("ArrowLeft", KeyTable.XK_Left, KeyTable.XK_KP_Left);
         | 
| 65 | 
            +
            addNumpad("ArrowRight", KeyTable.XK_Right, KeyTable.XK_KP_Right);
         | 
| 66 | 
            +
            addNumpad("ArrowUp", KeyTable.XK_Up, KeyTable.XK_KP_Up);
         | 
| 67 | 
            +
            addNumpad("End", KeyTable.XK_End, KeyTable.XK_KP_End);
         | 
| 68 | 
            +
            addNumpad("Home", KeyTable.XK_Home, KeyTable.XK_KP_Home);
         | 
| 69 | 
            +
            addNumpad("PageDown", KeyTable.XK_Next, KeyTable.XK_KP_Next);
         | 
| 70 | 
            +
            addNumpad("PageUp", KeyTable.XK_Prior, KeyTable.XK_KP_Prior);
         | 
| 71 | 
            +
             | 
| 72 | 
            +
            // 3.5. Editing Keys
         | 
| 73 | 
            +
             | 
| 74 | 
            +
            addStandard("Backspace", KeyTable.XK_BackSpace);
         | 
| 75 | 
            +
            // Browsers send "Clear" for the numpad 5 without NumLock because
         | 
| 76 | 
            +
            // Windows uses VK_Clear for that key. But Unix expects KP_Begin for
         | 
| 77 | 
            +
            // that scenario.
         | 
| 78 | 
            +
            addNumpad("Clear", KeyTable.XK_Clear, KeyTable.XK_KP_Begin);
         | 
| 79 | 
            +
            addStandard("Copy", KeyTable.XF86XK_Copy);
         | 
| 80 | 
            +
            // - CrSel
         | 
| 81 | 
            +
            addStandard("Cut", KeyTable.XF86XK_Cut);
         | 
| 82 | 
            +
            addNumpad("Delete", KeyTable.XK_Delete, KeyTable.XK_KP_Delete);
         | 
| 83 | 
            +
            // - EraseEof
         | 
| 84 | 
            +
            // - ExSel
         | 
| 85 | 
            +
            addNumpad("Insert", KeyTable.XK_Insert, KeyTable.XK_KP_Insert);
         | 
| 86 | 
            +
            addStandard("Paste", KeyTable.XF86XK_Paste);
         | 
| 87 | 
            +
            addStandard("Redo", KeyTable.XK_Redo);
         | 
| 88 | 
            +
            addStandard("Undo", KeyTable.XK_Undo);
         | 
| 89 | 
            +
             | 
| 90 | 
            +
            // 3.6. UI Keys
         | 
| 91 | 
            +
             | 
| 92 | 
            +
            // - Accept
         | 
| 93 | 
            +
            // - Again (could just be XK_Redo)
         | 
| 94 | 
            +
            // - Attn
         | 
| 95 | 
            +
            addStandard("Cancel", KeyTable.XK_Cancel);
         | 
| 96 | 
            +
            addStandard("ContextMenu", KeyTable.XK_Menu);
         | 
| 97 | 
            +
            addStandard("Escape", KeyTable.XK_Escape);
         | 
| 98 | 
            +
            addStandard("Execute", KeyTable.XK_Execute);
         | 
| 99 | 
            +
            addStandard("Find", KeyTable.XK_Find);
         | 
| 100 | 
            +
            addStandard("Help", KeyTable.XK_Help);
         | 
| 101 | 
            +
            addStandard("Pause", KeyTable.XK_Pause);
         | 
| 102 | 
            +
            // - Play
         | 
| 103 | 
            +
            // - Props
         | 
| 104 | 
            +
            addStandard("Select", KeyTable.XK_Select);
         | 
| 105 | 
            +
            addStandard("ZoomIn", KeyTable.XF86XK_ZoomIn);
         | 
| 106 | 
            +
            addStandard("ZoomOut", KeyTable.XF86XK_ZoomOut);
         | 
| 107 | 
            +
             | 
| 108 | 
            +
            // 3.7. Device Keys
         | 
| 109 | 
            +
             | 
| 110 | 
            +
            addStandard("BrightnessDown", KeyTable.XF86XK_MonBrightnessDown);
         | 
| 111 | 
            +
            addStandard("BrightnessUp", KeyTable.XF86XK_MonBrightnessUp);
         | 
| 112 | 
            +
            addStandard("Eject", KeyTable.XF86XK_Eject);
         | 
| 113 | 
            +
            addStandard("LogOff", KeyTable.XF86XK_LogOff);
         | 
| 114 | 
            +
            addStandard("Power", KeyTable.XF86XK_PowerOff);
         | 
| 115 | 
            +
            addStandard("PowerOff", KeyTable.XF86XK_PowerDown);
         | 
| 116 | 
            +
            addStandard("PrintScreen", KeyTable.XK_Print);
         | 
| 117 | 
            +
            addStandard("Hibernate", KeyTable.XF86XK_Hibernate);
         | 
| 118 | 
            +
            addStandard("Standby", KeyTable.XF86XK_Standby);
         | 
| 119 | 
            +
            addStandard("WakeUp", KeyTable.XF86XK_WakeUp);
         | 
| 120 | 
            +
             | 
| 121 | 
            +
            // 3.8. IME and Composition Keys
         | 
| 122 | 
            +
             | 
| 123 | 
            +
            addStandard("AllCandidates", KeyTable.XK_MultipleCandidate);
         | 
| 124 | 
            +
            addStandard("Alphanumeric", KeyTable.XK_Eisu_toggle);
         | 
| 125 | 
            +
            addStandard("CodeInput", KeyTable.XK_Codeinput);
         | 
| 126 | 
            +
            addStandard("Compose", KeyTable.XK_Multi_key);
         | 
| 127 | 
            +
            addStandard("Convert", KeyTable.XK_Henkan);
         | 
| 128 | 
            +
            // - Dead
         | 
| 129 | 
            +
            // - FinalMode
         | 
| 130 | 
            +
            addStandard("GroupFirst", KeyTable.XK_ISO_First_Group);
         | 
| 131 | 
            +
            addStandard("GroupLast", KeyTable.XK_ISO_Last_Group);
         | 
| 132 | 
            +
            addStandard("GroupNext", KeyTable.XK_ISO_Next_Group);
         | 
| 133 | 
            +
            addStandard("GroupPrevious", KeyTable.XK_ISO_Prev_Group);
         | 
| 134 | 
            +
            // - ModeChange (XK_Mode_switch is often used for AltGr)
         | 
| 135 | 
            +
            // - NextCandidate
         | 
| 136 | 
            +
            addStandard("NonConvert", KeyTable.XK_Muhenkan);
         | 
| 137 | 
            +
            addStandard("PreviousCandidate", KeyTable.XK_PreviousCandidate);
         | 
| 138 | 
            +
            // - Process
         | 
| 139 | 
            +
            addStandard("SingleCandidate", KeyTable.XK_SingleCandidate);
         | 
| 140 | 
            +
            addStandard("HangulMode", KeyTable.XK_Hangul);
         | 
| 141 | 
            +
            addStandard("HanjaMode", KeyTable.XK_Hangul_Hanja);
         | 
| 142 | 
            +
            addStandard("JunjaMode", KeyTable.XK_Hangul_Jeonja);
         | 
| 143 | 
            +
            addStandard("Eisu", KeyTable.XK_Eisu_toggle);
         | 
| 144 | 
            +
            addStandard("Hankaku", KeyTable.XK_Hankaku);
         | 
| 145 | 
            +
            addStandard("Hiragana", KeyTable.XK_Hiragana);
         | 
| 146 | 
            +
            addStandard("HiraganaKatakana", KeyTable.XK_Hiragana_Katakana);
         | 
| 147 | 
            +
            addStandard("KanaMode", KeyTable.XK_Kana_Shift); // could also be _Kana_Lock
         | 
| 148 | 
            +
            addStandard("KanjiMode", KeyTable.XK_Kanji);
         | 
| 149 | 
            +
            addStandard("Katakana", KeyTable.XK_Katakana);
         | 
| 150 | 
            +
            addStandard("Romaji", KeyTable.XK_Romaji);
         | 
| 151 | 
            +
            addStandard("Zenkaku", KeyTable.XK_Zenkaku);
         | 
| 152 | 
            +
            addStandard("ZenkakuHankaku", KeyTable.XK_Zenkaku_Hankaku);
         | 
| 153 | 
            +
             | 
| 154 | 
            +
            // 3.9. General-Purpose Function Keys
         | 
| 155 | 
            +
             | 
| 156 | 
            +
            addStandard("F1", KeyTable.XK_F1);
         | 
| 157 | 
            +
            addStandard("F2", KeyTable.XK_F2);
         | 
| 158 | 
            +
            addStandard("F3", KeyTable.XK_F3);
         | 
| 159 | 
            +
            addStandard("F4", KeyTable.XK_F4);
         | 
| 160 | 
            +
            addStandard("F5", KeyTable.XK_F5);
         | 
| 161 | 
            +
            addStandard("F6", KeyTable.XK_F6);
         | 
| 162 | 
            +
            addStandard("F7", KeyTable.XK_F7);
         | 
| 163 | 
            +
            addStandard("F8", KeyTable.XK_F8);
         | 
| 164 | 
            +
            addStandard("F9", KeyTable.XK_F9);
         | 
| 165 | 
            +
            addStandard("F10", KeyTable.XK_F10);
         | 
| 166 | 
            +
            addStandard("F11", KeyTable.XK_F11);
         | 
| 167 | 
            +
            addStandard("F12", KeyTable.XK_F12);
         | 
| 168 | 
            +
            addStandard("F13", KeyTable.XK_F13);
         | 
| 169 | 
            +
            addStandard("F14", KeyTable.XK_F14);
         | 
| 170 | 
            +
            addStandard("F15", KeyTable.XK_F15);
         | 
| 171 | 
            +
            addStandard("F16", KeyTable.XK_F16);
         | 
| 172 | 
            +
            addStandard("F17", KeyTable.XK_F17);
         | 
| 173 | 
            +
            addStandard("F18", KeyTable.XK_F18);
         | 
| 174 | 
            +
            addStandard("F19", KeyTable.XK_F19);
         | 
| 175 | 
            +
            addStandard("F20", KeyTable.XK_F20);
         | 
| 176 | 
            +
            addStandard("F21", KeyTable.XK_F21);
         | 
| 177 | 
            +
            addStandard("F22", KeyTable.XK_F22);
         | 
| 178 | 
            +
            addStandard("F23", KeyTable.XK_F23);
         | 
| 179 | 
            +
            addStandard("F24", KeyTable.XK_F24);
         | 
| 180 | 
            +
            addStandard("F25", KeyTable.XK_F25);
         | 
| 181 | 
            +
            addStandard("F26", KeyTable.XK_F26);
         | 
| 182 | 
            +
            addStandard("F27", KeyTable.XK_F27);
         | 
| 183 | 
            +
            addStandard("F28", KeyTable.XK_F28);
         | 
| 184 | 
            +
            addStandard("F29", KeyTable.XK_F29);
         | 
| 185 | 
            +
            addStandard("F30", KeyTable.XK_F30);
         | 
| 186 | 
            +
            addStandard("F31", KeyTable.XK_F31);
         | 
| 187 | 
            +
            addStandard("F32", KeyTable.XK_F32);
         | 
| 188 | 
            +
            addStandard("F33", KeyTable.XK_F33);
         | 
| 189 | 
            +
            addStandard("F34", KeyTable.XK_F34);
         | 
| 190 | 
            +
            addStandard("F35", KeyTable.XK_F35);
         | 
| 191 | 
            +
            // - Soft1...
         | 
| 192 | 
            +
             | 
| 193 | 
            +
            // 3.10. Multimedia Keys
         | 
| 194 | 
            +
             | 
| 195 | 
            +
            // - ChannelDown
         | 
| 196 | 
            +
            // - ChannelUp
         | 
| 197 | 
            +
            addStandard("Close", KeyTable.XF86XK_Close);
         | 
| 198 | 
            +
            addStandard("MailForward", KeyTable.XF86XK_MailForward);
         | 
| 199 | 
            +
            addStandard("MailReply", KeyTable.XF86XK_Reply);
         | 
| 200 | 
            +
            addStandard("MailSend", KeyTable.XF86XK_Send);
         | 
| 201 | 
            +
            // - MediaClose
         | 
| 202 | 
            +
            addStandard("MediaFastForward", KeyTable.XF86XK_AudioForward);
         | 
| 203 | 
            +
            addStandard("MediaPause", KeyTable.XF86XK_AudioPause);
         | 
| 204 | 
            +
            addStandard("MediaPlay", KeyTable.XF86XK_AudioPlay);
         | 
| 205 | 
            +
            // - MediaPlayPause
         | 
| 206 | 
            +
            addStandard("MediaRecord", KeyTable.XF86XK_AudioRecord);
         | 
| 207 | 
            +
            addStandard("MediaRewind", KeyTable.XF86XK_AudioRewind);
         | 
| 208 | 
            +
            addStandard("MediaStop", KeyTable.XF86XK_AudioStop);
         | 
| 209 | 
            +
            addStandard("MediaTrackNext", KeyTable.XF86XK_AudioNext);
         | 
| 210 | 
            +
            addStandard("MediaTrackPrevious", KeyTable.XF86XK_AudioPrev);
         | 
| 211 | 
            +
            addStandard("New", KeyTable.XF86XK_New);
         | 
| 212 | 
            +
            addStandard("Open", KeyTable.XF86XK_Open);
         | 
| 213 | 
            +
            addStandard("Print", KeyTable.XK_Print);
         | 
| 214 | 
            +
            addStandard("Save", KeyTable.XF86XK_Save);
         | 
| 215 | 
            +
            addStandard("SpellCheck", KeyTable.XF86XK_Spell);
         | 
| 216 | 
            +
             | 
| 217 | 
            +
            // 3.11. Multimedia Numpad Keys
         | 
| 218 | 
            +
             | 
| 219 | 
            +
            // - Key11
         | 
| 220 | 
            +
            // - Key12
         | 
| 221 | 
            +
             | 
| 222 | 
            +
            // 3.12. Audio Keys
         | 
| 223 | 
            +
             | 
| 224 | 
            +
            // - AudioBalanceLeft
         | 
| 225 | 
            +
            // - AudioBalanceRight
         | 
| 226 | 
            +
            // - AudioBassBoostDown
         | 
| 227 | 
            +
            // - AudioBassBoostToggle
         | 
| 228 | 
            +
            // - AudioBassBoostUp
         | 
| 229 | 
            +
            // - AudioFaderFront
         | 
| 230 | 
            +
            // - AudioFaderRear
         | 
| 231 | 
            +
            // - AudioSurroundModeNext
         | 
| 232 | 
            +
            // - AudioTrebleDown
         | 
| 233 | 
            +
            // - AudioTrebleUp
         | 
| 234 | 
            +
            addStandard("AudioVolumeDown", KeyTable.XF86XK_AudioLowerVolume);
         | 
| 235 | 
            +
            addStandard("AudioVolumeUp", KeyTable.XF86XK_AudioRaiseVolume);
         | 
| 236 | 
            +
            addStandard("AudioVolumeMute", KeyTable.XF86XK_AudioMute);
         | 
| 237 | 
            +
            // - MicrophoneToggle
         | 
| 238 | 
            +
            // - MicrophoneVolumeDown
         | 
| 239 | 
            +
            // - MicrophoneVolumeUp
         | 
| 240 | 
            +
            addStandard("MicrophoneVolumeMute", KeyTable.XF86XK_AudioMicMute);
         | 
| 241 | 
            +
             | 
| 242 | 
            +
            // 3.13. Speech Keys
         | 
| 243 | 
            +
             | 
| 244 | 
            +
            // - SpeechCorrectionList
         | 
| 245 | 
            +
            // - SpeechInputToggle
         | 
| 246 | 
            +
             | 
| 247 | 
            +
            // 3.14. Application Keys
         | 
| 248 | 
            +
             | 
| 249 | 
            +
            addStandard("LaunchApplication1", KeyTable.XF86XK_MyComputer);
         | 
| 250 | 
            +
            addStandard("LaunchApplication2", KeyTable.XF86XK_Calculator);
         | 
| 251 | 
            +
            addStandard("LaunchCalendar", KeyTable.XF86XK_Calendar);
         | 
| 252 | 
            +
            // - LaunchContacts
         | 
| 253 | 
            +
            addStandard("LaunchMail", KeyTable.XF86XK_Mail);
         | 
| 254 | 
            +
            addStandard("LaunchMediaPlayer", KeyTable.XF86XK_AudioMedia);
         | 
| 255 | 
            +
            addStandard("LaunchMusicPlayer", KeyTable.XF86XK_Music);
         | 
| 256 | 
            +
            addStandard("LaunchPhone", KeyTable.XF86XK_Phone);
         | 
| 257 | 
            +
            addStandard("LaunchScreenSaver", KeyTable.XF86XK_ScreenSaver);
         | 
| 258 | 
            +
            addStandard("LaunchSpreadsheet", KeyTable.XF86XK_Excel);
         | 
| 259 | 
            +
            addStandard("LaunchWebBrowser", KeyTable.XF86XK_WWW);
         | 
| 260 | 
            +
            addStandard("LaunchWebCam", KeyTable.XF86XK_WebCam);
         | 
| 261 | 
            +
            addStandard("LaunchWordProcessor", KeyTable.XF86XK_Word);
         | 
| 262 | 
            +
             | 
| 263 | 
            +
            // 3.15. Browser Keys
         | 
| 264 | 
            +
             | 
| 265 | 
            +
            addStandard("BrowserBack", KeyTable.XF86XK_Back);
         | 
| 266 | 
            +
            addStandard("BrowserFavorites", KeyTable.XF86XK_Favorites);
         | 
| 267 | 
            +
            addStandard("BrowserForward", KeyTable.XF86XK_Forward);
         | 
| 268 | 
            +
            addStandard("BrowserHome", KeyTable.XF86XK_HomePage);
         | 
| 269 | 
            +
            addStandard("BrowserRefresh", KeyTable.XF86XK_Refresh);
         | 
| 270 | 
            +
            addStandard("BrowserSearch", KeyTable.XF86XK_Search);
         | 
| 271 | 
            +
            addStandard("BrowserStop", KeyTable.XF86XK_Stop);
         | 
| 272 | 
            +
             | 
| 273 | 
            +
            // 3.16. Mobile Phone Keys
         | 
| 274 | 
            +
             | 
| 275 | 
            +
            // - A whole bunch...
         | 
| 276 | 
            +
             | 
| 277 | 
            +
            // 3.17. TV Keys
         | 
| 278 | 
            +
             | 
| 279 | 
            +
            // - A whole bunch...
         | 
| 280 | 
            +
             | 
| 281 | 
            +
            // 3.18. Media Controller Keys
         | 
| 282 | 
            +
             | 
| 283 | 
            +
            // - A whole bunch...
         | 
| 284 | 
            +
            addStandard("Dimmer", KeyTable.XF86XK_BrightnessAdjust);
         | 
| 285 | 
            +
            addStandard("MediaAudioTrack", KeyTable.XF86XK_AudioCycleTrack);
         | 
| 286 | 
            +
            addStandard("RandomToggle", KeyTable.XF86XK_AudioRandomPlay);
         | 
| 287 | 
            +
            addStandard("SplitScreenToggle", KeyTable.XF86XK_SplitScreen);
         | 
| 288 | 
            +
            addStandard("Subtitle", KeyTable.XF86XK_Subtitle);
         | 
| 289 | 
            +
            addStandard("VideoModeNext", KeyTable.XF86XK_Next_VMode);
         | 
| 290 | 
            +
             | 
| 291 | 
            +
            // Extra: Numpad
         | 
| 292 | 
            +
             | 
| 293 | 
            +
            addNumpad("=", KeyTable.XK_equal, KeyTable.XK_KP_Equal);
         | 
| 294 | 
            +
            addNumpad("+", KeyTable.XK_plus, KeyTable.XK_KP_Add);
         | 
| 295 | 
            +
            addNumpad("-", KeyTable.XK_minus, KeyTable.XK_KP_Subtract);
         | 
| 296 | 
            +
            addNumpad("*", KeyTable.XK_asterisk, KeyTable.XK_KP_Multiply);
         | 
| 297 | 
            +
            addNumpad("/", KeyTable.XK_slash, KeyTable.XK_KP_Divide);
         | 
| 298 | 
            +
            addNumpad(".", KeyTable.XK_period, KeyTable.XK_KP_Decimal);
         | 
| 299 | 
            +
            addNumpad(",", KeyTable.XK_comma, KeyTable.XK_KP_Separator);
         | 
| 300 | 
            +
            addNumpad("0", KeyTable.XK_0, KeyTable.XK_KP_0);
         | 
| 301 | 
            +
            addNumpad("1", KeyTable.XK_1, KeyTable.XK_KP_1);
         | 
| 302 | 
            +
            addNumpad("2", KeyTable.XK_2, KeyTable.XK_KP_2);
         | 
| 303 | 
            +
            addNumpad("3", KeyTable.XK_3, KeyTable.XK_KP_3);
         | 
| 304 | 
            +
            addNumpad("4", KeyTable.XK_4, KeyTable.XK_KP_4);
         | 
| 305 | 
            +
            addNumpad("5", KeyTable.XK_5, KeyTable.XK_KP_5);
         | 
| 306 | 
            +
            addNumpad("6", KeyTable.XK_6, KeyTable.XK_KP_6);
         | 
| 307 | 
            +
            addNumpad("7", KeyTable.XK_7, KeyTable.XK_KP_7);
         | 
| 308 | 
            +
            addNumpad("8", KeyTable.XK_8, KeyTable.XK_KP_8);
         | 
| 309 | 
            +
            addNumpad("9", KeyTable.XK_9, KeyTable.XK_KP_9);
         | 
| 310 | 
            +
             | 
| 311 | 
            +
            export default DOMKeyTable;
         | 
| @@ -0,0 +1,129 @@ | |
| 1 | 
            +
            /*
         | 
| 2 | 
            +
             * noVNC: HTML5 VNC client
         | 
| 3 | 
            +
             * Copyright (C) 2018 The noVNC Authors
         | 
| 4 | 
            +
             * Licensed under MPL 2.0 or any later version (see LICENSE.txt)
         | 
| 5 | 
            +
             */
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            /*
         | 
| 8 | 
            +
             * Fallback mapping between HTML key codes (physical keys) and
         | 
| 9 | 
            +
             * HTML key values. This only works for keys that don't vary
         | 
| 10 | 
            +
             * between layouts. We also omit those who manage fine by mapping the
         | 
| 11 | 
            +
             * Unicode representation.
         | 
| 12 | 
            +
             *
         | 
| 13 | 
            +
             * See https://www.w3.org/TR/uievents-code/ for possible codes.
         | 
| 14 | 
            +
             * See https://www.w3.org/TR/uievents-key/ for possible values.
         | 
| 15 | 
            +
             */
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            /* eslint-disable key-spacing */
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            export default {
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            // 3.1.1.1. Writing System Keys
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                'Backspace':        'Backspace',
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            // 3.1.1.2. Functional Keys
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                'AltLeft':          'Alt',
         | 
| 28 | 
            +
                'AltRight':         'Alt', // This could also be 'AltGraph'
         | 
| 29 | 
            +
                'CapsLock':         'CapsLock',
         | 
| 30 | 
            +
                'ContextMenu':      'ContextMenu',
         | 
| 31 | 
            +
                'ControlLeft':      'Control',
         | 
| 32 | 
            +
                'ControlRight':     'Control',
         | 
| 33 | 
            +
                'Enter':            'Enter',
         | 
| 34 | 
            +
                'MetaLeft':         'Meta',
         | 
| 35 | 
            +
                'MetaRight':        'Meta',
         | 
| 36 | 
            +
                'ShiftLeft':        'Shift',
         | 
| 37 | 
            +
                'ShiftRight':       'Shift',
         | 
| 38 | 
            +
                'Tab':              'Tab',
         | 
| 39 | 
            +
                // FIXME: Japanese/Korean keys
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            // 3.1.2. Control Pad Section
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                'Delete':           'Delete',
         | 
| 44 | 
            +
                'End':              'End',
         | 
| 45 | 
            +
                'Help':             'Help',
         | 
| 46 | 
            +
                'Home':             'Home',
         | 
| 47 | 
            +
                'Insert':           'Insert',
         | 
| 48 | 
            +
                'PageDown':         'PageDown',
         | 
| 49 | 
            +
                'PageUp':           'PageUp',
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            // 3.1.3. Arrow Pad Section
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                'ArrowDown':        'ArrowDown',
         | 
| 54 | 
            +
                'ArrowLeft':        'ArrowLeft',
         | 
| 55 | 
            +
                'ArrowRight':       'ArrowRight',
         | 
| 56 | 
            +
                'ArrowUp':          'ArrowUp',
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            // 3.1.4. Numpad Section
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                'NumLock':          'NumLock',
         | 
| 61 | 
            +
                'NumpadBackspace':  'Backspace',
         | 
| 62 | 
            +
                'NumpadClear':      'Clear',
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            // 3.1.5. Function Section
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                'Escape':           'Escape',
         | 
| 67 | 
            +
                'F1':               'F1',
         | 
| 68 | 
            +
                'F2':               'F2',
         | 
| 69 | 
            +
                'F3':               'F3',
         | 
| 70 | 
            +
                'F4':               'F4',
         | 
| 71 | 
            +
                'F5':               'F5',
         | 
| 72 | 
            +
                'F6':               'F6',
         | 
| 73 | 
            +
                'F7':               'F7',
         | 
| 74 | 
            +
                'F8':               'F8',
         | 
| 75 | 
            +
                'F9':               'F9',
         | 
| 76 | 
            +
                'F10':              'F10',
         | 
| 77 | 
            +
                'F11':              'F11',
         | 
| 78 | 
            +
                'F12':              'F12',
         | 
| 79 | 
            +
                'F13':              'F13',
         | 
| 80 | 
            +
                'F14':              'F14',
         | 
| 81 | 
            +
                'F15':              'F15',
         | 
| 82 | 
            +
                'F16':              'F16',
         | 
| 83 | 
            +
                'F17':              'F17',
         | 
| 84 | 
            +
                'F18':              'F18',
         | 
| 85 | 
            +
                'F19':              'F19',
         | 
| 86 | 
            +
                'F20':              'F20',
         | 
| 87 | 
            +
                'F21':              'F21',
         | 
| 88 | 
            +
                'F22':              'F22',
         | 
| 89 | 
            +
                'F23':              'F23',
         | 
| 90 | 
            +
                'F24':              'F24',
         | 
| 91 | 
            +
                'F25':              'F25',
         | 
| 92 | 
            +
                'F26':              'F26',
         | 
| 93 | 
            +
                'F27':              'F27',
         | 
| 94 | 
            +
                'F28':              'F28',
         | 
| 95 | 
            +
                'F29':              'F29',
         | 
| 96 | 
            +
                'F30':              'F30',
         | 
| 97 | 
            +
                'F31':              'F31',
         | 
| 98 | 
            +
                'F32':              'F32',
         | 
| 99 | 
            +
                'F33':              'F33',
         | 
| 100 | 
            +
                'F34':              'F34',
         | 
| 101 | 
            +
                'F35':              'F35',
         | 
| 102 | 
            +
                'PrintScreen':      'PrintScreen',
         | 
| 103 | 
            +
                'ScrollLock':       'ScrollLock',
         | 
| 104 | 
            +
                'Pause':            'Pause',
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            // 3.1.6. Media Keys
         | 
| 107 | 
            +
             | 
| 108 | 
            +
                'BrowserBack':      'BrowserBack',
         | 
| 109 | 
            +
                'BrowserFavorites': 'BrowserFavorites',
         | 
| 110 | 
            +
                'BrowserForward':   'BrowserForward',
         | 
| 111 | 
            +
                'BrowserHome':      'BrowserHome',
         | 
| 112 | 
            +
                'BrowserRefresh':   'BrowserRefresh',
         | 
| 113 | 
            +
                'BrowserSearch':    'BrowserSearch',
         | 
| 114 | 
            +
                'BrowserStop':      'BrowserStop',
         | 
| 115 | 
            +
                'Eject':            'Eject',
         | 
| 116 | 
            +
                'LaunchApp1':       'LaunchMyComputer',
         | 
| 117 | 
            +
                'LaunchApp2':       'LaunchCalendar',
         | 
| 118 | 
            +
                'LaunchMail':       'LaunchMail',
         | 
| 119 | 
            +
                'MediaPlayPause':   'MediaPlay',
         | 
| 120 | 
            +
                'MediaStop':        'MediaStop',
         | 
| 121 | 
            +
                'MediaTrackNext':   'MediaTrackNext',
         | 
| 122 | 
            +
                'MediaTrackPrevious': 'MediaTrackPrevious',
         | 
| 123 | 
            +
                'Power':            'Power',
         | 
| 124 | 
            +
                'Sleep':            'Sleep',
         | 
| 125 | 
            +
                'AudioVolumeDown':  'AudioVolumeDown',
         | 
| 126 | 
            +
                'AudioVolumeMute':  'AudioVolumeMute',
         | 
| 127 | 
            +
                'AudioVolumeUp':    'AudioVolumeUp',
         | 
| 128 | 
            +
                'WakeUp':           'WakeUp',
         | 
| 129 | 
            +
            };
         |