diff --git a/.travis.yml b/.travis.yml index 2ff64b02..b75b8499 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,12 +25,16 @@ addons: - libudev-dev - build-essential - libusb-1.0-0-dev + chrome: stable install: - nvm install - npm install before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - sleep 3 # give xvfb some time to start - npm run build - npm run lint diff --git a/appveyor.yml b/appveyor.yml index 72a42c71..1d31cbd8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,7 @@ shallow_clone: true install: - ps: Install-Product node $env:nodejs_version + - choco install chromium - set CI=true - set PATH=%APPDATA%\npm;%PATH% - node -v @@ -27,5 +28,6 @@ install: test_script: - appveyor-retry npm run build - npm run lint + - set CHROME_BIN="C:\Program Files (x86)\Chromium\Application\chrome.exe" - npm run test - npm run release diff --git a/package.json b/package.json index 19055167..8fe24876 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,10 @@ }, "scripts": { "postinstall": "lerna bootstrap", - "test": "lerna exec --scope test-serializer npm test", + "test":"run-p -sn test:test-serializer test:uhk-common test:uhk-web", + "test:test-serializer": "lerna exec --scope test-serializer npm test", + "test:uhk-common": "lerna exec --scope uhk-common npm test", + "test:uhk-web": "lerna exec --scope uhk-web npm test", "lint": "run-s -scn lint:ts lint:style", "lint:ts": "run-p -sn lint:ts:electron-main lint:ts:electron-renderer lint:ts:web lint:ts:test-serializer lint:ts:uhk-usb", "lint:ts:electron-main": "tslint --type-check --project ./packages/uhk-agent/tsconfig.json", diff --git a/packages/test-serializer/user-config-serialized.bin b/packages/test-serializer/user-config-serialized.bin deleted file mode 100644 index 9ff0f1d3..00000000 Binary files a/packages/test-serializer/user-config-serialized.bin and /dev/null differ diff --git a/packages/test-serializer/user-config-serialized.json b/packages/test-serializer/user-config-serialized.json deleted file mode 100644 index ae535411..00000000 --- a/packages/test-serializer/user-config-serialized.json +++ /dev/null @@ -1,7442 +0,0 @@ -{ - "dataModelVersion": 4, - "moduleConfigurations": [ - { - "id": 1, - "initialPointerSpeed": 1, - "pointerAcceleration": 5, - "maxPointerSpeed": 200 - } - ], - "keymaps": [ - { - "isDefault": true, - "abbreviation": "QWR", - "name": "QWERTY", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 65 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 66 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 67 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 68 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 69 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 70 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 71 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 72 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 118 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 58 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 59 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 60 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 61 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 62 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 63 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 1 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 57, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80, - "modifierMask": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43, - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79, - "modifierMask": 5 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 3 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 3 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 176 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 233 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 183 - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 182 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 234 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 181 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 226 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 406 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 402 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 184 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "decelerate" - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "DVO", - "name": "DVORAK", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 65 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 66 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 67 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 68 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 69 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 70 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 71 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 72 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 118 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 58 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 59 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 60 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 61 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 62 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 63 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 1 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 57, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80, - "modifierMask": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43, - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79, - "modifierMask": 5 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 3 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 3 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 176 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 233 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 183 - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 182 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 234 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 181 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 226 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 406 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 402 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 184 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "decelerate" - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "COL", - "name": "COLEMAK", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 65 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 66 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 67 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 68 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 69 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 70 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 71 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 72 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 118 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 58 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 59 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 60 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 61 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 62 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 63 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 1 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 57, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80, - "modifierMask": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43, - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79, - "modifierMask": 5 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 3 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 3 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 176 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 233 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 183 - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 182 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 234 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 181 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 226 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 406 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 402 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 184 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "decelerate" - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "WOR", - "name": "WORKMAN", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 65 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 66 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 67 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 68 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 69 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 70 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 71 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 72 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 118 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 58 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 59 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 60 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 61 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 62 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 63 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 1 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 57, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80, - "modifierMask": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43, - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79, - "modifierMask": 5 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 3 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 3 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 176 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 233 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 183 - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 182 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 234 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 181 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 226 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 406 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 402 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 184 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "decelerate" - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "1HA", - "name": "ONE-HANDED", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "scrollRight" - }, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "scrollRight" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "KAP", - "name": "KEYBOARD+MOUSE", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "scrollRight" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "EGG" - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - null, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - null, - null, - null - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - }, - { - "isDefault": false, - "abbreviation": "EGG", - "name": "EGGHEAD.IO", - "description": "", - "layers": [ - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 36 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 37 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 38 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 39 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 45 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 46 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 42 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 24 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 12 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 18 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 19 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 47 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 48 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 49 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 28 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 13 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 14 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 15 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 51 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 52 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 40 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 11 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 17 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 16 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 54 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 55 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 56 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 53 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 30 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 31 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 32 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 33 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 34 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 35 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 43 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 20 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 21 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23 - }, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 22 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 7 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 9 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 10 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 29 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 27 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 6 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 25 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 5 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 44 - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - }, - { - "id": 2, - "pointerRole": "scroll", - "keyActions": [] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 65 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 66 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 67 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 68 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 69 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 74 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 82 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 77 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 76 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 70 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 71 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 72 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 80 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 81 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 79 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 73 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 118 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "none", - "keyActions": [ - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 58 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 59 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 60 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 61 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 62 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 63 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 41 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 23, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 1 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 57, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 75, - "modifierMask": 3 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 26, - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "scancode": 78, - "modifierMask": 3 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 176 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 233 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 183 - }, - null, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 182 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 234 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 181 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 131 - }, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 226 - }, - null, - { - "keyActionType": "keystroke", - "type": "system", - "scancode": 130 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 32 - }, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "scroll", - "keyActions": [ - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "QWR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "DVO" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "COL" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "WOR" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "1HA" - }, - { - "keyActionType": "switchKeymap", - "keymapAbbreviation": "KAP" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 406 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 2 - }, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 402 - }, - { - "keyActionType": "keystroke", - "type": "media", - "scancode": 184 - }, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - }, - { - "modules": [ - { - "id": 0, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "moveUp" - }, - null, - null, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollUp" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveLeft" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveDown" - }, - { - "keyActionType": "mouse", - "mouseAction": "moveRight" - }, - null, - null, - null, - { - "keyActionType": "mouse", - "mouseAction": "scrollDown" - }, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 64 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 128 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 16 - } - ] - }, - { - "id": 1, - "pointerRole": "move", - "keyActions": [ - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "switchLayer", - "layer": "mouse", - "toggle": false - }, - null, - { - "keyActionType": "mouse", - "mouseAction": "rightClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "middleClick" - }, - { - "keyActionType": "mouse", - "mouseAction": "leftClick" - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 1 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 8 - }, - { - "keyActionType": "keystroke", - "type": "basic", - "modifierMask": 4 - }, - { - "keyActionType": "switchLayer", - "layer": "fn", - "toggle": false - }, - { - "keyActionType": "mouse", - "mouseAction": "decelerate" - }, - { - "keyActionType": "switchLayer", - "layer": "mod", - "toggle": false - }, - null - ] - } - ] - } - ] - } - ], - "macros": [ - { - "isLooped": false, - "isPrivate": true, - "name": "My address", - "macroActions": [ - { - "macroActionType": "key", - "action": "press", - "type": "basic", - "scancode": 111 - }, - { - "macroActionType": "key", - "action": "hold", - "type": "basic", - "scancode": 83 - }, - { - "macroActionType": "key", - "action": "release", - "type": "basic", - "scancode": 112 - }, - { - "macroActionType": "key", - "action": "press", - "modifierMask": 93 - }, - { - "macroActionType": "key", - "action": "hold", - "modifierMask": 101 - }, - { - "macroActionType": "key", - "action": "release", - "modifierMask": 133 - }, - { - "macroActionType": "mouseButton", - "action": "press", - "mouseButtonsMask": 9 - }, - { - "macroActionType": "mouseButton", - "action": "hold", - "mouseButtonsMask": 12 - }, - { - "macroActionType": "mouseButton", - "action": "release", - "mouseButtonsMask": 104 - }, - { - "macroActionType": "moveMouse", - "x": -1920, - "y": 220 - }, - { - "macroActionType": "scrollMouse", - "x": 0, - "y": 20000 - }, - { - "macroActionType": "delay", - "delay": 40000 - }, - { - "macroActionType": "text", - "text": "this is a text" - } - ] - }, - { - "isLooped": true, - "isPrivate": true, - "name": "Blah Blah blah", - "macroActions": [ - { - "macroActionType": "key", - "action": "press", - "type": "basic", - "scancode": 111 - }, - { - "macroActionType": "mouseButton", - "action": "release", - "mouseButtonsMask": 104 - }, - { - "macroActionType": "scrollMouse", - "x": 0, - "y": -20000 - }, - { - "macroActionType": "delay", - "delay": 40000 - }, - { - "macroActionType": "text", - "text": "blahhhhhhh" - } - ] - } - ] -} \ No newline at end of file diff --git a/packages/test-serializer/user-config.bin b/packages/test-serializer/user-config.bin deleted file mode 100644 index 9ff0f1d3..00000000 Binary files a/packages/test-serializer/user-config.bin and /dev/null differ diff --git a/packages/uhk-common/src/config-serializer/config-items/keymap.ts b/packages/uhk-common/src/config-serializer/config-items/keymap.ts index 3426b0a9..db8e71c1 100644 --- a/packages/uhk-common/src/config-serializer/config-items/keymap.ts +++ b/packages/uhk-common/src/config-serializer/config-items/keymap.ts @@ -1,8 +1,7 @@ import { UhkBuffer } from '../uhk-buffer'; import { Layer } from './layer'; import { Macro } from './macro'; -import { SwitchLayerAction } from './key-action/switch-layer-action'; -import { KeyAction } from './key-action/key-action'; +import { KeyActionHelper, SwitchLayerAction } from './key-action'; import { UserConfiguration } from './user-configuration'; export class Keymap { @@ -97,30 +96,64 @@ export class Keymap { } private normalize() { - // Removes all the SwitchLayerActions from any non base layer - for (let i = 1; i < this.layers.length; ++i) { - for (const module of this.layers[i].modules) { - module.keyActions = module.keyActions.map(keyAction => { - if (keyAction instanceof SwitchLayerAction) { - return undefined; - } - return keyAction; - }); - } + if (this.layers.length < 1) { + return; } - // Adds the SwitchLayerActions from the base layer to any none base layer - const baseLayerModules = this.layers[0].modules; - for (let i = 0; i < baseLayerModules.length; ++i) { - baseLayerModules[i].keyActions.forEach((keyAction: KeyAction, keyActionIndex: number) => { - if (keyAction instanceof SwitchLayerAction) { - for (let j = 1; j < this.layers.length; ++j) { - this.layers[j].modules[i].keyActions[keyActionIndex] = new SwitchLayerAction(keyAction); + for (let moduleId = 0; moduleId < this.layers[0].modules.length && moduleId < 2; moduleId++) { + const baseModule = this.layers[0].modules[moduleId]; + for (let keyActionId = 0; keyActionId < baseModule.keyActions.length; keyActionId++) { + const baseKeyAction = baseModule.keyActions[keyActionId]; + + if (baseKeyAction instanceof SwitchLayerAction) { + const destinationLayerId = baseKeyAction.layer + 1; + if (this.layers.length < destinationLayerId) { + // TODO: What should we do??? + console.error(`${this.name} has not enough layer. Need: ${destinationLayerId}`); } } - }); + for (let currentLayerId = 1; currentLayerId < this.layers.length; currentLayerId++) { + const currentLayer = this.layers[currentLayerId]; + if (currentLayer.modules.length < moduleId) { + // TODO: What should we do??? + console.error(`${this.name}.layers[${currentLayerId}] has not enough module. Need: ${moduleId}`); + continue; + } + const currentModule = currentLayer.modules[moduleId]; + const currentKeyAction = currentModule.keyActions[keyActionId]; + + if (baseKeyAction instanceof SwitchLayerAction) { + if (currentLayerId - 1 === baseKeyAction.layer) { + if (currentKeyAction instanceof SwitchLayerAction) { + if (currentKeyAction.layer === baseKeyAction.layer && + currentKeyAction.isLayerToggleable === baseKeyAction.isLayerToggleable) { + continue; + } + // tslint:disable-next-line: max-line-length + const error = `${this.name}.layers[${currentLayerId}]modules[${moduleId}].keyActions[${keyActionId}]` + + ` is different switch layer. ${currentKeyAction} will be override with ${baseKeyAction}`; + console.warn(error); + } else { + // tslint:disable-next-line: max-line-length + const error = `${this.name}.layers[${currentLayerId}]modules[${moduleId}].keyActions[${keyActionId}]` + + ` is not switch layer. ${currentKeyAction} will be override with ${baseKeyAction}`; + console.warn(error); + } + currentModule.keyActions[keyActionId] = KeyActionHelper.createKeyAction(baseKeyAction); + } + } + else { + if (currentKeyAction instanceof SwitchLayerAction) { + // tslint:disable-next-line: max-line-length + const error = `${this.name}.layers[${currentLayerId}]modules[${moduleId}].keyActions[${keyActionId}]` + + ` is switch layer action, but the base key action is not switch layer action, so will delete`; + console.warn(error); + currentModule.keyActions[keyActionId] = null; + } + } + } + } } } - } diff --git a/packages/uhk-common/src/config-serializer/config-items/macro-action/key-macro-action.spec.ts b/packages/uhk-common/src/config-serializer/config-items/macro-action/key-macro-action.spec.ts new file mode 100644 index 00000000..80cf8e8d --- /dev/null +++ b/packages/uhk-common/src/config-serializer/config-items/macro-action/key-macro-action.spec.ts @@ -0,0 +1,29 @@ +import { KeyMacroAction } from './key-macro-action'; +import { binaryDefaultHelper, jsonDefaultHelper } from '../../../../test/serializer-test-helper'; +import { MacroSubAction } from './macro-action'; +import { KeystrokeType } from '../key-action'; + +describe('key-macro-action', () => { + it('should be instantiate', () => { + const action = new KeyMacroAction(); + expect(action).toBeTruthy(); + }); + + describe('full serialization', () => { + it('should json match', () => { + const action = new KeyMacroAction(); + action.action = MacroSubAction.hold; + action.type = KeystrokeType.basic; + action.scancode = 100; + jsonDefaultHelper(action); + }); + + it('should binary match', () => { + const action = new KeyMacroAction(); + action.action = MacroSubAction.hold; + action.type = KeystrokeType.basic; + action.scancode = 100; + binaryDefaultHelper(action); + }); + }); +}); diff --git a/packages/uhk-common/src/config-serializer/config-items/macro-action/keymap.spec.ts b/packages/uhk-common/src/config-serializer/config-items/macro-action/keymap.spec.ts new file mode 100644 index 00000000..02b09d7a --- /dev/null +++ b/packages/uhk-common/src/config-serializer/config-items/macro-action/keymap.spec.ts @@ -0,0 +1,257 @@ +import { UserConfiguration } from '../user-configuration'; + +describe('keymap', () => { + it('should normalize SwitchLayerAction if non base layer action is not SwitchLayerAction', () => { + const inputJsonConfig = { + dataModelVersion: 1, + moduleConfigurations: [], + macros: [], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 44 + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + } + ] + } + ] + }; + const expectedJsonConfig = { + dataModelVersion: 1, + moduleConfigurations: [], + macros: [], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + } + ] + } + ] + }; + spyOn(console, 'warn'); + const inputUserConfig = new UserConfiguration().fromJsonObject(inputJsonConfig); + + expect(inputUserConfig.toJsonObject()).toEqual(expectedJsonConfig); + // tslint:disable-next-line: max-line-length + expect(console.warn).toHaveBeenCalledWith('QWERTY.layers[1]modules[0].keyActions[0] is not switch layer. will be override with '); + }); + + it('should normalize SwitchLayerAction if non base layer action is other SwitchLayerAction', () => { + const inputJsonConfig = { + dataModelVersion: 1, + moduleConfigurations: [], + macros: [], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'fn', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + } + ] + } + ] + }; + const expectedJsonConfig = { + dataModelVersion: 1, + moduleConfigurations: [], + macros: [], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + }, + { + modules: [{ + id: 0, + pointerRole: 'move', + keyActions: [ + null + ] + }] + } + ] + } + ] + }; + spyOn(console, 'warn'); + const inputUserConfig = new UserConfiguration().fromJsonObject(inputJsonConfig); + + expect(inputUserConfig.toJsonObject()).toEqual(expectedJsonConfig); + // tslint:disable-next-line: max-line-length + expect(console.warn).toHaveBeenCalledWith('QWERTY.layers[1]modules[0].keyActions[0] is different switch layer. will be override with '); + }); +}); diff --git a/packages/uhk-common/src/config-serializer/config-items/user-configuration.spec.ts b/packages/uhk-common/src/config-serializer/config-items/user-configuration.spec.ts index beec45e1..ce0bcf20 100644 --- a/packages/uhk-common/src/config-serializer/config-items/user-configuration.spec.ts +++ b/packages/uhk-common/src/config-serializer/config-items/user-configuration.spec.ts @@ -39,1163 +39,6 @@ describe('user-configuration', () => { ] }); }); - - xit('', () => { - jsonTester({ - dataModelVersion: 1, - moduleConfigurations: [], - macros: [], - keymaps: [ - { - isDefault: false, - abbreviation: '1HA', - name: 'ONE-HANDED', - description: '', - layers: [ - { - modules: [ - { - id: 0, - pointerRole: 'move', - keyActions: [ - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 36 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 37 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 38 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 39 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 45 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 46 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 42 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 24 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 12 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 18 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 19 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 47 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 48 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 49 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 28 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 13 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 14 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 15 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 51 - }, - { - keyActionType: 'switchLayer', - layer: 'mouse', - toggle: false - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 40 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 11 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 17 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 16 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 54 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 55 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 56 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 32 - }, - null, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 44 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 64 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 128 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 16 - } - ] - }, - { - id: 1, - pointerRole: 'move', - keyActions: [ - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 53 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 30 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 31 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 32 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 33 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 34 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 35 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 43 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 20 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 26 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 21 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 23 - }, - { - keyActionType: 'switchLayer', - layer: 'mouse', - toggle: false - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 4 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 22 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 7 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 9 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 10 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 2 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 29 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 27 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 6 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 25 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 5 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 1 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 4 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 44 - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - null - ] - }, - { - id: 2, - pointerRole: 'scroll', - keyActions: [] - } - ] - }, - { - modules: [ - { - id: 0, - pointerRole: 'none', - keyActions: [ - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 35 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 34 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 33 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 32 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 31 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 30 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 53 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 21 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 26 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 20 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 43 - }, - null, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 23 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 9 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 7 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 22 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 4 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 19 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 10 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 5 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 25 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 6 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 27 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 29 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 32 - }, - null, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 64 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 128 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 16 - } - ] - }, - { - id: 1, - pointerRole: 'none', - keyActions: [ - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 42 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 46 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 45 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 39 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 38 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 37 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 36 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 49 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 19 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 18 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 12 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 24 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 28 - }, - { - keyActionType: 'switchLayer', - layer: 'mouse', - toggle: false - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 51 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 15 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 14 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 13 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 11 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 2 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 56 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 55 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 54 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 16 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 17 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 1 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 4 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 40 - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - null - ] - } - ] - }, - { - modules: [ - { - id: 0, - pointerRole: 'move', - keyActions: [ - null, - null, - null, - null, - null, - null, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 74 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 82 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 77 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 76 - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'WOR' - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'KAP' - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 75 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 80 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 81 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 79 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 73 - }, - { - keyActionType: 'keystroke', - type: 'system', - scancode: 131 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 78 - }, - null, - null, - null, - null, - { - keyActionType: 'keystroke', - type: 'system', - scancode: 130 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 32 - }, - null, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 64 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 128 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 16 - } - ] - }, - { - id: 1, - pointerRole: 'scroll', - keyActions: [ - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'QWR' - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'DVO' - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'COL' - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'WOR' - }, - null, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'KAP' - }, - { - keyActionType: 'switchKeymap', - keymapAbbreviation: 'EGG' - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 75 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 74 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 82 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 77 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 76 - }, - { - keyActionType: 'switchLayer', - layer: 'mouse', - toggle: false - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 78 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 80 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 81 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 79 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 73 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 2 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 52 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 47 - }, - { - keyActionType: 'keystroke', - type: 'basic', - scancode: 48 - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 1 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 4 - }, - null, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - null - ] - } - ] - }, - { - modules: [ - { - id: 0, - pointerRole: 'move', - keyActions: [ - null, - null, - null, - null, - null, - null, - null, - { - keyActionType: 'mouse', - mouseAction: 'leftClick' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveUp' - }, - { - keyActionType: 'mouse', - mouseAction: 'rightClick' - }, - null, - null, - null, - null, - { - keyActionType: 'mouse', - mouseAction: 'scrollUp' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveLeft' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveDown' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveRight' - }, - null, - null, - null, - { - keyActionType: 'mouse', - mouseAction: 'scrollDown' - }, - null, - { - keyActionType: 'mouse', - mouseAction: 'scrollLeft' - }, - { - keyActionType: 'mouse', - mouseAction: 'middleClick' - }, - { - keyActionType: 'mouse', - mouseAction: 'scrollRight' - }, - null, - null, - null, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 64 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 128 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 16 - } - ] - }, - { - id: 1, - pointerRole: 'move', - keyActions: [ - null, - null, - null, - null, - null, - null, - null, - null, - { - keyActionType: 'mouse', - mouseAction: 'scrollUp' - }, - { - keyActionType: 'mouse', - mouseAction: 'leftClick' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveUp' - }, - { - keyActionType: 'mouse', - mouseAction: 'rightClick' - }, - null, - null, - { - keyActionType: 'switchLayer', - layer: 'mouse', - toggle: false - }, - { - keyActionType: 'mouse', - mouseAction: 'scrollDown' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveLeft' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveDown' - }, - { - keyActionType: 'mouse', - mouseAction: 'moveRight' - }, - null, - null, - null, - null, - null, - { - keyActionType: 'mouse', - mouseAction: 'scrollLeft' - }, - { - keyActionType: 'mouse', - mouseAction: 'middleClick' - }, - { - keyActionType: 'mouse', - mouseAction: 'scrollRight' - }, - null, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 1 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 8 - }, - { - keyActionType: 'keystroke', - type: 'basic', - modifierMask: 4 - }, - null, - { - keyActionType: 'switchLayer', - layer: 'fn', - toggle: false - }, - { - keyActionType: 'switchLayer', - layer: 'mod', - toggle: false - }, - null - ] - } - ] - } - ] - } - ] - }); - }); }); function jsonTester(json: any): void { diff --git a/packages/uhk-web/package.json b/packages/uhk-web/package.json index 3d1190a5..8141c729 100644 --- a/packages/uhk-web/package.json +++ b/packages/uhk-web/package.json @@ -6,7 +6,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build --prod --aot --base-href=\"\"", - "test": "ng test", + "test": "ng test --watch false", "lint": "ng lint", "e2e": "ng e2e", "build:renderer": "webpack --config webpack.config.js", @@ -66,6 +66,7 @@ "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "less-loader": "4.0.5", + "lodash": "4.17.4", "ng2-dragula": "1.5.0", "ng2-select2": "1.0.0-beta.10", "ngrx-store-freeze": "0.1.9", diff --git a/packages/uhk-web/src/app/services/user-config.json b/packages/uhk-web/src/app/services/user-config.json index 4e3c7789..d7013dca 100644 --- a/packages/uhk-web/src/app/services/user-config.json +++ b/packages/uhk-web/src/app/services/user-config.json @@ -7074,7 +7074,8 @@ "macroActionType": "key", "action": "press", "scancode": 15, - "modifierMask": 1 + "modifierMask": 1, + "type": "basic" }, { "macroActionType": "text", @@ -7083,7 +7084,8 @@ { "macroActionType": "key", "action": "press", - "scancode": 40 + "scancode": 40, + "type": "basic" } ] }, @@ -7099,4 +7101,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/packages/uhk-web/src/app/store/reducers/user-configuration.spec.ts b/packages/uhk-web/src/app/store/reducers/user-configuration.spec.ts new file mode 100644 index 00000000..7fb36c51 --- /dev/null +++ b/packages/uhk-web/src/app/store/reducers/user-configuration.spec.ts @@ -0,0 +1,396 @@ +import { reducer, initialState } from './user-configuration'; +import { KeystrokeAction, KeystrokeType, SwitchLayerAction, UserConfiguration, LayerName, Keymap } from 'uhk-common'; + +import { getDefaultUserConfig } from '../../../../test/user-config-helper'; +import { KeymapActions } from '../actions'; + +describe('user-configuration reducer', () => { + it('should be initiate with default state', () => { + const result = reducer(undefined, {} as any); + expect(result).toEqual(initialState); + }); + + describe('SAVE_KEY', () => { + it('should process KeyStrokeAction', () => { + const defaultUserConfig = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const state = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const keystrokeAction = new KeystrokeAction({_scancode: 100, type: KeystrokeType.basic} as any); + const saveKeyAction: KeymapActions.SaveKeyAction = { + type: KeymapActions.SAVE_KEY, + payload: { + keymap: new Keymap(defaultUserConfig.keymaps[0]), + layer: 0, + module: 0, + key: 0, + keyAction: keystrokeAction + } + }; + const result = reducer(state, saveKeyAction); + const expectedKeyAction = result.keymaps[0].layers[0].modules[0].keyActions[0]; + expect(expectedKeyAction).toEqual(keystrokeAction); + expect(result).not.toBe(defaultUserConfig); + // check key actions not changed on other layers + for (let i = 1; i < result.keymaps[0].layers.length; i++) { + const keyAction = result.keymaps[0].layers[i].modules[0].keyActions[0]; + const defaultKeyAction = defaultUserConfig.keymaps[0].layers[i].modules[0].keyActions[0]; + + expect(keyAction).toEqual(defaultKeyAction); + } + }); + + it('should copy the SwitchLayerAction to the destination layer', () => { + const defaultUserConfig = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const state = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const destinationLayerId = LayerName.mod; + const switchLayerAction = new SwitchLayerAction({isLayerToggleable: false, layer: destinationLayerId} as any); + const saveKeyAction: KeymapActions.SaveKeyAction = { + type: KeymapActions.SAVE_KEY, + payload: { + keymap: new Keymap(defaultUserConfig.keymaps[0]), + layer: 0, + module: 0, + key: 0, + keyAction: switchLayerAction + } + }; + const result = reducer(state, saveKeyAction); + expect(result).not.toBe(defaultUserConfig); + expect(result.toJsonObject()).toEqual({ + dataModelVersion: 4, + moduleConfigurations: [ + { + id: 1, + initialPointerSpeed: 1, + pointerAcceleration: 5, + maxPointerSpeed: 200 + } + ], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 37 + }, + { + 'keyActionType': 'switchLayer', + 'layer': 'mod', + 'toggle': false + } + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 53 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 30 + }, + null + ] + }, + { + id: 2, + pointerRole: 'scroll', + keyActions: [] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 65 + }, + { + 'keyActionType': 'switchLayer', + 'layer': 'mod', + 'toggle': false + } + ] + }, + { + id: 1, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 41 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 58 + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + }, + { + id: 1, + pointerRole: 'scroll', + keyActions: [ + null, + { + keyActionType: 'switchKeymap', + keymapAbbreviation: 'DVO' + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + } + ] + } + ] + } + ], + macros: [] + }); + }); + + it('should copy the SwitchLayerAction to the destination layer and clear the modified', () => { + const defaultUserConfig = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const state = new UserConfiguration().fromJsonObject(getDefaultUserConfig()); + const destinationLayerId = LayerName.fn; + const switchLayerAction = new SwitchLayerAction({isLayerToggleable: false, layer: destinationLayerId} as any); + const saveKeyAction: KeymapActions.SaveKeyAction = { + type: KeymapActions.SAVE_KEY, + payload: { + keymap: new Keymap(defaultUserConfig.keymaps[0]), + layer: 0, + module: 0, + key: 2, + keyAction: switchLayerAction + } + }; + const result = reducer(state, saveKeyAction); + expect(result).not.toBe(defaultUserConfig); + expect(result.toJsonObject()).toEqual({ + dataModelVersion: 4, + moduleConfigurations: [ + { + id: 1, + initialPointerSpeed: 1, + pointerAcceleration: 5, + maxPointerSpeed: 200 + } + ], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 36 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 37 + }, + { + 'keyActionType': 'switchLayer', + 'layer': 'fn', + 'toggle': false + } + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 53 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 30 + }, + null + ] + }, + { + id: 2, + pointerRole: 'scroll', + keyActions: [] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 64 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 65 + }, + null + ] + }, + { + id: 1, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 41 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 58 + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + { + keyActionType: 'switchLayer', + layer: 'fn', + toggle: false + } + ] + }, + { + id: 1, + pointerRole: 'scroll', + keyActions: [ + null, + { + keyActionType: 'switchKeymap', + keymapAbbreviation: 'DVO' + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + } + ] + } + ] + } + ], + macros: [] + }); + }); + + }); +}); diff --git a/packages/uhk-web/src/app/store/reducers/user-configuration.ts b/packages/uhk-web/src/app/store/reducers/user-configuration.ts index afcd276e..ba970066 100644 --- a/packages/uhk-web/src/app/store/reducers/user-configuration.ts +++ b/packages/uhk-web/src/app/store/reducers/user-configuration.ts @@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/of'; import 'rxjs/add/operator/map'; -import { Keymap, KeyActionHelper, Layer, Macro, Module, UserConfiguration } from 'uhk-common'; +import { KeyAction, Keymap, KeyActionHelper, Layer, Macro, Module, SwitchLayerAction, UserConfiguration } from 'uhk-common'; import { KeymapActions, MacroActions } from '../actions'; import { AppState } from '../index'; import { ActionTypes } from '../actions/user-config'; @@ -107,21 +107,31 @@ export function reducer(state = initialState, action: Action & { payload?: any } break; case KeymapActions.SAVE_KEY: { + const keyIndex: number = action.payload.key; + const layerIndex: number = action.payload.layer; + const moduleIndex: number = action.payload.module; + const newKeyAction = KeyActionHelper.createKeyAction(action.payload.keyAction); const newKeymap: Keymap = Object.assign(new Keymap(), action.payload.keymap); newKeymap.layers = newKeymap.layers.slice(); - const layerIndex: number = action.payload.layer; - const newLayer: Layer = Object.assign(new Layer(), newKeymap.layers[layerIndex]); - newKeymap.layers[layerIndex] = newLayer; + newKeymap.layers = newKeymap.layers.map((layer, index) => { + const newLayer = Object.assign(new Layer(), layer); - const moduleIndex: number = action.payload.module; - const newModule: Module = Object.assign(new Module(), newLayer.modules[moduleIndex]); - newLayer.modules = newLayer.modules.slice(); - newLayer.modules[moduleIndex] = newModule; - - const keyIndex: number = action.payload.key; - newModule.keyActions = newModule.keyActions.slice(); - newModule.keyActions[keyIndex] = KeyActionHelper.createKeyAction(action.payload.keyAction); + if (index === layerIndex) { + setKeyActionToLayer(newLayer, moduleIndex, keyIndex, newKeyAction); + } + // If the key action is a SwitchLayerAction then set the same SwitchLayerAction + // on the target layer + else if (newKeyAction instanceof SwitchLayerAction) { + if (index - 1 === newKeyAction.layer) { + const clonedAction = KeyActionHelper.createKeyAction(action.payload.keyAction); + setKeyActionToLayer(newLayer, moduleIndex, keyIndex, clonedAction); + }else { + setKeyActionToLayer(newLayer, moduleIndex, keyIndex, null); + } + } + return newLayer; + }); changedUserConfiguration.keymaps = state.keymaps.map(keymap => { if (keymap.abbreviation === newKeymap.abbreviation) { @@ -357,3 +367,12 @@ function checkExistence(layers: Layer[], property: string, value: any): Layer[] return newLayers; } + +function setKeyActionToLayer(newLayer: Layer, moduleIndex: number, keyIndex: number, newKeyAction: KeyAction): void { + const newModule: Module = Object.assign(new Module(), newLayer.modules[moduleIndex]); + newLayer.modules = newLayer.modules.slice(); + newLayer.modules[moduleIndex] = newModule; + + newModule.keyActions = newModule.keyActions.slice(); + newModule.keyActions[keyIndex] = newKeyAction; +} diff --git a/packages/uhk-web/test/user-config-helper.ts b/packages/uhk-web/test/user-config-helper.ts new file mode 100644 index 00000000..e37593ab --- /dev/null +++ b/packages/uhk-web/test/user-config-helper.ts @@ -0,0 +1,164 @@ +import { cloneDeep } from 'lodash'; + +const defaultUserConfig = { + dataModelVersion: 4, + moduleConfigurations: [ + { + id: 1, + initialPointerSpeed: 1, + pointerAcceleration: 5, + maxPointerSpeed: 200 + } + ], + keymaps: [ + { + isDefault: true, + abbreviation: 'QWR', + name: 'QWERTY', + description: '', + layers: [ + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 36 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 37 + }, + { + 'keyActionType': 'switchLayer', + 'layer': 'mod', + 'toggle': false + } + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 53 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 30 + }, + null + ] + }, + { + id: 2, + pointerRole: 'scroll', + keyActions: [] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 64 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 65 + }, + { + keyActionType: 'switchLayer', + layer: 'mod', + toggle: false + } + ] + }, + { + id: 1, + pointerRole: 'none', + keyActions: [ + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 41 + }, + { + keyActionType: 'keystroke', + type: 'basic', + scancode: 58 + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + }, + { + id: 1, + pointerRole: 'scroll', + keyActions: [ + null, + { + keyActionType: 'switchKeymap', + keymapAbbreviation: 'DVO' + }, + null + ] + } + ] + }, + { + modules: [ + { + id: 0, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + }, + { + id: 1, + pointerRole: 'move', + keyActions: [ + null, + null, + null + ] + } + ] + } + ] + } + ], + macros: [] +}; + +export function getDefaultUserConfig() { + return cloneDeep(defaultUserConfig); +} diff --git a/web/src/app.module.ts b/web/src/app.module.ts deleted file mode 100644 index e69de29b..00000000