From d4ea558da045d2aaf203ff0bac25c1c5eb5fc9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20CORTIER?= Date: Sat, 4 Nov 2023 00:45:10 -0400 Subject: [PATCH] style(web-client): run prettier --- web-client/iron-remote-gui/.eslintrc.yaml | 26 +- web-client/iron-remote-gui/README.md | 17 +- web-client/iron-remote-gui/index.html | 8 +- web-client/iron-remote-gui/package.json | 3 - web-client/iron-remote-gui/pre-build.js | 10 +- web-client/iron-remote-gui/public/test.html | 30 +- .../iron-remote-gui/src/enums/LockKey.ts | 18 +- .../iron-remote-gui/src/enums/LogType.ts | 14 +- .../iron-remote-gui/src/enums/ModifierKey.ts | 26 +- .../iron-remote-gui/src/enums/MouseButton.ts | 2 +- .../src/enums/MouseButtonState.ts | 2 +- web-client/iron-remote-gui/src/enums/OS.ts | 4 +- .../iron-remote-gui/src/enums/ScreenScale.ts | 2 +- .../src/enums/SessionEventType.ts | 2 +- .../src/enums/SpecialCombination.ts | 2 +- .../src/interfaces/DesktopSize.ts | 4 +- .../src/interfaces/NewSessionInfo.ts | 8 +- .../src/interfaces/ResizeEvent.ts | 6 +- .../src/interfaces/UserInteraction.ts | 23 +- .../src/interfaces/session-event.ts | 6 +- .../src/iron-remote-gui.svelte | 102 +- .../iron-remote-gui/src/lib/scancodes.ts | 1586 ++++++++--------- web-client/iron-remote-gui/src/main.ts | 14 +- .../iron-remote-gui/src/services/PublicAPI.ts | 47 +- .../src/services/logging.service.ts | 8 +- .../src/services/wasm-bridge.service.ts | 107 +- web-client/iron-remote-gui/svelte.config.js | 16 +- web-client/iron-remote-gui/tsconfig.json | 2 +- web-client/iron-remote-gui/vite.config.ts | 38 +- web-client/iron-svelte-client/.eslintrc.yaml | 26 +- web-client/iron-svelte-client/README.md | 2 +- web-client/iron-svelte-client/package.json | 3 - web-client/iron-svelte-client/pre-build.js | 14 +- web-client/iron-svelte-client/src/app.d.ts | 8 +- web-client/iron-svelte-client/src/app.html | 36 +- .../src/lib/login/login-store.ts | 4 +- .../src/lib/login/login.css | 6 +- .../src/lib/login/login.svelte | 89 +- .../src/lib/messages/message-store.ts | 10 +- .../src/lib/messages/message.svelte | 5 +- .../lib/remote-screen/remote-screen.svelte | 39 +- .../src/models/desktop-size.ts | 4 +- .../iron-svelte-client/src/models/rect.ts | 10 +- .../iron-svelte-client/src/models/session.ts | 24 +- .../src/routes/+page.svelte | 2 +- .../src/routes/session/+page.svelte | 8 +- .../src/services/server-bridge.service.ts | 37 +- .../src/services/session.service.ts | 22 +- .../iron-svelte-client/static/theme.css | 108 +- .../iron-svelte-client/svelte.config.js | 24 +- web-client/iron-svelte-client/tsconfig.json | 30 +- web-client/iron-svelte-client/vite.config.ts | 4 +- 52 files changed, 1346 insertions(+), 1302 deletions(-) diff --git a/web-client/iron-remote-gui/.eslintrc.yaml b/web-client/iron-remote-gui/.eslintrc.yaml index 3f3207f4..c55f1510 100644 --- a/web-client/iron-remote-gui/.eslintrc.yaml +++ b/web-client/iron-remote-gui/.eslintrc.yaml @@ -12,30 +12,30 @@ root: true plugins: - - "@typescript-eslint" + - '@typescript-eslint' extends: - - "eslint:recommended" - - "plugin:@typescript-eslint/recommended" - - "plugin:svelte/prettier" # Turns off rules that may conflict with Prettier - - "plugin:prettier/recommended" + - 'eslint:recommended' + - 'plugin:@typescript-eslint/recommended' + - 'plugin:svelte/prettier' # Turns off rules that may conflict with Prettier + - 'plugin:prettier/recommended' -parser: "@typescript-eslint/parser" +parser: '@typescript-eslint/parser' parserOptions: project: ./tsconfig.json sourceType: module ecmaVersion: 2020 extraFileExtensions: - - ".svelte" + - '.svelte' ignorePatterns: - - "*.cjs" + - '*.cjs' overrides: - - files: "*.svelte" + - files: '*.svelte' parser: svelte-eslint-parser parserOptions: - parser: "@typescript-eslint/parser" + parser: '@typescript-eslint/parser' env: browser: true @@ -44,10 +44,10 @@ env: rules: strict: 2 - "@typescript-eslint/no-unused-vars": - - "error" + '@typescript-eslint/no-unused-vars': + - 'error' - argsIgnorePattern: '^_' - "@typescript-eslint/strict-boolean-expressions": + '@typescript-eslint/strict-boolean-expressions': - 2 - allowString: false allowNumber: false diff --git a/web-client/iron-remote-gui/README.md b/web-client/iron-remote-gui/README.md index 01c1af3f..23d07046 100644 --- a/web-client/iron-remote-gui/README.md +++ b/web-client/iron-remote-gui/README.md @@ -15,7 +15,7 @@ Run `npm run build` As member of the Devolutions organization, you can import the Web Component from JFrog Artifactory by running the following npm command: ```shell -$ npm install @devolutions/iron-remote-gui +$ npm install @devolutions/iron-remote-gui ``` Otherwise, you can run `npm install` targeting the `dist/` folder directly. @@ -33,10 +33,10 @@ Call the `connect` method on this object. For now, we didn't make the enums used by some method directly available (I didn't find the good way to export them directly with the component.). You need to recreate them on your application for now (it will be improved in future version); -Also, even if the connection to RDP work there is still a lot of improvement to do. +Also, even if the connection to RDP work there is still a lot of improvement to do. As of now, you can expect, mouse movement and click (4 buttons) - no scroll, Keyboard for at least the standard. -Windows and CTRL+ALT+DEL can be called by method on `UserInteractionService`. -Lock keys (like caps lock), have a partial support. +Windows and CTRL+ALT+DEL can be called by method on `UserInteractionService`. +Lock keys (like caps lock), have a partial support. Other advanced functionalities (sharing / copy past...) are not implemented yet. ## Component parameters @@ -59,19 +59,18 @@ You can add some parameters for default initialization on the component ` `authtoken` is the authentication token to send to the Devolutions Gateway. > `ctrlAltDel()` -> +> > Sends the ctrl+alt+del key to server. > `metaKey()` -> +> > Sends the meta key event to remote host (i.e.: Windows key). > `setVisibility(value: bool)` -> +> > Shows or hides rendering canvas. > `setScale(scale: ScreenScale)` -> +> > Sets the scale behavior of the canvas. > See the [ScreenScale](./src/services/user-interaction-service.ts) enum for possible values. - diff --git a/web-client/iron-remote-gui/index.html b/web-client/iron-remote-gui/index.html index 6d50f0dc..11509362 100644 --- a/web-client/iron-remote-gui/index.html +++ b/web-client/iron-remote-gui/index.html @@ -1,4 +1,4 @@ - + @@ -7,12 +7,12 @@ - - + + diff --git a/web-client/iron-remote-gui/package.json b/web-client/iron-remote-gui/package.json index e5722047..1f796e70 100644 --- a/web-client/iron-remote-gui/package.json +++ b/web-client/iron-remote-gui/package.json @@ -16,14 +16,11 @@ "build-alone": "vite build", "pre-build": "node ./pre-build.js", "preview": "vite preview", - "check": "svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "npm run lint:prettier && npm run lint:eslint", "lint:prettier": "prettier . --check", "lint:eslint": "eslint src/**", - "format": "prettier . --write ." }, "devDependencies": { diff --git a/web-client/iron-remote-gui/pre-build.js b/web-client/iron-remote-gui/pre-build.js index e99dce55..7ce00288 100644 --- a/web-client/iron-remote-gui/pre-build.js +++ b/web-client/iron-remote-gui/pre-build.js @@ -1,8 +1,8 @@ -import {spawn} from "child_process"; +import { spawn } from 'child_process'; let run = async function (command, cwd) { - return new Promise(resolve => { - const buildCommand = spawn(command, {stdio: "pipe", shell: true, cwd: cwd}); + return new Promise((resolve) => { + const buildCommand = spawn(command, { stdio: 'pipe', shell: true, cwd: cwd }); buildCommand.stdout.on('data', (data) => { console.log(`${data}`); @@ -16,7 +16,7 @@ let run = async function (command, cwd) { console.log(`child process exited with code ${code}`); resolve(); }); - }) -} + }); +}; await run('wasm-pack build --target web', '../../crates/ironrdp-web'); diff --git a/web-client/iron-remote-gui/public/test.html b/web-client/iron-remote-gui/public/test.html index ae4fc55e..ac176a7e 100644 --- a/web-client/iron-remote-gui/public/test.html +++ b/web-client/iron-remote-gui/public/test.html @@ -1,19 +1,19 @@ - + - - - + + + Test - - - - + + + + - - - \ No newline at end of file + }); + + + diff --git a/web-client/iron-remote-gui/src/enums/LockKey.ts b/web-client/iron-remote-gui/src/enums/LockKey.ts index 11fe34ee..b3550c4d 100644 --- a/web-client/iron-remote-gui/src/enums/LockKey.ts +++ b/web-client/iron-remote-gui/src/enums/LockKey.ts @@ -1,10 +1,10 @@ export enum LockKey { - CAPS_LOCK = "CapsLock", - NUM_LOCK = "NumLock", - SCROLL_LOCK = "ScrollLock", - KANA_MODE = "KanaMode", - "CapsLock" = CAPS_LOCK, - "ScrollLock" = SCROLL_LOCK, - "NumLock" = NUM_LOCK, - "KanaMode" = KANA_MODE -} \ No newline at end of file + CAPS_LOCK = 'CapsLock', + NUM_LOCK = 'NumLock', + SCROLL_LOCK = 'ScrollLock', + KANA_MODE = 'KanaMode', + 'CapsLock' = CAPS_LOCK, + 'ScrollLock' = SCROLL_LOCK, + 'NumLock' = NUM_LOCK, + 'KanaMode' = KANA_MODE, +} diff --git a/web-client/iron-remote-gui/src/enums/LogType.ts b/web-client/iron-remote-gui/src/enums/LogType.ts index bb7c2559..2a1a0c27 100644 --- a/web-client/iron-remote-gui/src/enums/LogType.ts +++ b/web-client/iron-remote-gui/src/enums/LogType.ts @@ -1,8 +1,8 @@ export enum LogType { - OFF = "OFF", - ERROR = "ERROR", - WARN = "WARN", - INFO = "INFO", - DEBUG = "DEBUG", - TRACE = "TRACE" -} \ No newline at end of file + OFF = 'OFF', + ERROR = 'ERROR', + WARN = 'WARN', + INFO = 'INFO', + DEBUG = 'DEBUG', + TRACE = 'TRACE', +} diff --git a/web-client/iron-remote-gui/src/enums/ModifierKey.ts b/web-client/iron-remote-gui/src/enums/ModifierKey.ts index 089f7239..4c6a218c 100644 --- a/web-client/iron-remote-gui/src/enums/ModifierKey.ts +++ b/web-client/iron-remote-gui/src/enums/ModifierKey.ts @@ -1,14 +1,14 @@ export enum ModifierKey { - CTRL_LEFT = "ControlLeft", - SHIFT_LEFT = "ShiftLeft", - SHIFT_RIGHT = "ShiftRight", - ALT_LEFT = "AltLeft", - CTRL_RIGHT = "ControlRight", - ALT_RIGHT = "AltRight", - "ControlLeft" = CTRL_LEFT, - "ShiftLeft" = SHIFT_LEFT, - "ShiftRight" = SHIFT_RIGHT, - "AltLeft" = ALT_LEFT, - "ControlRight" = CTRL_RIGHT, - "AltRight" = ALT_RIGHT, -} \ No newline at end of file + CTRL_LEFT = 'ControlLeft', + SHIFT_LEFT = 'ShiftLeft', + SHIFT_RIGHT = 'ShiftRight', + ALT_LEFT = 'AltLeft', + CTRL_RIGHT = 'ControlRight', + ALT_RIGHT = 'AltRight', + 'ControlLeft' = CTRL_LEFT, + 'ShiftLeft' = SHIFT_LEFT, + 'ShiftRight' = SHIFT_RIGHT, + 'AltLeft' = ALT_LEFT, + 'ControlRight' = CTRL_RIGHT, + 'AltRight' = ALT_RIGHT, +} diff --git a/web-client/iron-remote-gui/src/enums/MouseButton.ts b/web-client/iron-remote-gui/src/enums/MouseButton.ts index 4dbcdc3a..7f83de43 100644 --- a/web-client/iron-remote-gui/src/enums/MouseButton.ts +++ b/web-client/iron-remote-gui/src/enums/MouseButton.ts @@ -3,5 +3,5 @@ MIDDLE = 1, RIGHT = 2, BROWSER_BACK = 3, - BROWSER_FORWARD = 4 + BROWSER_FORWARD = 4, } diff --git a/web-client/iron-remote-gui/src/enums/MouseButtonState.ts b/web-client/iron-remote-gui/src/enums/MouseButtonState.ts index 91c4d6fe..c202cc0e 100644 --- a/web-client/iron-remote-gui/src/enums/MouseButtonState.ts +++ b/web-client/iron-remote-gui/src/enums/MouseButtonState.ts @@ -1,4 +1,4 @@ export enum MouseButtonState { MOUSE_DOWN, - MOUSE_UP + MOUSE_UP, } diff --git a/web-client/iron-remote-gui/src/enums/OS.ts b/web-client/iron-remote-gui/src/enums/OS.ts index 91825a13..0d54712a 100644 --- a/web-client/iron-remote-gui/src/enums/OS.ts +++ b/web-client/iron-remote-gui/src/enums/OS.ts @@ -1,5 +1,5 @@ export enum OS { WINDOWS = 'windows', LINUX = 'linux', - ANDROID = 'android' -} \ No newline at end of file + ANDROID = 'android', +} diff --git a/web-client/iron-remote-gui/src/enums/ScreenScale.ts b/web-client/iron-remote-gui/src/enums/ScreenScale.ts index 6ab0a3f7..16244950 100644 --- a/web-client/iron-remote-gui/src/enums/ScreenScale.ts +++ b/web-client/iron-remote-gui/src/enums/ScreenScale.ts @@ -1,5 +1,5 @@ export enum ScreenScale { Fit = 1, Full = 2, - Real = 3 + Real = 3, } diff --git a/web-client/iron-remote-gui/src/enums/SessionEventType.ts b/web-client/iron-remote-gui/src/enums/SessionEventType.ts index 3cf24383..07418e2a 100644 --- a/web-client/iron-remote-gui/src/enums/SessionEventType.ts +++ b/web-client/iron-remote-gui/src/enums/SessionEventType.ts @@ -1,5 +1,5 @@ export enum SessionEventType { STARTED, TERMINATED, - ERROR + ERROR, } diff --git a/web-client/iron-remote-gui/src/enums/SpecialCombination.ts b/web-client/iron-remote-gui/src/enums/SpecialCombination.ts index 04a8f133..e335f94b 100644 --- a/web-client/iron-remote-gui/src/enums/SpecialCombination.ts +++ b/web-client/iron-remote-gui/src/enums/SpecialCombination.ts @@ -1,4 +1,4 @@ export enum SpecialCombination { CTRL_ALT_DEL, - META + META, } diff --git a/web-client/iron-remote-gui/src/interfaces/DesktopSize.ts b/web-client/iron-remote-gui/src/interfaces/DesktopSize.ts index 3cad8abf..69865b3f 100644 --- a/web-client/iron-remote-gui/src/interfaces/DesktopSize.ts +++ b/web-client/iron-remote-gui/src/interfaces/DesktopSize.ts @@ -1,4 +1,4 @@ export interface DesktopSize { - width: number, - height: number + width: number; + height: number; } diff --git a/web-client/iron-remote-gui/src/interfaces/NewSessionInfo.ts b/web-client/iron-remote-gui/src/interfaces/NewSessionInfo.ts index 6ab9e42e..7292e265 100644 --- a/web-client/iron-remote-gui/src/interfaces/NewSessionInfo.ts +++ b/web-client/iron-remote-gui/src/interfaces/NewSessionInfo.ts @@ -1,7 +1,7 @@ -import type {DesktopSize} from './DesktopSize'; +import type { DesktopSize } from './DesktopSize'; export interface NewSessionInfo { - session_id: number, - websocket_port: number, - initial_desktop_size: DesktopSize, + session_id: number; + websocket_port: number; + initial_desktop_size: DesktopSize; } diff --git a/web-client/iron-remote-gui/src/interfaces/ResizeEvent.ts b/web-client/iron-remote-gui/src/interfaces/ResizeEvent.ts index ee8b31ca..e03a1313 100644 --- a/web-client/iron-remote-gui/src/interfaces/ResizeEvent.ts +++ b/web-client/iron-remote-gui/src/interfaces/ResizeEvent.ts @@ -1,6 +1,6 @@ -import type {DesktopSize} from './DesktopSize'; +import type { DesktopSize } from './DesktopSize'; export interface ResizeEvent { - session_id: number, - desktop_size: DesktopSize, + session_id: number; + desktop_size: DesktopSize; } diff --git a/web-client/iron-remote-gui/src/interfaces/UserInteraction.ts b/web-client/iron-remote-gui/src/interfaces/UserInteraction.ts index 7f207b18..6ee11bee 100644 --- a/web-client/iron-remote-gui/src/interfaces/UserInteraction.ts +++ b/web-client/iron-remote-gui/src/interfaces/UserInteraction.ts @@ -1,20 +1,29 @@ -import type {ScreenScale} from '../enums/ScreenScale'; -import type {Observable} from 'rxjs'; -import type {NewSessionInfo} from './NewSessionInfo'; -import type {SessionEvent} from './session-event'; -import type {DesktopSize} from './DesktopSize'; +import type { ScreenScale } from '../enums/ScreenScale'; +import type { Observable } from 'rxjs'; +import type { NewSessionInfo } from './NewSessionInfo'; +import type { SessionEvent } from './session-event'; +import type { DesktopSize } from './DesktopSize'; export interface UserInteraction { setVisibility(state: boolean): void; setScale(scale: ScreenScale): void; - connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string, desktopSize?: DesktopSize, preConnectionBlob?: string): Observable; + connect( + username: string, + password: string, + destination: string, + proxyAddress: string, + serverDomain: string, + authToken: string, + desktopSize?: DesktopSize, + preConnectionBlob?: string, + ): Observable; ctrlAltDel(): void; metaKey(): void; - + shutdown(): void; sessionListener: Observable; diff --git a/web-client/iron-remote-gui/src/interfaces/session-event.ts b/web-client/iron-remote-gui/src/interfaces/session-event.ts index e9005789..39fb6748 100644 --- a/web-client/iron-remote-gui/src/interfaces/session-event.ts +++ b/web-client/iron-remote-gui/src/interfaces/session-event.ts @@ -1,7 +1,7 @@ -import type {SessionEventType} from '../enums/SessionEventType'; +import type { SessionEventType } from '../enums/SessionEventType'; import type { IronRdpError } from '../../../../crates/ironrdp-web/pkg/ironrdp_web'; export interface SessionEvent { - type: SessionEventType, - data?: IronRdpError | string + type: SessionEventType; + data?: IronRdpError | string; } diff --git a/web-client/iron-remote-gui/src/iron-remote-gui.svelte b/web-client/iron-remote-gui/src/iron-remote-gui.svelte index abdf3694..ef97f4d9 100644 --- a/web-client/iron-remote-gui/src/iron-remote-gui.svelte +++ b/web-client/iron-remote-gui/src/iron-remote-gui.svelte @@ -1,18 +1,18 @@ - + -
-
+
+
setMouseButtonState(event, true)} - on:mouseup={(event) => setMouseButtonState(event, false)} - on:mouseleave={(event) => { - setMouseButtonState(event, false); - setMouseOut(event); - } - } - on:mouseenter={(event) => { - setMouseIn(event); - } - } - on:contextmenu={(event) => event.preventDefault()} - on:wheel={mouseWheel} - id="renderer" + on:mousemove={getMousePos} + on:mousedown={(event) => setMouseButtonState(event, true)} + on:mouseup={(event) => setMouseButtonState(event, false)} + on:mouseleave={(event) => { + setMouseButtonState(event, false); + setMouseOut(event); + }} + on:mouseenter={(event) => { + setMouseIn(event); + }} + on:contextmenu={(event) => event.preventDefault()} + on:wheel={mouseWheel} + id="renderer" />
@@ -294,7 +300,7 @@ } .capturing-inputs { - outline: 1px solid rgba(0, 97, 166, .7); + outline: 1px solid rgba(0, 97, 166, 0.7); outline-offset: -1px; } diff --git a/web-client/iron-remote-gui/src/lib/scancodes.ts b/web-client/iron-remote-gui/src/lib/scancodes.ts index 4e62f8d5..c9c4d69e 100644 --- a/web-client/iron-remote-gui/src/lib/scancodes.ts +++ b/web-client/iron-remote-gui/src/lib/scancodes.ts @@ -1,5 +1,5 @@ import UAParser from 'ua-parser-js'; -import type {OS} from '../enums/OS'; +import type { OS } from '../enums/OS'; /* * Scancode found on: https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values @@ -16,816 +16,816 @@ type CodeMap = Record; export const ScanCodeToCode: CodeMap = { windows: { blink: { - "0x0001": "Escape", - "0x0002": "Digit1", - "0x0003": "Digit2", - "0x0004": "Digit3", - "0x0005": "Digit4", - "0x0006": "Digit5", - "0x0007": "Digit6", - "0x0008": "Digit7", - "0x0009": "Digit8", - "0x000A": "Digit9", - "0x000B": "Digit0", - "0x000C": "Minus", - "0x000D": "Equal", - "0x000E": "Backspace", - "0x000F": "Tab", - "0x0010": "KeyQ", - "0x0011": "KeyW", - "0x0012": "KeyE", - "0x0013": "KeyR", - "0x0014": "KeyT", - "0x0015": "KeyY", - "0x0016": "KeyU", - "0x0017": "KeyI", - "0x0018": "KeyO", - "0x0019": "KeyP", - "0x001A": "BracketLeft", - "0x001B": "BracketRight", - "0x001C": "Enter", - "0x001D": "ControlLeft", - "0x001E": "KeyA", - "0x001F": "KeyS", - "0x0020": "KeyD", - "0x0021": "KeyF", - "0x0022": "KeyG", - "0x0023": "KeyH", - "0x0024": "KeyJ", - "0x0025": "KeyK", - "0x0026": "KeyL", - "0x0027": "Semicolon", - "0x0028": "Quote", - "0x0029": "Backquote", - "0x002A": "ShiftLeft", - "0x002B": "Backslash", - "0x002C": "KeyZ", - "0x002D": "KeyX", - "0x002E": "KeyC", - "0x002F": "KeyV", - "0x0030": "KeyB", - "0x0031": "KeyN", - "0x0032": "KeyM", - "0x0033": "Comma", - "0x0034": "Period", - "0x0035": "Slash", - "0x0036": "ShiftRight", - "0x0037": "NumpadMultiply", - "0x0038": "AltLeft", - "0x0039": "Space", - "0x003A": "CapsLock", - "0x003B": "F1", - "0x003C": "F2", - "0x003D": "F3", - "0x003E": "F4", - "0x003F": "F5", - "0x0040": "F6", - "0x0041": "F7", - "0x0042": "F8", - "0x0043": "F9", - "0x0044": "F10", - "0x0045": "Pause", - "0x0046": "ScrollLock", - "0x0047": "Numpad7", - "0x0048": "Numpad8", - "0x0049": "Numpad9", - "0x004A": "NumpadSubtract", - "0x004B": "Numpad4", - "0x004C": "Numpad5", - "0x004D": "Numpad6", - "0x004E": "NumpadAdd", - "0x004F": "Numpad1", - "0x0050": "Numpad2", - "0x0051": "Numpad3", - "0x0052": "Numpad0", - "0x0053": "NumpadDecimal", - "0x0056": "IntlBackslash", - "0x0057": "F11", - "0x0058": "F12", - "0x0059": "NumpadEqual", - "0x0064": "F13", - "0x0065": "F14", - "0x0066": "F15", - "0x0067": "F16", - "0x0068": "F17", - "0x0069": "F18", - "0x006A": "F19", - "0x006B": "F20", - "0x006C": "F21", - "0x006D": "F22", - "0x006E": "F23", - "0x0070": "KanaMode", - "0x0071": "Lang2", - "0x0072": "Lang1", - "0x0073": "IntlRo", - "0x0076": "F24", - "0x0077": "Lang4", - "0x0078": "Lang3", - "0x0079": "Convert", - "0x007B": "NonConvert", - "0x007D": "IntlYen", - "0x007E": "NumpadComma", - "0xE008": "Undo", - "0xE00A": "Paste", - "0xE010": "MediaTrackPrevious", - "0xE017": "Cut", - "0xE018": "Copy", - "0xE019": "MediaTrackNext", - "0xE01C": "NumpadEnter", - "0xE01D": "ControlRight", - "0xE020": "AudioVolumeMute", - "0xE021": "LaunchApp2", - "0xE022": "MediaPlayPause", - "0xE024": "MediaStop", - "0xE02C": "Eject", - "0xE02E": "AudioVolumeDown", - "0xE030": "AudioVolumeUp", - "0xE032": "BrowserHome", - "0xE035": "NumpadDivide", - "0xE037": "PrintScreen", - "0xE038": "AltRight", - "0xE03B": "Help", - "0xE045": "NumLock", - "0xE046": "Pause", - "0xE047": "Home", - "0xE048": "ArrowUp", - "0xE049": "PageUp", - "0xE04B": "ArrowLeft", - "0xE04D": "ArrowRight", - "0xE04F": "End", - "0xE050": "ArrowDown", - "0xE051": "PageDown", - "0xE052": "Insert", - "0xE053": "Delete", - "0xE05B": "MetaLeft", - "0xE05C": "MetaRight", - "0xE05D": "ContextMenu", - "0xE05E": "Power", - "0xE05F": "Sleep", - "0xE063": "WakeUp", - "0xE065": "BrowserSearch", - "0xE066": "BrowserFavorites", - "0xE067": "BrowserRefresh", - "0xE068": "BrowserStop", - "0xE069": "BrowserForward", - "0xE06A": "BrowserBack", - "0xE06B": "LaunchApp1", - "0xE06C": "LaunchMail", - "0xE06D": "MediaSelect", + '0x0001': 'Escape', + '0x0002': 'Digit1', + '0x0003': 'Digit2', + '0x0004': 'Digit3', + '0x0005': 'Digit4', + '0x0006': 'Digit5', + '0x0007': 'Digit6', + '0x0008': 'Digit7', + '0x0009': 'Digit8', + '0x000A': 'Digit9', + '0x000B': 'Digit0', + '0x000C': 'Minus', + '0x000D': 'Equal', + '0x000E': 'Backspace', + '0x000F': 'Tab', + '0x0010': 'KeyQ', + '0x0011': 'KeyW', + '0x0012': 'KeyE', + '0x0013': 'KeyR', + '0x0014': 'KeyT', + '0x0015': 'KeyY', + '0x0016': 'KeyU', + '0x0017': 'KeyI', + '0x0018': 'KeyO', + '0x0019': 'KeyP', + '0x001A': 'BracketLeft', + '0x001B': 'BracketRight', + '0x001C': 'Enter', + '0x001D': 'ControlLeft', + '0x001E': 'KeyA', + '0x001F': 'KeyS', + '0x0020': 'KeyD', + '0x0021': 'KeyF', + '0x0022': 'KeyG', + '0x0023': 'KeyH', + '0x0024': 'KeyJ', + '0x0025': 'KeyK', + '0x0026': 'KeyL', + '0x0027': 'Semicolon', + '0x0028': 'Quote', + '0x0029': 'Backquote', + '0x002A': 'ShiftLeft', + '0x002B': 'Backslash', + '0x002C': 'KeyZ', + '0x002D': 'KeyX', + '0x002E': 'KeyC', + '0x002F': 'KeyV', + '0x0030': 'KeyB', + '0x0031': 'KeyN', + '0x0032': 'KeyM', + '0x0033': 'Comma', + '0x0034': 'Period', + '0x0035': 'Slash', + '0x0036': 'ShiftRight', + '0x0037': 'NumpadMultiply', + '0x0038': 'AltLeft', + '0x0039': 'Space', + '0x003A': 'CapsLock', + '0x003B': 'F1', + '0x003C': 'F2', + '0x003D': 'F3', + '0x003E': 'F4', + '0x003F': 'F5', + '0x0040': 'F6', + '0x0041': 'F7', + '0x0042': 'F8', + '0x0043': 'F9', + '0x0044': 'F10', + '0x0045': 'Pause', + '0x0046': 'ScrollLock', + '0x0047': 'Numpad7', + '0x0048': 'Numpad8', + '0x0049': 'Numpad9', + '0x004A': 'NumpadSubtract', + '0x004B': 'Numpad4', + '0x004C': 'Numpad5', + '0x004D': 'Numpad6', + '0x004E': 'NumpadAdd', + '0x004F': 'Numpad1', + '0x0050': 'Numpad2', + '0x0051': 'Numpad3', + '0x0052': 'Numpad0', + '0x0053': 'NumpadDecimal', + '0x0056': 'IntlBackslash', + '0x0057': 'F11', + '0x0058': 'F12', + '0x0059': 'NumpadEqual', + '0x0064': 'F13', + '0x0065': 'F14', + '0x0066': 'F15', + '0x0067': 'F16', + '0x0068': 'F17', + '0x0069': 'F18', + '0x006A': 'F19', + '0x006B': 'F20', + '0x006C': 'F21', + '0x006D': 'F22', + '0x006E': 'F23', + '0x0070': 'KanaMode', + '0x0071': 'Lang2', + '0x0072': 'Lang1', + '0x0073': 'IntlRo', + '0x0076': 'F24', + '0x0077': 'Lang4', + '0x0078': 'Lang3', + '0x0079': 'Convert', + '0x007B': 'NonConvert', + '0x007D': 'IntlYen', + '0x007E': 'NumpadComma', + '0xE008': 'Undo', + '0xE00A': 'Paste', + '0xE010': 'MediaTrackPrevious', + '0xE017': 'Cut', + '0xE018': 'Copy', + '0xE019': 'MediaTrackNext', + '0xE01C': 'NumpadEnter', + '0xE01D': 'ControlRight', + '0xE020': 'AudioVolumeMute', + '0xE021': 'LaunchApp2', + '0xE022': 'MediaPlayPause', + '0xE024': 'MediaStop', + '0xE02C': 'Eject', + '0xE02E': 'AudioVolumeDown', + '0xE030': 'AudioVolumeUp', + '0xE032': 'BrowserHome', + '0xE035': 'NumpadDivide', + '0xE037': 'PrintScreen', + '0xE038': 'AltRight', + '0xE03B': 'Help', + '0xE045': 'NumLock', + '0xE046': 'Pause', + '0xE047': 'Home', + '0xE048': 'ArrowUp', + '0xE049': 'PageUp', + '0xE04B': 'ArrowLeft', + '0xE04D': 'ArrowRight', + '0xE04F': 'End', + '0xE050': 'ArrowDown', + '0xE051': 'PageDown', + '0xE052': 'Insert', + '0xE053': 'Delete', + '0xE05B': 'MetaLeft', + '0xE05C': 'MetaRight', + '0xE05D': 'ContextMenu', + '0xE05E': 'Power', + '0xE05F': 'Sleep', + '0xE063': 'WakeUp', + '0xE065': 'BrowserSearch', + '0xE066': 'BrowserFavorites', + '0xE067': 'BrowserRefresh', + '0xE068': 'BrowserStop', + '0xE069': 'BrowserForward', + '0xE06A': 'BrowserBack', + '0xE06B': 'LaunchApp1', + '0xE06C': 'LaunchMail', + '0xE06D': 'MediaSelect', }, gecko: { - "0x0001": "Escape", - "0x0002": "Digit1", - "0x0003": "Digit2", - "0x0004": "Digit3", - "0x0005": "Digit4", - "0x0006": "Digit5", - "0x0007": "Digit6", - "0x0008": "Digit7", - "0x0009": "Digit8", - "0x000A": "Digit9", - "0x000B": "Digit0", - "0x000C": "Minus", - "0x000D": "Equal", - "0x000E": "Backspace", - "0x000F": "Tab", - "0x0010": "KeyQ", - "0x0011": "KeyW", - "0x0012": "KeyE", - "0x0013": "KeyR", - "0x0014": "KeyT", - "0x0015": "KeyY", - "0x0016": "KeyU", - "0x0017": "KeyI", - "0x0018": "KeyO", - "0x0019": "KeyP", - "0x001A": "BracketLeft", - "0x001B": "BracketRight", - "0x001C": "Enter", - "0x001D": "ControlLeft", - "0x001E": "KeyA", - "0x001F": "KeyS", - "0x0020": "KeyD", - "0x0021": "KeyF", - "0x0022": "KeyG", - "0x0023": "KeyH", - "0x0024": "KeyJ", - "0x0025": "KeyK", - "0x0026": "KeyL", - "0x0027": "Semicolon", - "0x0028": "Quote", - "0x0029": "Backquote", - "0x002A": "ShiftLeft", - "0x002B": "Backslash", - "0x002C": "KeyZ", - "0x002D": "KeyX", - "0x002E": "KeyC", - "0x002F": "KeyV", - "0x0030": "KeyB", - "0x0031": "KeyN", - "0x0032": "KeyM", - "0x0033": "Comma", - "0x0034": "Period", - "0x0035": "Slash", - "0x0036": "ShiftRight", - "0x0037": "NumpadMultiply", - "0x0038": "AltLeft", - "0x0039": "Space", - "0x003A": "CapsLock", - "0x003B": "F1", - "0x003C": "F2", - "0x003D": "F3", - "0x003E": "F4", - "0x003F": "F5", - "0x0040": "F6", - "0x0041": "F7", - "0x0042": "F8", - "0x0043": "F9", - "0x0044": "F10", - "0x0045": "Pause", - "0x0046": "ScrollLock", - "0x0047": "Numpad7", - "0x0048": "Numpad8", - "0x0049": "Numpad9", - "0x004A": "NumpadSubtract", - "0x004B": "Numpad4", - "0x004C": "Numpad5", - "0x004D": "Numpad6", - "0x004E": "NumpadAdd", - "0x004F": "Numpad1", - "0x0050": "Numpad2", - "0x0051": "Numpad3", - "0x0052": "Numpad0", - "0x0053": "NumpadDecimal", - "0x0054": "PrintScreen", - "0x0056": "IntlBackslash", - "0x0057": "F11", - "0x0058": "F12", - "0x0059": "NumpadEqual", - "0x0064": "F13", - "0x0065": "F14", - "0x0066": "F15", - "0x0067": "F16", - "0x0068": "F17", - "0x0069": "F18", - "0x006A": "F19", - "0x006B": "F20", - "0x006C": "F21", - "0x006D": "F22", - "0x006E": "F23", - "0x0070": "KanaMode", - "0x0071": "Lang2", - "0x0072": "Lang1", - "0x0073": "IntlRo", - "0x0076": "F24", - "0x0079": "Convert", - "0x007B": "NonConvert", - "0x007D": "IntlYen", - "0x007E": "NumpadComma", - "0xE010": "MediaTrackPrevious", - "0xE019": "MediaTrackNext", - "0xE01C": "NumpadEnter", - "0xE01D": "ControlRight", - "0xE020": "AudioVolumeMute", - "0xE021": "LaunchApp2", - "0xE022": "MediaPlayPause", - "0xE024": "MediaStop", - "0xE02E": "VolumeDown", - "0xE030": "VolumeUp", - "0xE032": "BrowserHome", - "0xE035": "NumpadDivide", - "0xE037": "PrintScreen", - "0xE038": "AltRight", - "0xE045": "NumLock", - "0xE046": "Pause", - "0xE047": "Home", - "0xE048": "ArrowUp", - "0xE049": "PageUp", - "0xE04B": "ArrowLeft", - "0xE04D": "ArrowRight", - "0xE04F": "End", - "0xE050": "ArrowDown", - "0xE051": "PageDown", - "0xE052": "Insert", - "0xE053": "Delete", - "0xE05B": "OSLeft", - "0xE05C": "OSRight", - "0xE05D": "ContextMenu", - "0xE05E": "Power", - "0xE065": "BrowserSearch", - "0xE066": "BrowserFavorites", - "0xE067": "BrowserRefresh", - "0xE068": "BrowserStop", - "0xE069": "BrowserForward", - "0xE06A": "BrowserBack", - "0xE06B": "LaunchApp1", - "0xE06C": "LaunchMail", - "0xE06D": "MediaSelect", - "0xE0F1": "Lang2", - "0xE0F2": "Lang1", - } + '0x0001': 'Escape', + '0x0002': 'Digit1', + '0x0003': 'Digit2', + '0x0004': 'Digit3', + '0x0005': 'Digit4', + '0x0006': 'Digit5', + '0x0007': 'Digit6', + '0x0008': 'Digit7', + '0x0009': 'Digit8', + '0x000A': 'Digit9', + '0x000B': 'Digit0', + '0x000C': 'Minus', + '0x000D': 'Equal', + '0x000E': 'Backspace', + '0x000F': 'Tab', + '0x0010': 'KeyQ', + '0x0011': 'KeyW', + '0x0012': 'KeyE', + '0x0013': 'KeyR', + '0x0014': 'KeyT', + '0x0015': 'KeyY', + '0x0016': 'KeyU', + '0x0017': 'KeyI', + '0x0018': 'KeyO', + '0x0019': 'KeyP', + '0x001A': 'BracketLeft', + '0x001B': 'BracketRight', + '0x001C': 'Enter', + '0x001D': 'ControlLeft', + '0x001E': 'KeyA', + '0x001F': 'KeyS', + '0x0020': 'KeyD', + '0x0021': 'KeyF', + '0x0022': 'KeyG', + '0x0023': 'KeyH', + '0x0024': 'KeyJ', + '0x0025': 'KeyK', + '0x0026': 'KeyL', + '0x0027': 'Semicolon', + '0x0028': 'Quote', + '0x0029': 'Backquote', + '0x002A': 'ShiftLeft', + '0x002B': 'Backslash', + '0x002C': 'KeyZ', + '0x002D': 'KeyX', + '0x002E': 'KeyC', + '0x002F': 'KeyV', + '0x0030': 'KeyB', + '0x0031': 'KeyN', + '0x0032': 'KeyM', + '0x0033': 'Comma', + '0x0034': 'Period', + '0x0035': 'Slash', + '0x0036': 'ShiftRight', + '0x0037': 'NumpadMultiply', + '0x0038': 'AltLeft', + '0x0039': 'Space', + '0x003A': 'CapsLock', + '0x003B': 'F1', + '0x003C': 'F2', + '0x003D': 'F3', + '0x003E': 'F4', + '0x003F': 'F5', + '0x0040': 'F6', + '0x0041': 'F7', + '0x0042': 'F8', + '0x0043': 'F9', + '0x0044': 'F10', + '0x0045': 'Pause', + '0x0046': 'ScrollLock', + '0x0047': 'Numpad7', + '0x0048': 'Numpad8', + '0x0049': 'Numpad9', + '0x004A': 'NumpadSubtract', + '0x004B': 'Numpad4', + '0x004C': 'Numpad5', + '0x004D': 'Numpad6', + '0x004E': 'NumpadAdd', + '0x004F': 'Numpad1', + '0x0050': 'Numpad2', + '0x0051': 'Numpad3', + '0x0052': 'Numpad0', + '0x0053': 'NumpadDecimal', + '0x0054': 'PrintScreen', + '0x0056': 'IntlBackslash', + '0x0057': 'F11', + '0x0058': 'F12', + '0x0059': 'NumpadEqual', + '0x0064': 'F13', + '0x0065': 'F14', + '0x0066': 'F15', + '0x0067': 'F16', + '0x0068': 'F17', + '0x0069': 'F18', + '0x006A': 'F19', + '0x006B': 'F20', + '0x006C': 'F21', + '0x006D': 'F22', + '0x006E': 'F23', + '0x0070': 'KanaMode', + '0x0071': 'Lang2', + '0x0072': 'Lang1', + '0x0073': 'IntlRo', + '0x0076': 'F24', + '0x0079': 'Convert', + '0x007B': 'NonConvert', + '0x007D': 'IntlYen', + '0x007E': 'NumpadComma', + '0xE010': 'MediaTrackPrevious', + '0xE019': 'MediaTrackNext', + '0xE01C': 'NumpadEnter', + '0xE01D': 'ControlRight', + '0xE020': 'AudioVolumeMute', + '0xE021': 'LaunchApp2', + '0xE022': 'MediaPlayPause', + '0xE024': 'MediaStop', + '0xE02E': 'VolumeDown', + '0xE030': 'VolumeUp', + '0xE032': 'BrowserHome', + '0xE035': 'NumpadDivide', + '0xE037': 'PrintScreen', + '0xE038': 'AltRight', + '0xE045': 'NumLock', + '0xE046': 'Pause', + '0xE047': 'Home', + '0xE048': 'ArrowUp', + '0xE049': 'PageUp', + '0xE04B': 'ArrowLeft', + '0xE04D': 'ArrowRight', + '0xE04F': 'End', + '0xE050': 'ArrowDown', + '0xE051': 'PageDown', + '0xE052': 'Insert', + '0xE053': 'Delete', + '0xE05B': 'OSLeft', + '0xE05C': 'OSRight', + '0xE05D': 'ContextMenu', + '0xE05E': 'Power', + '0xE065': 'BrowserSearch', + '0xE066': 'BrowserFavorites', + '0xE067': 'BrowserRefresh', + '0xE068': 'BrowserStop', + '0xE069': 'BrowserForward', + '0xE06A': 'BrowserBack', + '0xE06B': 'LaunchApp1', + '0xE06C': 'LaunchMail', + '0xE06D': 'MediaSelect', + '0xE0F1': 'Lang2', + '0xE0F2': 'Lang1', + }, }, linux: { gecko: { - "0x0009": "Escape", - "0x000A": "Digit1", - "0x000B": "Digit2", - "0x000C": "Digit3", - "0x000D": "Digit4", - "0x000E": "Digit5", - "0x000F": "Digit6", - "0x0010": "Digit7", - "0x0011": "Digit8", - "0x0012": "Digit9", - "0x0013": "Digit0", - "0x0014": "Minus", - "0x0015": "Equal", - "0x0016": "Backspace", - "0x0017": "Tab", - "0x0018": "KeyQ", - "0x0019": "KeyW", - "0x001A": "KeyE", - "0x001B": "KeyR", - "0x001C": "KeyT", - "0x001D": "KeyY", - "0x001E": "KeyU", - "0x001F": "KeyI", - "0x0020": "KeyO", - "0x0021": "KeyP", - "0x0022": "BracketLeft", - "0x0023": "BracketRight", - "0x0024": "Enter", - "0x0025": "ControlLeft", - "0x0026": "KeyA", - "0x0027": "KeyS", - "0x0028": "KeyD", - "0x0029": "KeyF", - "0x002A": "KeyG", - "0x002B": "KeyH", - "0x002C": "KeyJ", - "0x002D": "KeyK", - "0x002E": "KeyL", - "0x002F": "Semicolon", - "0x0030": "Quote", - "0x0031": "Backquote", - "0x0032": "ShiftLeft", - "0x0033": "Backslash", - "0x0034": "KeyZ", - "0x0035": "KeyX", - "0x0036": "KeyC", - "0x0037": "KeyV", - "0x0038": "KeyB", - "0x0039": "KeyN", - "0x003A": "KeyM", - "0x003B": "Comma", - "0x003C": "Period", - "0x003D": "Slash", - "0x003E": "ShiftRight", - "0x003F": "NumpadMultiply", - "0x0040": "AltLeft", - "0x0041": "Space", - "0x0042": "CapsLock", - "0x0043": "F1", - "0x0044": "F2", - "0x0045": "F3", - "0x0046": "F4", - "0x0047": "F5", - "0x0048": "F6", - "0x0049": "F7", - "0x004A": "F8", - "0x004B": "F9", - "0x004C": "F10", - "0x004D": "NumLock", - "0x004E": "ScrollLock", - "0x004F": "Numpad7", - "0x0050": "Numpad8", - "0x0051": "Numpad9", - "0x0052": "NumpadSubtract", - "0x0053": "Numpad4", - "0x0054": "Numpad5", - "0x0055": "Numpad6", - "0x0056": "NumpadAdd", - "0x0057": "Numpad1", - "0x0058": "Numpad2", - "0x0059": "Numpad3", - "0x005A": "Numpad0", - "0x005B": "NumpadDecimal", - "0x005E": "IntlBackslash", - "0x005F": "F11", - "0x0060": "F12", - "0x0061": "IntlRo", - "0x0064": "Convert", - "0x0065": "KanaMode", - "0x0066": "NonConvert", - "0x0068": "NumpadEnter", - "0x0069": "ControlRight", - "0x006A": "NumpadDivide", - "0x006B": "PrintScreen", - "0x006C": "AltRight", - "0x006E": "Home", - "0x006F": "ArrowUp", - "0x0070": "PageUp", - "0x0071": "ArrowLeft", - "0x0072": "ArrowRight", - "0x0073": "End", - "0x0074": "ArrowDown", - "0x0075": "PageDown", - "0x0076": "Insert", - "0x0077": "Delete", - "0x0079": "VolumeMute", - "0x007A": "VolumeDown", - "0x007B": "VolumeUp", - "0x007D": "NumpadEqual", - "0x007F": "Pause", - "0x0081": "NumpadComma", - "0x0082": "Lang1", - "0x0083": "Lang2", - "0x0084": "IntlYen", - "0x0085": "OSLeft", - "0x0086": "OSRight", - "0x0087": "ContextMenu", - "0x0088": "BrowserStop", - "0x0089": "Again", - "0x008A": "Props", - "0x008B": "Undo", - "0x008C": "Select", - "0x008D": "Copy", - "0x008E": "Open", - "0x008F": "Paste", - "0x0090": "Find", - "0x0091": "Cut", - "0x0092": "Help", - "0x0094": "LaunchApp2", - "0x0097": "WakeUp", - "0x0098": "LaunchApp1", - "0x00A3": "LaunchMail", - "0x00A4": "BrowserFavorites", - "0x00A5": "Unidentified", - "0x00A6": "BrowserBack", - "0x00A7": "BrowserForward", - "0x00A9": "Eject", - "0x00AB": "MediaTrackNext", - "0x00AC": "MediaPlayPause", - "0x00AD": "MediaTrackPrevious", - "0x00AE": "MediaStop", - "0x00B3": "MediaSelect", - "0x00B4": "BrowserHome", - "0x00B5": "BrowserRefresh", - "0x00BF": "F13", - "0x00C0": "F14", - "0x00C1": "F15", - "0x00C2": "F16", - "0x00C3": "F17", - "0x00C4": "F18", - "0x00C5": "F19", - "0x00C6": "F20", - "0x00C7": "F21", - "0x00C8": "F22", - "0x00C9": "F23", - "0x00CA": "F24", - "0x00E1": "BrowserSearch", + '0x0009': 'Escape', + '0x000A': 'Digit1', + '0x000B': 'Digit2', + '0x000C': 'Digit3', + '0x000D': 'Digit4', + '0x000E': 'Digit5', + '0x000F': 'Digit6', + '0x0010': 'Digit7', + '0x0011': 'Digit8', + '0x0012': 'Digit9', + '0x0013': 'Digit0', + '0x0014': 'Minus', + '0x0015': 'Equal', + '0x0016': 'Backspace', + '0x0017': 'Tab', + '0x0018': 'KeyQ', + '0x0019': 'KeyW', + '0x001A': 'KeyE', + '0x001B': 'KeyR', + '0x001C': 'KeyT', + '0x001D': 'KeyY', + '0x001E': 'KeyU', + '0x001F': 'KeyI', + '0x0020': 'KeyO', + '0x0021': 'KeyP', + '0x0022': 'BracketLeft', + '0x0023': 'BracketRight', + '0x0024': 'Enter', + '0x0025': 'ControlLeft', + '0x0026': 'KeyA', + '0x0027': 'KeyS', + '0x0028': 'KeyD', + '0x0029': 'KeyF', + '0x002A': 'KeyG', + '0x002B': 'KeyH', + '0x002C': 'KeyJ', + '0x002D': 'KeyK', + '0x002E': 'KeyL', + '0x002F': 'Semicolon', + '0x0030': 'Quote', + '0x0031': 'Backquote', + '0x0032': 'ShiftLeft', + '0x0033': 'Backslash', + '0x0034': 'KeyZ', + '0x0035': 'KeyX', + '0x0036': 'KeyC', + '0x0037': 'KeyV', + '0x0038': 'KeyB', + '0x0039': 'KeyN', + '0x003A': 'KeyM', + '0x003B': 'Comma', + '0x003C': 'Period', + '0x003D': 'Slash', + '0x003E': 'ShiftRight', + '0x003F': 'NumpadMultiply', + '0x0040': 'AltLeft', + '0x0041': 'Space', + '0x0042': 'CapsLock', + '0x0043': 'F1', + '0x0044': 'F2', + '0x0045': 'F3', + '0x0046': 'F4', + '0x0047': 'F5', + '0x0048': 'F6', + '0x0049': 'F7', + '0x004A': 'F8', + '0x004B': 'F9', + '0x004C': 'F10', + '0x004D': 'NumLock', + '0x004E': 'ScrollLock', + '0x004F': 'Numpad7', + '0x0050': 'Numpad8', + '0x0051': 'Numpad9', + '0x0052': 'NumpadSubtract', + '0x0053': 'Numpad4', + '0x0054': 'Numpad5', + '0x0055': 'Numpad6', + '0x0056': 'NumpadAdd', + '0x0057': 'Numpad1', + '0x0058': 'Numpad2', + '0x0059': 'Numpad3', + '0x005A': 'Numpad0', + '0x005B': 'NumpadDecimal', + '0x005E': 'IntlBackslash', + '0x005F': 'F11', + '0x0060': 'F12', + '0x0061': 'IntlRo', + '0x0064': 'Convert', + '0x0065': 'KanaMode', + '0x0066': 'NonConvert', + '0x0068': 'NumpadEnter', + '0x0069': 'ControlRight', + '0x006A': 'NumpadDivide', + '0x006B': 'PrintScreen', + '0x006C': 'AltRight', + '0x006E': 'Home', + '0x006F': 'ArrowUp', + '0x0070': 'PageUp', + '0x0071': 'ArrowLeft', + '0x0072': 'ArrowRight', + '0x0073': 'End', + '0x0074': 'ArrowDown', + '0x0075': 'PageDown', + '0x0076': 'Insert', + '0x0077': 'Delete', + '0x0079': 'VolumeMute', + '0x007A': 'VolumeDown', + '0x007B': 'VolumeUp', + '0x007D': 'NumpadEqual', + '0x007F': 'Pause', + '0x0081': 'NumpadComma', + '0x0082': 'Lang1', + '0x0083': 'Lang2', + '0x0084': 'IntlYen', + '0x0085': 'OSLeft', + '0x0086': 'OSRight', + '0x0087': 'ContextMenu', + '0x0088': 'BrowserStop', + '0x0089': 'Again', + '0x008A': 'Props', + '0x008B': 'Undo', + '0x008C': 'Select', + '0x008D': 'Copy', + '0x008E': 'Open', + '0x008F': 'Paste', + '0x0090': 'Find', + '0x0091': 'Cut', + '0x0092': 'Help', + '0x0094': 'LaunchApp2', + '0x0097': 'WakeUp', + '0x0098': 'LaunchApp1', + '0x00A3': 'LaunchMail', + '0x00A4': 'BrowserFavorites', + '0x00A5': 'Unidentified', + '0x00A6': 'BrowserBack', + '0x00A7': 'BrowserForward', + '0x00A9': 'Eject', + '0x00AB': 'MediaTrackNext', + '0x00AC': 'MediaPlayPause', + '0x00AD': 'MediaTrackPrevious', + '0x00AE': 'MediaStop', + '0x00B3': 'MediaSelect', + '0x00B4': 'BrowserHome', + '0x00B5': 'BrowserRefresh', + '0x00BF': 'F13', + '0x00C0': 'F14', + '0x00C1': 'F15', + '0x00C2': 'F16', + '0x00C3': 'F17', + '0x00C4': 'F18', + '0x00C5': 'F19', + '0x00C6': 'F20', + '0x00C7': 'F21', + '0x00C8': 'F22', + '0x00C9': 'F23', + '0x00CA': 'F24', + '0x00E1': 'BrowserSearch', }, blink: { - "0x0009": "Escape", - "0x000A": "Digit1", - "0x000B": "Digit2", - "0x000C": "Digit3", - "0x000D": "Digit4", - "0x000E": "Digit5", - "0x000F": "Digit6", - "0x0010": "Digit7", - "0x0011": "Digit8", - "0x0012": "Digit9", - "0x0013": "Digit0", - "0x0014": "Minus", - "0x0015": "Equal", - "0x0016": "Backspace", - "0x0017": "Tab", - "0x0018": "KeyQ", - "0x0019": "KeyW", - "0x001A": "KeyE", - "0x001B": "KeyR", - "0x001C": "KeyT", - "0x001D": "KeyY", - "0x001E": "KeyU", - "0x001F": "KeyI", - "0x0020": "KeyO", - "0x0021": "KeyP", - "0x0022": "BracketLeft", - "0x0023": "BracketRight", - "0x0024": "Enter", - "0x0025": "ControlLeft", - "0x0026": "KeyA", - "0x0027": "KeyS", - "0x0028": "KeyD", - "0x0029": "KeyF", - "0x002A": "KeyG", - "0x002B": "KeyH", - "0x002C": "KeyJ", - "0x002D": "KeyK", - "0x002E": "KeyL", - "0x002F": "Semicolon", - "0x0030": "Quote", - "0x0031": "Backquote", - "0x0032": "ShiftLeft", - "0x0033": "Backslash", - "0x0034": "KeyZ", - "0x0035": "KeyX", - "0x0036": "KeyC", - "0x0037": "KeyV", - "0x0038": "KeyB", - "0x0039": "KeyN", - "0x003A": "KeyM", - "0x003B": "Comma", - "0x003C": "Period", - "0x003D": "Slash", - "0x003E": "ShiftRight", - "0x003F": "NumpadMultiply", - "0x0040": "AltLeft", - "0x0041": "Space", - "0x0042": "CapsLock", - "0x0043": "F1", - "0x0044": "F2", - "0x0045": "F3", - "0x0046": "F4", - "0x0047": "F5", - "0x0048": "F6", - "0x0049": "F7", - "0x004A": "F8", - "0x004B": "F9", - "0x004C": "F10", - "0x004D": "NumLock", - "0x004E": "ScrollLock", - "0x004F": "Numpad7", - "0x0050": "Numpad8", - "0x0051": "Numpad9", - "0x0052": "NumpadSubtract", - "0x0053": "Numpad4", - "0x0054": "Numpad5", - "0x0055": "Numpad6", - "0x0056": "NumpadAdd", - "0x0057": "Numpad1", - "0x0058": "Numpad2", - "0x0059": "Numpad3", - "0x005A": "Numpad0", - "0x005B": "NumpadDecimal", - "0x005D": "Lang5", - "0x005E": "IntlBackslash", - "0x005F": "F11", - "0x0060": "F12", - "0x0061": "IntlRo", - "0x0062": "Lang3", - "0x0063": "Lang4", - "0x0064": "Convert", - "0x0065": "KanaMode", - "0x0066": "NonConvert", - "0x0068": "NumpadEnter", - "0x0069": "ControlRight", - "0x006A": "NumpadDivide", - "0x006B": "PrintScreen", - "0x006C": "AltRight", - "0x006E": "Home", - "0x006F": "ArrowUp", - "0x0070": "PageUp", - "0x0071": "ArrowLeft", - "0x0072": "ArrowRight", - "0x0073": "End", - "0x0074": "ArrowDown", - "0x0075": "PageDown", - "0x0076": "Insert", - "0x0077": "Delete", - "0x0079": "AudioVolumeMute", - "0x007A": "AudioVolumeDown", - "0x007B": "AudioVolumeUp", - "0x007C": "Power", - "0x007D": "NumpadEqual", - "0x007F": "Pause", - "0x0081": "NumpadComma", - "0x0082": "Lang1", - "0x0083": "Lang2", - "0x0084": "IntlYen", - "0x0085": "MetaLeft", - "0x0086": "MetaRight", - "0x0087": "ContextMenu", - "0x0088": "BrowserStop", - "0x0089": "Again", - "0x008B": "Undo", - "0x008C": "Select", - "0x008D": "Copy", - "0x008E": "Open", - "0x008F": "Paste", - "0x0090": "Find", - "0x0091": "Cut", - "0x0092": "Help", - "0x0094": "LaunchApp2", - "0x0096": "Sleep", - "0x0097": "WakeUp", - "0x0098": "LaunchApp1", - "0x00A3": "LaunchMail", - "0x00A4": "BrowserFavorites", - "0x00A6": "BrowserBack", - "0x00A7": "BrowserForward", - "0x00A9": "Eject", - "0x00AB": "MediaTrackNext", - "0x00AC": "MediaPlayPause", - "0x00AD": "MediaTrackPrevious", - "0x00AE": "MediaStop", - "0x00B3": "MediaSelect", - "0x00B4": "BrowserHome", - "0x00B5": "BrowserRefresh", - "0x00BB": "NumpadParenLeft", - "0x00BC": "NumpadParenRight", - "0x00BF": "F13", - "0x00C0": "F14", - "0x00C1": "F15", - "0x00C2": "F16", - "0x00C3": "F17", - "0x00C4": "F18", - "0x00C5": "F19", - "0x00C6": "F20", - "0x00C7": "F21", - "0x00C8": "F22", - "0x00C9": "F23", - "0x00CA": "F24", - "0x00E1": "BrowserSearch", - } + '0x0009': 'Escape', + '0x000A': 'Digit1', + '0x000B': 'Digit2', + '0x000C': 'Digit3', + '0x000D': 'Digit4', + '0x000E': 'Digit5', + '0x000F': 'Digit6', + '0x0010': 'Digit7', + '0x0011': 'Digit8', + '0x0012': 'Digit9', + '0x0013': 'Digit0', + '0x0014': 'Minus', + '0x0015': 'Equal', + '0x0016': 'Backspace', + '0x0017': 'Tab', + '0x0018': 'KeyQ', + '0x0019': 'KeyW', + '0x001A': 'KeyE', + '0x001B': 'KeyR', + '0x001C': 'KeyT', + '0x001D': 'KeyY', + '0x001E': 'KeyU', + '0x001F': 'KeyI', + '0x0020': 'KeyO', + '0x0021': 'KeyP', + '0x0022': 'BracketLeft', + '0x0023': 'BracketRight', + '0x0024': 'Enter', + '0x0025': 'ControlLeft', + '0x0026': 'KeyA', + '0x0027': 'KeyS', + '0x0028': 'KeyD', + '0x0029': 'KeyF', + '0x002A': 'KeyG', + '0x002B': 'KeyH', + '0x002C': 'KeyJ', + '0x002D': 'KeyK', + '0x002E': 'KeyL', + '0x002F': 'Semicolon', + '0x0030': 'Quote', + '0x0031': 'Backquote', + '0x0032': 'ShiftLeft', + '0x0033': 'Backslash', + '0x0034': 'KeyZ', + '0x0035': 'KeyX', + '0x0036': 'KeyC', + '0x0037': 'KeyV', + '0x0038': 'KeyB', + '0x0039': 'KeyN', + '0x003A': 'KeyM', + '0x003B': 'Comma', + '0x003C': 'Period', + '0x003D': 'Slash', + '0x003E': 'ShiftRight', + '0x003F': 'NumpadMultiply', + '0x0040': 'AltLeft', + '0x0041': 'Space', + '0x0042': 'CapsLock', + '0x0043': 'F1', + '0x0044': 'F2', + '0x0045': 'F3', + '0x0046': 'F4', + '0x0047': 'F5', + '0x0048': 'F6', + '0x0049': 'F7', + '0x004A': 'F8', + '0x004B': 'F9', + '0x004C': 'F10', + '0x004D': 'NumLock', + '0x004E': 'ScrollLock', + '0x004F': 'Numpad7', + '0x0050': 'Numpad8', + '0x0051': 'Numpad9', + '0x0052': 'NumpadSubtract', + '0x0053': 'Numpad4', + '0x0054': 'Numpad5', + '0x0055': 'Numpad6', + '0x0056': 'NumpadAdd', + '0x0057': 'Numpad1', + '0x0058': 'Numpad2', + '0x0059': 'Numpad3', + '0x005A': 'Numpad0', + '0x005B': 'NumpadDecimal', + '0x005D': 'Lang5', + '0x005E': 'IntlBackslash', + '0x005F': 'F11', + '0x0060': 'F12', + '0x0061': 'IntlRo', + '0x0062': 'Lang3', + '0x0063': 'Lang4', + '0x0064': 'Convert', + '0x0065': 'KanaMode', + '0x0066': 'NonConvert', + '0x0068': 'NumpadEnter', + '0x0069': 'ControlRight', + '0x006A': 'NumpadDivide', + '0x006B': 'PrintScreen', + '0x006C': 'AltRight', + '0x006E': 'Home', + '0x006F': 'ArrowUp', + '0x0070': 'PageUp', + '0x0071': 'ArrowLeft', + '0x0072': 'ArrowRight', + '0x0073': 'End', + '0x0074': 'ArrowDown', + '0x0075': 'PageDown', + '0x0076': 'Insert', + '0x0077': 'Delete', + '0x0079': 'AudioVolumeMute', + '0x007A': 'AudioVolumeDown', + '0x007B': 'AudioVolumeUp', + '0x007C': 'Power', + '0x007D': 'NumpadEqual', + '0x007F': 'Pause', + '0x0081': 'NumpadComma', + '0x0082': 'Lang1', + '0x0083': 'Lang2', + '0x0084': 'IntlYen', + '0x0085': 'MetaLeft', + '0x0086': 'MetaRight', + '0x0087': 'ContextMenu', + '0x0088': 'BrowserStop', + '0x0089': 'Again', + '0x008B': 'Undo', + '0x008C': 'Select', + '0x008D': 'Copy', + '0x008E': 'Open', + '0x008F': 'Paste', + '0x0090': 'Find', + '0x0091': 'Cut', + '0x0092': 'Help', + '0x0094': 'LaunchApp2', + '0x0096': 'Sleep', + '0x0097': 'WakeUp', + '0x0098': 'LaunchApp1', + '0x00A3': 'LaunchMail', + '0x00A4': 'BrowserFavorites', + '0x00A6': 'BrowserBack', + '0x00A7': 'BrowserForward', + '0x00A9': 'Eject', + '0x00AB': 'MediaTrackNext', + '0x00AC': 'MediaPlayPause', + '0x00AD': 'MediaTrackPrevious', + '0x00AE': 'MediaStop', + '0x00B3': 'MediaSelect', + '0x00B4': 'BrowserHome', + '0x00B5': 'BrowserRefresh', + '0x00BB': 'NumpadParenLeft', + '0x00BC': 'NumpadParenRight', + '0x00BF': 'F13', + '0x00C0': 'F14', + '0x00C1': 'F15', + '0x00C2': 'F16', + '0x00C3': 'F17', + '0x00C4': 'F18', + '0x00C5': 'F19', + '0x00C6': 'F20', + '0x00C7': 'F21', + '0x00C8': 'F22', + '0x00C9': 'F23', + '0x00CA': 'F24', + '0x00E1': 'BrowserSearch', + }, }, android: { gecko: { - "0x0001": "Escape", - "0x0002": "Digit1", - "0x0003": "Digit2", - "0x0004": "Digit3", - "0x0005": "Digit4", - "0x0006": "Digit5", - "0x0007": "Digit6", - "0x0008": "Digit7", - "0x0009": "Digit8", - "0x000A": "Digit9", - "0x000B": "Digit0", - "0x000C": "Minus", - "0x000D": "Equal", - "0x000E": "Backspace", - "0x000F": "Tab", - "0x0010": "KeyQ", - "0x0011": "KeyW", - "0x0012": "KeyE", - "0x0013": "KeyR", - "0x0014": "KeyT", - "0x0015": "KeyY", - "0x0016": "KeyU", - "0x0017": "KeyI", - "0x0018": "KeyO", - "0x0019": "KeyP", - "0x001A": "BracketLeft", - "0x001B": "BracketRight", - "0x001C": "Enter", - "0x001D": "ControlLeft", - "0x001E": "KeyA", - "0x001F": "KeyS", - "0x0020": "KeyD", - "0x0021": "KeyF", - "0x0022": "KeyG", - "0x0023": "KeyH", - "0x0024": "KeyJ", - "0x0025": "KeyK", - "0x0026": "KeyL", - "0x0027": "Semicolon", - "0x0028": "Quote", - "0x0029": "Backquote", - "0x002A": "ShiftLeft", - "0x002B": "Backslash", - "0x002C": "KeyZ", - "0x002D": "KeyX", - "0x002E": "KeyC", - "0x002F": "KeyV", - "0x0030": "KeyB", - "0x0031": "KeyN", - "0x0032": "KeyM", - "0x0033": "Comma", - "0x0034": "Period", - "0x0035": "Slash", - "0x0036": "ShiftRight", - "0x0037": "NumpadMultiply", - "0x0038": "AltLeft", - "0x0039": "Space", - "0x003A": "CapsLock", - "0x003B": "F1", - "0x003C": "F2", - "0x003D": "F3", - "0x003E": "F4", - "0x003F": "F5", - "0x0040": "F6", - "0x0041": "F7", - "0x0042": "F8", - "0x0043": "F9", - "0x0044": "F10", - "0x0045": "NumLock", - "0x0046": "ScrollLock", - "0x0047": "Numpad7", - "0x0048": "Numpad8", - "0x0049": "Numpad9", - "0x004A": "NumpadSubtract", - "0x004B": "Numpad4", - "0x004C": "Numpad5", - "0x004D": "Numpad6", - "0x004E": "NumpadAdd", - "0x004F": "Numpad1", - "0x0050": "Numpad2", - "0x0051": "Numpad3", - "0x0052": "Numpad0", - "0x0053": "NumpadDecimal", - "0x0056": "IntlBackslash", - "0x0057": "F11", - "0x0058": "F12", - "0x0059": "IntlRo", - "0x005C": "Convert", - "0x005D": "KanaMode", - "0x005E": "NonConvert", - "0x0060": "NumpadEnter", - "0x0061": "ControlRight", - "0x0062": "NumpadDivide", - "0x0063": "PrintScreen", - "0x0064": "AltRight", - "0x0066": "Home", - "0x0067": "ArrowUp", - "0x0068": "PageUp", - "0x0069": "ArrowLeft", - "0x006A": "ArrowRight", - "0x006B": "End", - "0x006C": "ArrowDown", - "0x006D": "PageDown", - "0x006E": "Insert", - "0x006F": "Delete", - "0x0071": "VolumeMute", - "0x0072": "VolumeDown", - "0x0073": "VolumeUp", - "0x0074": "Power", - "0x0075": "NumpadEqual", - "0x0077": "Pause", - "0x0079": "NumpadComma", - "0x007A": "Lang1", - "0x007B": "Lang2", - "0x007C": "IntlYen", - "0x007D": "OSLeft", - "0x007E": "OSRight", - "0x007F": "ContextMenu", - "0x0080": "BrowserStop", - "0x0081": "Again", - "0x0082": "Props", - "0x0083": "Undo", - "0x0084": "Select", - "0x0085": "Copy", - "0x0086": "Open", - "0x0087": "Paste", - "0x0088": "Find", - "0x0089": "Cut", - "0x008A": "Help", - "0x008E": "Sleep", - "0x008F": "WakeUp", - "0x0090": "LaunchApp1", - "0x009C": "BrowserFavorites", - "0x009E": "BrowserBack", - "0x009F": "BrowserForward", - "0x00A1": "Eject", - "0x00A3": "MediaTrackNext", - "0x00A4": "MediaPlayPause", - "0x00A5": "MediaTrackPrevious", - "0x00A6": "MediaStop", - "0x00AD": "BrowserRefresh", - "0x00B7": "F13", - "0x00B8": "F14", - "0x00B9": "F15", - "0x00BA": "F16", - "0x00BB": "F17", - "0x00BC": "F18", - "0x00BD": "F19", - "0x00BE": "F20", - "0x00BF": "F21", - "0x00C0": "F22", - "0x00C1": "F23", - "0x00C2": "F24", - "0x00D9": "BrowserSearch", - "0x01D0": "Fn", + '0x0001': 'Escape', + '0x0002': 'Digit1', + '0x0003': 'Digit2', + '0x0004': 'Digit3', + '0x0005': 'Digit4', + '0x0006': 'Digit5', + '0x0007': 'Digit6', + '0x0008': 'Digit7', + '0x0009': 'Digit8', + '0x000A': 'Digit9', + '0x000B': 'Digit0', + '0x000C': 'Minus', + '0x000D': 'Equal', + '0x000E': 'Backspace', + '0x000F': 'Tab', + '0x0010': 'KeyQ', + '0x0011': 'KeyW', + '0x0012': 'KeyE', + '0x0013': 'KeyR', + '0x0014': 'KeyT', + '0x0015': 'KeyY', + '0x0016': 'KeyU', + '0x0017': 'KeyI', + '0x0018': 'KeyO', + '0x0019': 'KeyP', + '0x001A': 'BracketLeft', + '0x001B': 'BracketRight', + '0x001C': 'Enter', + '0x001D': 'ControlLeft', + '0x001E': 'KeyA', + '0x001F': 'KeyS', + '0x0020': 'KeyD', + '0x0021': 'KeyF', + '0x0022': 'KeyG', + '0x0023': 'KeyH', + '0x0024': 'KeyJ', + '0x0025': 'KeyK', + '0x0026': 'KeyL', + '0x0027': 'Semicolon', + '0x0028': 'Quote', + '0x0029': 'Backquote', + '0x002A': 'ShiftLeft', + '0x002B': 'Backslash', + '0x002C': 'KeyZ', + '0x002D': 'KeyX', + '0x002E': 'KeyC', + '0x002F': 'KeyV', + '0x0030': 'KeyB', + '0x0031': 'KeyN', + '0x0032': 'KeyM', + '0x0033': 'Comma', + '0x0034': 'Period', + '0x0035': 'Slash', + '0x0036': 'ShiftRight', + '0x0037': 'NumpadMultiply', + '0x0038': 'AltLeft', + '0x0039': 'Space', + '0x003A': 'CapsLock', + '0x003B': 'F1', + '0x003C': 'F2', + '0x003D': 'F3', + '0x003E': 'F4', + '0x003F': 'F5', + '0x0040': 'F6', + '0x0041': 'F7', + '0x0042': 'F8', + '0x0043': 'F9', + '0x0044': 'F10', + '0x0045': 'NumLock', + '0x0046': 'ScrollLock', + '0x0047': 'Numpad7', + '0x0048': 'Numpad8', + '0x0049': 'Numpad9', + '0x004A': 'NumpadSubtract', + '0x004B': 'Numpad4', + '0x004C': 'Numpad5', + '0x004D': 'Numpad6', + '0x004E': 'NumpadAdd', + '0x004F': 'Numpad1', + '0x0050': 'Numpad2', + '0x0051': 'Numpad3', + '0x0052': 'Numpad0', + '0x0053': 'NumpadDecimal', + '0x0056': 'IntlBackslash', + '0x0057': 'F11', + '0x0058': 'F12', + '0x0059': 'IntlRo', + '0x005C': 'Convert', + '0x005D': 'KanaMode', + '0x005E': 'NonConvert', + '0x0060': 'NumpadEnter', + '0x0061': 'ControlRight', + '0x0062': 'NumpadDivide', + '0x0063': 'PrintScreen', + '0x0064': 'AltRight', + '0x0066': 'Home', + '0x0067': 'ArrowUp', + '0x0068': 'PageUp', + '0x0069': 'ArrowLeft', + '0x006A': 'ArrowRight', + '0x006B': 'End', + '0x006C': 'ArrowDown', + '0x006D': 'PageDown', + '0x006E': 'Insert', + '0x006F': 'Delete', + '0x0071': 'VolumeMute', + '0x0072': 'VolumeDown', + '0x0073': 'VolumeUp', + '0x0074': 'Power', + '0x0075': 'NumpadEqual', + '0x0077': 'Pause', + '0x0079': 'NumpadComma', + '0x007A': 'Lang1', + '0x007B': 'Lang2', + '0x007C': 'IntlYen', + '0x007D': 'OSLeft', + '0x007E': 'OSRight', + '0x007F': 'ContextMenu', + '0x0080': 'BrowserStop', + '0x0081': 'Again', + '0x0082': 'Props', + '0x0083': 'Undo', + '0x0084': 'Select', + '0x0085': 'Copy', + '0x0086': 'Open', + '0x0087': 'Paste', + '0x0088': 'Find', + '0x0089': 'Cut', + '0x008A': 'Help', + '0x008E': 'Sleep', + '0x008F': 'WakeUp', + '0x0090': 'LaunchApp1', + '0x009C': 'BrowserFavorites', + '0x009E': 'BrowserBack', + '0x009F': 'BrowserForward', + '0x00A1': 'Eject', + '0x00A3': 'MediaTrackNext', + '0x00A4': 'MediaPlayPause', + '0x00A5': 'MediaTrackPrevious', + '0x00A6': 'MediaStop', + '0x00AD': 'BrowserRefresh', + '0x00B7': 'F13', + '0x00B8': 'F14', + '0x00B9': 'F15', + '0x00BA': 'F16', + '0x00BB': 'F17', + '0x00BC': 'F18', + '0x00BD': 'F19', + '0x00BE': 'F20', + '0x00BF': 'F21', + '0x00C0': 'F22', + '0x00C1': 'F23', + '0x00C2': 'F24', + '0x00D9': 'BrowserSearch', + '0x01D0': 'Fn', }, // There is no code map for blink on Android - blink: null - } -} + blink: null, + }, +}; export const CodeToScanCode: CodeMap = { windows: { blink: {}, - gecko: {} + gecko: {}, }, linux: { gecko: {}, - blink: {} + blink: {}, }, android: { gecko: {}, - blink: null - } + blink: null, + }, }; const mapList: [Record, Record][] = [ @@ -836,13 +836,13 @@ const mapList: [Record, Record][] = [ [ScanCodeToCode.android.gecko, CodeToScanCode.android.gecko], ]; -mapList.forEach(maps => { +mapList.forEach((maps) => { for (const key in maps[0]) { if (Object.prototype.hasOwnProperty.call(maps[0], key)) { maps[1][maps[0][key]] = key; } } -}) +}); const parser = new UAParser(); const parsedUA = parser.getResult(); @@ -851,9 +851,9 @@ const engine = parsedUA.engine.name?.toLowerCase() as EngineName; export const scanCode = function (code: string, targetOs: OS): number { const map = CodeToScanCode[targetOs][engine] || CodeToScanCode.linux.gecko; return parseInt(map[code], 16); -} +}; export const code = function (scanCode: string, targetOs: OS): string { const map = ScanCodeToCode[targetOs][engine] || CodeToScanCode.linux.gecko; return map[scanCode]; -} +}; diff --git a/web-client/iron-remote-gui/src/main.ts b/web-client/iron-remote-gui/src/main.ts index ee9c8ffe..1640ba92 100644 --- a/web-client/iron-remote-gui/src/main.ts +++ b/web-client/iron-remote-gui/src/main.ts @@ -1,9 +1,9 @@ export * as default from './iron-remote-gui.svelte'; -export type {UserInteraction} from './interfaces/UserInteraction'; -export type {ResizeEvent} from './interfaces/ResizeEvent'; -export type {NewSessionInfo} from './interfaces/NewSessionInfo'; -export type {ServerRect} from './interfaces/ServerRect'; -export type {DesktopSize} from './interfaces/DesktopSize'; -export type {SessionEvent} from './interfaces/session-event'; -export type {SessionEventType} from './enums/SessionEventType'; \ No newline at end of file +export type { UserInteraction } from './interfaces/UserInteraction'; +export type { ResizeEvent } from './interfaces/ResizeEvent'; +export type { NewSessionInfo } from './interfaces/NewSessionInfo'; +export type { ServerRect } from './interfaces/ServerRect'; +export type { DesktopSize } from './interfaces/DesktopSize'; +export type { SessionEvent } from './interfaces/session-event'; +export type { SessionEventType } from './enums/SessionEventType'; diff --git a/web-client/iron-remote-gui/src/services/PublicAPI.ts b/web-client/iron-remote-gui/src/services/PublicAPI.ts index 94cb316b..b6507c0b 100644 --- a/web-client/iron-remote-gui/src/services/PublicAPI.ts +++ b/web-client/iron-remote-gui/src/services/PublicAPI.ts @@ -1,11 +1,11 @@ -import {loggingService} from './logging.service'; -import type {NewSessionInfo} from '../interfaces/NewSessionInfo'; -import {SpecialCombination} from '../enums/SpecialCombination'; -import type {WasmBridgeService} from './wasm-bridge.service'; -import type {UserInteraction} from '../interfaces/UserInteraction'; -import type {ScreenScale} from '../enums/ScreenScale'; -import type {Observable} from 'rxjs'; -import type {DesktopSize} from '../interfaces/DesktopSize'; +import { loggingService } from './logging.service'; +import type { NewSessionInfo } from '../interfaces/NewSessionInfo'; +import { SpecialCombination } from '../enums/SpecialCombination'; +import type { WasmBridgeService } from './wasm-bridge.service'; +import type { UserInteraction } from '../interfaces/UserInteraction'; +import type { ScreenScale } from '../enums/ScreenScale'; +import type { Observable } from 'rxjs'; +import type { DesktopSize } from '../interfaces/DesktopSize'; export class PublicAPI { private wasmService: WasmBridgeService; @@ -14,9 +14,27 @@ export class PublicAPI { this.wasmService = wasmService; } - private connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string, desktopSize?: DesktopSize, preConnectionBlob?: string): Observable { + private connect( + username: string, + password: string, + destination: string, + proxyAddress: string, + serverDomain: string, + authToken: string, + desktopSize?: DesktopSize, + preConnectionBlob?: string, + ): Observable { loggingService.info('Initializing connection.'); - return this.wasmService.connect(username, password, destination, proxyAddress, serverDomain, authToken, desktopSize, preConnectionBlob); + return this.wasmService.connect( + username, + password, + destination, + proxyAddress, + serverDomain, + authToken, + desktopSize, + preConnectionBlob, + ); } private ctrlAltDel() { @@ -35,8 +53,8 @@ export class PublicAPI { private setScale(scale: ScreenScale) { this.wasmService.setScale(scale); } - - private shutdown() { + + private shutdown() { this.wasmService.shutdown(); } @@ -48,8 +66,7 @@ export class PublicAPI { sessionListener: this.wasmService.sessionObserver, ctrlAltDel: this.ctrlAltDel.bind(this), metaKey: this.metaKey.bind(this), - shutdown: this.shutdown.bind(this) - } + shutdown: this.shutdown.bind(this), + }; } } - diff --git a/web-client/iron-remote-gui/src/services/logging.service.ts b/web-client/iron-remote-gui/src/services/logging.service.ts index ef6d5fd1..dbdb6bc7 100644 --- a/web-client/iron-remote-gui/src/services/logging.service.ts +++ b/web-client/iron-remote-gui/src/services/logging.service.ts @@ -1,12 +1,12 @@ export class LoggingService { verbose: boolean = false; - + info(description: string) { if (this.verbose) { - console.log(description); + console.log(description); } } - + error(description: string, object?: unknown) { if (this.verbose) { console.error(description, object); @@ -14,4 +14,4 @@ } } -export const loggingService = new LoggingService(); \ No newline at end of file +export const loggingService = new LoggingService(); diff --git a/web-client/iron-remote-gui/src/services/wasm-bridge.service.ts b/web-client/iron-remote-gui/src/services/wasm-bridge.service.ts index 89e4b129..6d78f8f0 100644 --- a/web-client/iron-remote-gui/src/services/wasm-bridge.service.ts +++ b/web-client/iron-remote-gui/src/services/wasm-bridge.service.ts @@ -1,26 +1,34 @@ -import {BehaviorSubject, from, Observable, of, Subject} from 'rxjs'; -import init, {DesktopSize, DeviceEvent, InputTransaction, ironrdp_init, IronRdpError, Session, SessionBuilder} from '../../../../crates/ironrdp-web/pkg/ironrdp_web'; -import {loggingService} from './logging.service'; -import {catchError, filter, map} from 'rxjs/operators'; -import {scanCode} from '../lib/scancodes'; -import {LogType} from '../enums/LogType'; -import {OS} from '../enums/OS'; -import {ModifierKey} from '../enums/ModifierKey'; -import {LockKey} from '../enums/LockKey'; -import {SessionEventType} from '../enums/SessionEventType'; -import type {NewSessionInfo} from '../interfaces/NewSessionInfo'; -import {SpecialCombination} from '../enums/SpecialCombination'; -import type {ResizeEvent} from '../interfaces/ResizeEvent'; -import {ScreenScale} from '../enums/ScreenScale'; -import type {MousePosition} from '../interfaces/MousePosition'; -import type {SessionEvent} from '../interfaces/session-event'; -import type {DesktopSize as IDesktopSize} from '../interfaces/DesktopSize'; +import { BehaviorSubject, from, Observable, of, Subject } from 'rxjs'; +import init, { + DesktopSize, + DeviceEvent, + InputTransaction, + ironrdp_init, + IronRdpError, + Session, + SessionBuilder, +} from '../../../../crates/ironrdp-web/pkg/ironrdp_web'; +import { loggingService } from './logging.service'; +import { catchError, filter, map } from 'rxjs/operators'; +import { scanCode } from '../lib/scancodes'; +import { LogType } from '../enums/LogType'; +import { OS } from '../enums/OS'; +import { ModifierKey } from '../enums/ModifierKey'; +import { LockKey } from '../enums/LockKey'; +import { SessionEventType } from '../enums/SessionEventType'; +import type { NewSessionInfo } from '../interfaces/NewSessionInfo'; +import { SpecialCombination } from '../enums/SpecialCombination'; +import type { ResizeEvent } from '../interfaces/ResizeEvent'; +import { ScreenScale } from '../enums/ScreenScale'; +import type { MousePosition } from '../interfaces/MousePosition'; +import type { SessionEvent } from '../interfaces/session-event'; +import type { DesktopSize as IDesktopSize } from '../interfaces/DesktopSize'; export class WasmBridgeService { private _resize: Subject = new Subject(); private mousePosition: BehaviorSubject = new BehaviorSubject({ x: 0, - y: 0 + y: 0, }); private changeVisibility: Subject = new Subject(); private sessionEvent: Subject = new Subject(); @@ -82,8 +90,16 @@ export class WasmBridgeService { this.mousePosition.next(position); } - - connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string, desktopSize?: IDesktopSize, preConnectionBlob?: string): Observable { + connect( + username: string, + password: string, + destination: string, + proxyAddress: string, + serverDomain: string, + authToken: string, + desktopSize?: IDesktopSize, + preConnectionBlob?: string, + ): Observable { const sessionBuilder = SessionBuilder.new(); sessionBuilder.proxy_address(proxyAddress); sessionBuilder.destination(destination); @@ -114,26 +130,28 @@ export class WasmBridgeService { catchError((err: IronRdpError) => { this.raiseSessionEvent({ type: SessionEventType.ERROR, - data: err + data: err, }); return of(err); }), filter(isSession), map((session: Session) => { - from(session.run()).pipe( - catchError(err => { - this.setVisibility(false); - this.raiseSessionEvent({ - type: SessionEventType.ERROR, - data: err.backtrace() - }); - this.raiseSessionEvent({ - type: SessionEventType.TERMINATED, - data: 'Session was terminated.' - }); - return of(err); - }), - ).subscribe(); + from(session.run()) + .pipe( + catchError((err) => { + this.setVisibility(false); + this.raiseSessionEvent({ + type: SessionEventType.ERROR, + data: err.backtrace(), + }); + this.raiseSessionEvent({ + type: SessionEventType.TERMINATED, + data: 'Session was terminated.', + }); + return of(err); + }), + ) + .subscribe(); return session; }), map((session: Session) => { @@ -141,17 +159,17 @@ export class WasmBridgeService { this.session = session; this._resize.next({ desktop_size: session.desktop_size(), - session_id: 0 + session_id: 0, }); this.raiseSessionEvent({ type: SessionEventType.STARTED, - data: 'Session started' + data: 'Session started', }); return { session_id: 0, initial_desktop_size: session.desktop_size(), - websocket_port: 0 - } + websocket_port: 0, + }; }), ); } @@ -167,14 +185,12 @@ export class WasmBridgeService { } } - mouseWheel(event: WheelEvent) { const vertical = event.deltaY !== 0; const rotation = vertical ? event.deltaY : event.deltaX; this.doTransactionFromDeviceEvents([DeviceEvent.new_wheel_rotations(vertical, -rotation)]); } - setVisibility(state: boolean) { this.changeVisibility.next(state); } @@ -234,7 +250,12 @@ export class WasmBridgeService { const syncScrollLockActive = evt.getModifierState(LockKey.SCROLL_LOCK); const syncKanaModeActive = evt.getModifierState(LockKey.KANA_MODE); - this.session?.synchronize_lock_keys(syncScrollLockActive, syncNumsLockActive, syncCapsLockActive, syncKanaModeActive); + this.session?.synchronize_lock_keys( + syncScrollLockActive, + syncNumsLockActive, + syncCapsLockActive, + syncKanaModeActive, + ); } private raiseSessionEvent(event: SessionEvent) { @@ -253,7 +274,7 @@ export class WasmBridgeService { private doTransactionFromDeviceEvents(deviceEvents: DeviceEvent[]) { const transaction = InputTransaction.new(); - deviceEvents.forEach(event => transaction.add_event(event)); + deviceEvents.forEach((event) => transaction.add_event(event)); this.session?.apply_inputs(transaction); } diff --git a/web-client/iron-remote-gui/svelte.config.js b/web-client/iron-remote-gui/svelte.config.js index fb1bfdb4..f704aeb9 100644 --- a/web-client/iron-remote-gui/svelte.config.js +++ b/web-client/iron-remote-gui/svelte.config.js @@ -1,10 +1,10 @@ -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; export default { - // Consult https://svelte.dev/docs#compile-time-svelte-preprocess - // for more information about preprocessors - compilerOptions: { - customElement: true - }, - preprocess: vitePreprocess(), -} + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + compilerOptions: { + customElement: true, + }, + preprocess: vitePreprocess(), +}; diff --git a/web-client/iron-remote-gui/tsconfig.json b/web-client/iron-remote-gui/tsconfig.json index 4ec11596..ece0f751 100644 --- a/web-client/iron-remote-gui/tsconfig.json +++ b/web-client/iron-remote-gui/tsconfig.json @@ -14,7 +14,7 @@ "allowJs": false, "checkJs": false, "isolatedModules": true, - "strict": true, + "strict": true, "strictNullChecks": true, "noImplicitAny": true }, diff --git a/web-client/iron-remote-gui/vite.config.ts b/web-client/iron-remote-gui/vite.config.ts index 186b9725..fbb31b59 100644 --- a/web-client/iron-remote-gui/vite.config.ts +++ b/web-client/iron-remote-gui/vite.config.ts @@ -1,22 +1,22 @@ -import { defineConfig } from 'vite' -import { svelte } from '@sveltejs/vite-plugin-svelte' -import wasm from "vite-plugin-wasm"; -import topLevelAwait from "vite-plugin-top-level-await"; -import dtsPlugin from "vite-plugin-dts"; +import { defineConfig } from 'vite'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; +import wasm from 'vite-plugin-wasm'; +import topLevelAwait from 'vite-plugin-top-level-await'; +import dtsPlugin from 'vite-plugin-dts'; // https://vitejs.dev/config/ export default defineConfig({ - build: { - lib: { - entry: './src/main.ts', - name: 'IronRemoteGui', - formats: ["umd", "es"], - } - }, - server: { - fs: { - strict: false - } - }, - plugins: [svelte(), wasm(), topLevelAwait(), dtsPlugin()], -}) + build: { + lib: { + entry: './src/main.ts', + name: 'IronRemoteGui', + formats: ['umd', 'es'], + }, + }, + server: { + fs: { + strict: false, + }, + }, + plugins: [svelte(), wasm(), topLevelAwait(), dtsPlugin()], +}); diff --git a/web-client/iron-svelte-client/.eslintrc.yaml b/web-client/iron-svelte-client/.eslintrc.yaml index 705947d6..e278b81f 100644 --- a/web-client/iron-svelte-client/.eslintrc.yaml +++ b/web-client/iron-svelte-client/.eslintrc.yaml @@ -12,31 +12,31 @@ root: true plugins: - - "@typescript-eslint" + - '@typescript-eslint' - 'html' extends: - - "eslint:recommended" - - "plugin:@typescript-eslint/recommended" - - "plugin:svelte/prettier" # Turns off rules that may conflict with Prettier - - "plugin:prettier/recommended" + - 'eslint:recommended' + - 'plugin:@typescript-eslint/recommended' + - 'plugin:svelte/prettier' # Turns off rules that may conflict with Prettier + - 'plugin:prettier/recommended' -parser: "@typescript-eslint/parser" +parser: '@typescript-eslint/parser' parserOptions: project: ./tsconfig.json sourceType: module ecmaVersion: 2020 extraFileExtensions: - - ".svelte" + - '.svelte' ignorePatterns: - - "*.cjs" + - '*.cjs' overrides: - - files: "*.svelte" + - files: '*.svelte' parser: svelte-eslint-parser parserOptions: - parser: "@typescript-eslint/parser" + parser: '@typescript-eslint/parser' env: browser: true @@ -45,10 +45,10 @@ env: rules: strict: 2 - "@typescript-eslint/no-unused-vars": - - "error" + '@typescript-eslint/no-unused-vars': + - 'error' - argsIgnorePattern: '^_' - "@typescript-eslint/strict-boolean-expressions": + '@typescript-eslint/strict-boolean-expressions': - 2 - allowString: false allowNumber: false diff --git a/web-client/iron-svelte-client/README.md b/web-client/iron-svelte-client/README.md index 4084054d..2da3e22b 100644 --- a/web-client/iron-svelte-client/README.md +++ b/web-client/iron-svelte-client/README.md @@ -97,7 +97,7 @@ $ New-DGatewayToken -Type ASSOCIATION -PrivateKeyFile -Destin First, run `npm install` in the [iron-remote-gui](../iron-remote-gui/) folder, and then `npm install` in [iron-svelte-client](./) folder. -You can then start the dev server with either: +You can then start the dev server with either: - `npm run dev` - Runs only the final application. - `npm run dev-all` - Builds WASM module and `iron-remote-gui` prior to starting the dev server. diff --git a/web-client/iron-svelte-client/package.json b/web-client/iron-svelte-client/package.json index 70155993..6d046491 100644 --- a/web-client/iron-svelte-client/package.json +++ b/web-client/iron-svelte-client/package.json @@ -11,14 +11,11 @@ "build": "npm run pre-build && vite build", "build-no-wasm": "npm run pre-build-no-wasm && vite build", "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "npm run lint:prettier && npm run lint:eslint", "lint:prettier": "prettier . --check", "lint:eslint": "eslint src/**", - "format": "prettier . --write ." }, "devDependencies": { diff --git a/web-client/iron-svelte-client/pre-build.js b/web-client/iron-svelte-client/pre-build.js index c359bbde..4fce0188 100644 --- a/web-client/iron-svelte-client/pre-build.js +++ b/web-client/iron-svelte-client/pre-build.js @@ -1,7 +1,7 @@ import * as fs from 'fs-extra'; -import {spawn} from 'child_process'; +import { spawn } from 'child_process'; import * as path from 'path'; -import {fileURLToPath} from 'url'; +import { fileURLToPath } from 'url'; import { argv } from 'node:process'; const __filename = fileURLToPath(import.meta.url); @@ -18,8 +18,8 @@ argv.forEach((val, index) => { }); let run = async function (command, cwd) { - return new Promise(resolve => { - const buildCommand = spawn(command, {stdio: "pipe", shell: true, cwd: cwd}); + return new Promise((resolve) => { + const buildCommand = spawn(command, { stdio: 'pipe', shell: true, cwd: cwd }); buildCommand.stdout.on('data', (data) => { console.log(`${data}`); @@ -39,7 +39,7 @@ let run = async function (command, cwd) { let copyCoreFiles = async function () { console.log('Copying core files…'); await fs.remove(assetIronRemoteGuiFolder); - return new Promise(resolve => { + return new Promise((resolve) => { let source = '../iron-remote-gui/dist'; let destination = assetIronRemoteGuiFolder; @@ -51,8 +51,8 @@ let copyCoreFiles = async function () { console.log('Core files were copied successfully'); resolve(); }); - }) -} + }); +}; let buildCommand = 'npm run build'; if (noWasm) { diff --git a/web-client/iron-svelte-client/src/app.d.ts b/web-client/iron-svelte-client/src/app.d.ts index 8f4d6389..58c4532e 100644 --- a/web-client/iron-svelte-client/src/app.d.ts +++ b/web-client/iron-svelte-client/src/app.d.ts @@ -2,8 +2,8 @@ // for information about these interfaces // and what to do when importing types declare namespace App { - // interface Locals {} - // interface PageData {} - // interface Error {} - // interface Platform {} + // interface Locals {} + // interface PageData {} + // interface Error {} + // interface Platform {} } diff --git a/web-client/iron-svelte-client/src/app.html b/web-client/iron-svelte-client/src/app.html index be13e048..51f2a220 100644 --- a/web-client/iron-svelte-client/src/app.html +++ b/web-client/iron-svelte-client/src/app.html @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + + + + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/web-client/iron-svelte-client/src/lib/login/login-store.ts b/web-client/iron-svelte-client/src/lib/login/login-store.ts index 2fbc2cd9..65640861 100644 --- a/web-client/iron-svelte-client/src/lib/login/login-store.ts +++ b/web-client/iron-svelte-client/src/lib/login/login-store.ts @@ -1,3 +1,3 @@ -import {writable} from 'svelte/store'; +import { writable } from 'svelte/store'; -export const showLogin = writable(true); \ No newline at end of file +export const showLogin = writable(true); diff --git a/web-client/iron-svelte-client/src/lib/login/login.css b/web-client/iron-svelte-client/src/lib/login/login.css index 2ceb222a..227b42c7 100644 --- a/web-client/iron-svelte-client/src/lib/login/login.css +++ b/web-client/iron-svelte-client/src/lib/login/login.css @@ -1,4 +1,4 @@ .wrapper { - display: flex; - justify-content: center; -} \ No newline at end of file + display: flex; + justify-content: center; +} diff --git a/web-client/iron-svelte-client/src/lib/login/login.svelte b/web-client/iron-svelte-client/src/lib/login/login.svelte index ac994852..3a40bebf 100644 --- a/web-client/iron-svelte-client/src/lib/login/login.svelte +++ b/web-client/iron-svelte-client/src/lib/login/login.svelte @@ -1,27 +1,28 @@
-
+
-
+
Login
-
+
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -135,11 +139,10 @@
-
+
- diff --git a/web-client/iron-svelte-client/src/lib/messages/message-store.ts b/web-client/iron-svelte-client/src/lib/messages/message-store.ts index 689c309f..9d6bf0a1 100644 --- a/web-client/iron-svelte-client/src/lib/messages/message-store.ts +++ b/web-client/iron-svelte-client/src/lib/messages/message-store.ts @@ -1,8 +1,8 @@ -import type {Writable} from 'svelte/store'; -import {writable} from 'svelte/store'; +import type { Writable } from 'svelte/store'; +import { writable } from 'svelte/store'; type ToastMessage = { - message: string, - type: 'info' | 'error' + message: string; + type: 'info' | 'error'; }; -export const toast: Writable = writable(); \ No newline at end of file +export const toast: Writable = writable(); diff --git a/web-client/iron-svelte-client/src/lib/messages/message.svelte b/web-client/iron-svelte-client/src/lib/messages/message.svelte index f4ad808c..eb1d727e 100644 --- a/web-client/iron-svelte-client/src/lib/messages/message.svelte +++ b/web-client/iron-svelte-client/src/lib/messages/message.svelte @@ -1,9 +1,9 @@ 
diff --git a/web-client/iron-svelte-client/src/lib/remote-screen/remote-screen.svelte b/web-client/iron-svelte-client/src/lib/remote-screen/remote-screen.svelte index 4c184141..25e35090 100644 --- a/web-client/iron-svelte-client/src/lib/remote-screen/remote-screen.svelte +++ b/web-client/iron-svelte-client/src/lib/remote-screen/remote-screen.svelte @@ -1,25 +1,22 @@ +
-
- +
\ No newline at end of file + diff --git a/web-client/iron-svelte-client/src/models/desktop-size.ts b/web-client/iron-svelte-client/src/models/desktop-size.ts index fdf2dbc4..e6f61ea9 100644 --- a/web-client/iron-svelte-client/src/models/desktop-size.ts +++ b/web-client/iron-svelte-client/src/models/desktop-size.ts @@ -1,4 +1,4 @@ export class DesktopSize { - width!: number; - height!: number; + width!: number; + height!: number; } diff --git a/web-client/iron-svelte-client/src/models/rect.ts b/web-client/iron-svelte-client/src/models/rect.ts index a108de34..cbd22a27 100644 --- a/web-client/iron-svelte-client/src/models/rect.ts +++ b/web-client/iron-svelte-client/src/models/rect.ts @@ -1,7 +1,7 @@ export class Rect { - top!: number; - left!: number; - width!: number; - height!: number; - buffer!: ArrayBuffer + top!: number; + left!: number; + width!: number; + height!: number; + buffer!: ArrayBuffer; } diff --git a/web-client/iron-svelte-client/src/models/session.ts b/web-client/iron-svelte-client/src/models/session.ts index 2f9c4f7c..245d8868 100644 --- a/web-client/iron-svelte-client/src/models/session.ts +++ b/web-client/iron-svelte-client/src/models/session.ts @@ -1,16 +1,16 @@ -import {Guid} from "guid-typescript"; -import type { DesktopSize } from "./desktop-size"; +import { Guid } from 'guid-typescript'; +import type { DesktopSize } from './desktop-size'; export class Session { - id:Guid; - sessionId!: number; - name?:string; - active!: boolean; - desktopSize!: DesktopSize; + id: Guid; + sessionId!: number; + name?: string; + active!: boolean; + desktopSize!: DesktopSize; - constructor(name?: string) { - this.id = Guid.create(); - this.name = name; - this.active = false; - } + constructor(name?: string) { + this.id = Guid.create(); + this.name = name; + this.active = false; + } } diff --git a/web-client/iron-svelte-client/src/routes/+page.svelte b/web-client/iron-svelte-client/src/routes/+page.svelte index a78d9f10..cd4ae3fd 100644 --- a/web-client/iron-svelte-client/src/routes/+page.svelte +++ b/web-client/iron-svelte-client/src/routes/+page.svelte @@ -1,4 +1,4 @@ diff --git a/web-client/iron-svelte-client/src/routes/session/+page.svelte b/web-client/iron-svelte-client/src/routes/session/+page.svelte index 89c34571..6c4af2fb 100644 --- a/web-client/iron-svelte-client/src/routes/session/+page.svelte +++ b/web-client/iron-svelte-client/src/routes/session/+page.svelte @@ -2,14 +2,12 @@ import Login from '$lib/login/login.svelte'; import RemoteScreen from '$lib/remote-screen/remote-screen.svelte'; import Message from '$lib/messages/message.svelte'; - import {showLogin} from "$lib/login/login-store"; - + import { showLogin } from '$lib/login/login-store'; {#if $showLogin} - + {/if} - + - diff --git a/web-client/iron-svelte-client/src/services/server-bridge.service.ts b/web-client/iron-svelte-client/src/services/server-bridge.service.ts index 5a18d6c0..f2938f3f 100644 --- a/web-client/iron-svelte-client/src/services/server-bridge.service.ts +++ b/web-client/iron-svelte-client/src/services/server-bridge.service.ts @@ -1,39 +1,38 @@ -import type {Observable} from "rxjs"; +import type { Observable } from 'rxjs'; export interface ServerRect { - free(): void; + free(): void; - clone_buffer(): Uint8Array; + clone_buffer(): Uint8Array; - bottom: number; - left: number; - right: number; - top: number; + bottom: number; + left: number; + right: number; + top: number; } export interface NewSessionInfo { - session_id: number, - websocket_port: number, - initial_desktop_size: DesktopSize, + session_id: number; + websocket_port: number; + initial_desktop_size: DesktopSize; } export interface DesktopSize { - width: number, - height: number + width: number; + height: number; } export interface ResizeEvent { - session_id: number, - desktop_size: DesktopSize, + session_id: number; + desktop_size: DesktopSize; } export abstract class ServerBridgeService { - abstract init(): void; + abstract init(): void; - abstract connect(username: string, password: string, address: string): Observable; + abstract connect(username: string, password: string, address: string): Observable; - abstract resize: Observable; + abstract resize: Observable; - abstract updateMouse(mouse_x: number, mouse_y: number, click_state: number): void; + abstract updateMouse(mouse_x: number, mouse_y: number, click_state: number): void; } - diff --git a/web-client/iron-svelte-client/src/services/session.service.ts b/web-client/iron-svelte-client/src/services/session.service.ts index bd838f0d..e91d6181 100644 --- a/web-client/iron-svelte-client/src/services/session.service.ts +++ b/web-client/iron-svelte-client/src/services/session.service.ts @@ -1,8 +1,8 @@ -import type {Guid} from "guid-typescript"; -import type {Writable} from "svelte/store"; -import {writable} from "svelte/store"; -import {Session} from "../models/session"; -import type {UserInteraction} from '../../static/iron-remote-gui'; +import type { Guid } from 'guid-typescript'; +import type { Writable } from 'svelte/store'; +import { writable } from 'svelte/store'; +import { Session } from '../models/session'; +import type { UserInteraction } from '../../static/iron-remote-gui'; export const userInteractionService: Writable = writable(); export const currentSession: Writable = writable(); @@ -23,14 +23,14 @@ export function getCurrentSession(): Session { } export function setCurrentSessionActive(active: boolean) { - currentSession.update(session => { - session.active = active; - return session; - }); + currentSession.update((session) => { + session.active = active; + return session; + }); } export function setCurrentSessionById(id: Guid) { - const session = sessions.find(session => session.id.equals(id)); + const session = sessions.find((session) => session.id.equals(id)); if (session) { setCurrentSession(session); } @@ -47,7 +47,7 @@ export function addSession(name: string) { export function closeSession(id: Guid) { sessionCounter--; - sessions = sessions.filter(session => !session.id.equals(id)); + sessions = sessions.filter((session) => !session.id.equals(id)); if (sessionCounter == 1) { setCurrentSession(sessions[0]); } diff --git a/web-client/iron-svelte-client/static/theme.css b/web-client/iron-svelte-client/static/theme.css index 7ceb610c..affb877f 100644 --- a/web-client/iron-svelte-client/static/theme.css +++ b/web-client/iron-svelte-client/static/theme.css @@ -1,59 +1,59 @@ body.light { - --primary: #0061a6; - --on-primary: #ffffff; - --primary-container: #d0e4ff; - --on-primary-container: #001d36; - --secondary: #535f70; - --on-secondary: #ffffff; - --secondary-container: #d6e3f7; - --on-secondary-container: #101c2b; - --tertiary: #6b5778; - --on-tertiary: #ffffff; - --tertiary-container: #f3daff; - --on-tertiary-container: #251432; - --error: #ba1b1b; - --error-container: #ffdad4; - --on-error: #ffffff; - --on-error-container: #410001; - --background: #fdfcff; - --on-background: #1b1b1b; - --surface: #fdfcff; - --on-surface: #1b1b1b; - --surface-variant: #dfe2eb; - --on-surface-variant: #42474e; - --outline: #73777f; - --inverse-on-surface: #f1f0f4; - --inverse-surface: #2f3033; - --inverse-primary: #9ccaff; - --shadow: #000000; + --primary: #0061a6; + --on-primary: #ffffff; + --primary-container: #d0e4ff; + --on-primary-container: #001d36; + --secondary: #535f70; + --on-secondary: #ffffff; + --secondary-container: #d6e3f7; + --on-secondary-container: #101c2b; + --tertiary: #6b5778; + --on-tertiary: #ffffff; + --tertiary-container: #f3daff; + --on-tertiary-container: #251432; + --error: #ba1b1b; + --error-container: #ffdad4; + --on-error: #ffffff; + --on-error-container: #410001; + --background: #fdfcff; + --on-background: #1b1b1b; + --surface: #fdfcff; + --on-surface: #1b1b1b; + --surface-variant: #dfe2eb; + --on-surface-variant: #42474e; + --outline: #73777f; + --inverse-on-surface: #f1f0f4; + --inverse-surface: #2f3033; + --inverse-primary: #9ccaff; + --shadow: #000000; } body.dark { - --primary: #9ccaff; - --on-primary: #00325a; - --primary-container: #00497f; - --on-primary-container: #d0e4ff; - --secondary: #bbc8db; - --on-secondary: #253140; - --secondary-container: #3c4858; - --on-secondary-container: #d6e3f7; - --tertiary: #d6bee4; - --on-tertiary: #3b2948; - --tertiary-container: #523f5f; - --on-tertiary-container: #f3daff; - --error: #ffb4a9; - --error-container: #930006; - --on-error: #680003; - --on-error-container: #ffdad4; - --background: #1b1b1b; - --on-background: #e2e2e6; - --surface: #1b1b1b; - --on-surface: #e2e2e6; - --surface-variant: #42474e; - --on-surface-variant: #c3c7d0; - --outline: #8d9199; - --inverse-on-surface: #1b1b1b; - --inverse-surface: #e2e2e6; - --inverse-primary: #0061a6; - --shadow: #000000; + --primary: #9ccaff; + --on-primary: #00325a; + --primary-container: #00497f; + --on-primary-container: #d0e4ff; + --secondary: #bbc8db; + --on-secondary: #253140; + --secondary-container: #3c4858; + --on-secondary-container: #d6e3f7; + --tertiary: #d6bee4; + --on-tertiary: #3b2948; + --tertiary-container: #523f5f; + --on-tertiary-container: #f3daff; + --error: #ffb4a9; + --error-container: #930006; + --on-error: #680003; + --on-error-container: #ffdad4; + --background: #1b1b1b; + --on-background: #e2e2e6; + --surface: #1b1b1b; + --on-surface: #e2e2e6; + --surface-variant: #42474e; + --on-surface-variant: #c3c7d0; + --outline: #8d9199; + --inverse-on-surface: #1b1b1b; + --inverse-surface: #e2e2e6; + --inverse-primary: #0061a6; + --shadow: #000000; } diff --git a/web-client/iron-svelte-client/svelte.config.js b/web-client/iron-svelte-client/svelte.config.js index 0cee8050..2fa36334 100644 --- a/web-client/iron-svelte-client/svelte.config.js +++ b/web-client/iron-svelte-client/svelte.config.js @@ -3,19 +3,19 @@ import preprocess from 'svelte-preprocess'; /** @type {import('@sveltejs/kit').Config} */ const config = { - // Consult https://github.com/sveltejs/svelte-preprocess - // for more information about preprocessors - preprocess: preprocess(), + // Consult https://github.com/sveltejs/svelte-preprocess + // for more information about preprocessors + preprocess: preprocess(), - kit: { - adapter: adapter({ - pages: 'build/browser', - assets: 'build/browser', - fallback: null, - precompress: false, - strict: true - }) - } + kit: { + adapter: adapter({ + pages: 'build/browser', + assets: 'build/browser', + fallback: null, + precompress: false, + strict: true, + }), + }, }; export default config; diff --git a/web-client/iron-svelte-client/tsconfig.json b/web-client/iron-svelte-client/tsconfig.json index c81fa9e1..55f97d44 100644 --- a/web-client/iron-svelte-client/tsconfig.json +++ b/web-client/iron-svelte-client/tsconfig.json @@ -1,19 +1,19 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": false, - "checkJs": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": false, + "checkJs": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, "strictNullChecks": true, "noImplicitAny": true - }, - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/web-client/iron-svelte-client/vite.config.ts b/web-client/iron-svelte-client/vite.config.ts index 149fe6d9..d022ccc5 100644 --- a/web-client/iron-svelte-client/vite.config.ts +++ b/web-client/iron-svelte-client/vite.config.ts @@ -4,8 +4,8 @@ import wasm from 'vite-plugin-wasm'; import topLevelAwait from 'vite-plugin-top-level-await'; const config: UserConfig = { - mode: 'process.env.MODE' || 'development', - plugins: [sveltekit(), wasm(), topLevelAwait()], + mode: 'process.env.MODE' || 'development', + plugins: [sveltekit(), wasm(), topLevelAwait()], }; export default config;