diff --git a/include/nuphy.hpp b/include/nuphy.hpp index 4344a3a..ff27592 100644 --- a/include/nuphy.hpp +++ b/include/nuphy.hpp @@ -168,6 +168,50 @@ class Halo75 : public NuPhy { indicesByKeyNameMac; }; +class Halo96 : public NuPhy { + public: + Halo96(std::string dataPath, std::string requestPath, uint16_t firmware) + : NuPhy(dataPath, requestPath, firmware) {} + + virtual std::string getName() { return "Halo96"; } + virtual std::vector< uint32_t > getDefaultKeymap(bool mac = false) { + return mac ? Halo96::defaultKeymapMac : Halo96::defaultKeymapWin; + } + virtual std::unordered_map< std::string, uint32_t > + getIndicesByKeyName(bool mac = false) { + return mac ? Halo96::indicesByKeyNameMac : + Halo96::indicesByKeyNameWin; + } + + // TODO: Confirm proper values + virtual std::vector< uint8_t > getKeymapReportHeader(bool mac = false) { + return mac ? std::vector< uint8_t >( + {0x05, 0x84, 0xd8, 0x00, 0x00, 0x00} + ) : + std::vector< uint8_t >( + {0x05, 0x84, 0xd4, 0x00, 0x00, 0x00} + ); + } + + // TODO: Confirm proper values + virtual std::vector< uint8_t > setKeymapReportHeader(bool mac = false) { + return mac ? std::vector< uint8_t >( + {0x06, 0x04, 0xd8, 0x00, 0x40, 0x00, 0x00, 0x00} + ) : + std::vector< uint8_t >( + {0x06, 0x04, 0xd4, 0x00, 0x40, 0x00, 0x00, 0x00} + ); + } + private: + static const std::vector< uint32_t > defaultKeymapWin; + static const std::unordered_map< std::string, uint32_t > + indicesByKeyNameWin; + + static const std::vector< uint32_t > defaultKeymapMac; + static const std::unordered_map< std::string, uint32_t > + indicesByKeyNameMac; +}; + class unsupported_keyboard : public std::runtime_error { public: unsupported_keyboard(const std::string &what = "") diff --git a/lib/nuphy.cpp b/lib/nuphy.cpp index 7f3727a..c80b238 100644 --- a/lib/nuphy.cpp +++ b/lib/nuphy.cpp @@ -136,6 +136,9 @@ static std::shared_ptr< NuPhy > createKeyboard( if (name == "NuPhy Halo75") { return std::make_shared< Halo75 >(dataPath, requestPath, firmware); } + if (name == "NuPhy Halo96") { + return std::make_shared< Halo96 >(dataPath, requestPath, firmware); + } return nullptr; } diff --git a/res/Halo96/default_keymap_mac.yml b/res/Halo96/default_keymap_mac.yml new file mode 100644 index 0000000..057faad --- /dev/null +++ b/res/Halo96/default_keymap_mac.yml @@ -0,0 +1,257 @@ +# list defaultKeymapMac +- 0x0f000002 +- 0x35000000 +- 0x2b000000 +- 0x39000000 +- 0xe1000006 +- 0xe0000006 +- 0x00000002 +- 0x20000002 +- 0x14000000 +- 0x04000000 +- 0x1d000000 +- 0xe2000006 +- 0x01000002 +- 0x21000002 +- 0x1a000000 +- 0x16000000 +- 0x1d000002 +- 0xe3000006 +- 0x02000002 +- 0x22000002 +- 0x08000000 +- 0x07000000 +- 0x1e000002 +- 0x91000000 +- 0x03000002 +- 0x23000002 +- 0x15000000 +- 0x2c000002 +- 0x1f000002 +- 0x8b000000 +- 0x04000002 +- 0x22000000 +- 0x17000000 +- 0x0d000002 +- 0x25000002 +- 0x2c000000 +- 0x05000002 +- 0x23000000 +- 0x1c000000 +- 0x24000002 +- 0x26000002 +- 0x8a000000 +- 0x06000002 +- 0x24000000 +- 0x18000000 +- 0x0d000000 +- 0x10000000 +- 0x90000000 +- 0x07000002 +- 0x25000000 +- 0x0c000000 +- 0x0e000000 +- 0x27000002 +- 0xe7000006 +- 0x08000002 +- 0x26000000 +- 0x12000000 +- 0x0f000000 +- 0x28000002 +- 0x00000020 +- 0x09000002 +- 0x27000000 +- 0x13000000 +- 0x33000000 +- 0x29000002 +- 0xe4000006 +- 0x0a000002 +- 0x2d000000 +- 0x2f000000 +- 0x34000000 +- 0x87000000 +- 0x88000000 +- 0x0b000002 +- 0x2e000000 +- 0x2f000002 +- 0x2d000002 +- 0x64000000 +- 0xe7000006 +- 0x18000002 +- 0x2a000000 +- 0x2d000002 +- 0x28000000 +- 0xe5000006 +- 0x12000002 +- 0x4c000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x10000002 +- 0x11000002 +- 0x49000000 +- 0x4a000000 +- 0x4d000000 +- 0x4b000000 +- 0x4e000000 +- 0x13000002 +- 0x4d000000 +- 0x54000000 +- 0x60000000 +- 0x5d000000 +- 0x5a000000 +- 0x62000000 +- 0x4b000000 +- 0x55000000 +- 0x61000000 +- 0x5e000000 +- 0x5b000000 +- 0x63000000 +- 0x4e000000 +- 0x56000000 +- 0x57000000 +- 0x85000000 +- 0x58000000 +- 0x00000000 +- 0x00000000 +- 0x55000000 +- 0x61000000 +- 0x5e000000 +- 0x5b000000 +- 0x63000000 +- 0x00000000 +- 0x56000000 +- 0x57000000 +- 0x85000000 +- 0x58000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x3a000000 +- 0x3b000000 +- 0x3c000000 +- 0x3d000000 +- 0xcf000004 +- 0x2000000e +- 0x40000000 +- 0x41000000 +- 0x42000000 +- 0x43000000 +- 0x44000000 +- 0x45000000 +- 0xe3000006 +- 0x0a000000 +- 0x4a000000 +- 0x29000000 +- 0x52000000 +- 0x51000000 +- 0x50000000 +- 0x4f000000 +- 0x1a000000 +- 0x16000000 +- 0x04000000 +- 0x07000000 +- 0x210a0000 +- 0x14000000 +- 0x1a000000 +- 0x08000000 +- 0x15000000 +- 0x1b000000 +- 0x06000000 +- 0x19000000 +- 0x1e000000 +- 0x1f000000 +- 0x20000000 +- 0x21000000 +- 0x0b000000 +- 0x05000000 +- 0x11000000 +- 0x36000000 +- 0x37000000 +- 0x38000000 +- 0x2d000000 +- 0x2e000000 +- 0x09000000 +- 0x31000000 +- 0x2f000000 +- 0x30000000 +- 0x3a000000 +- 0x3b000000 +- 0x3c000000 +- 0x3d000000 +- 0x3e000000 +- 0x3f000000 +- 0x40000000 +- 0x41000000 +- 0x42000000 +- 0x43000000 +- 0x44000000 +- 0x45000000 +- 0x0100000e +- 0x1000000e +- 0x0400000e +- 0x35000000 +- 0x0001000c +- 0x0002000c +- 0x0003000b +- 0x00030012 +- 0x1a000000 +- 0x16000000 +- 0x01000001 +- 0x07000000 +- 0x200a0000 +- 0x0c00000e +- 0x0d00000e +- 0x0e00000e +- 0x0f00000e +- 0x1400000e +- 0x1c00000e +- 0x1d00000e +- 0x0c00000e +- 0x0d00000e +- 0x0e00000e +- 0x0f00000e +- 0x1800000e +- 0x0500000e +- 0x1e00000e +- 0x0002000d +- 0x0001000d +- 0x1700000e +- 0x2d000000 +- 0x2e000000 +- 0x1b00000e +- 0x1a00000e +- 0x2f000000 +- 0x1900000e +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 diff --git a/res/Halo96/default_keymap_win.yml b/res/Halo96/default_keymap_win.yml new file mode 100644 index 0000000..6838fc5 --- /dev/null +++ b/res/Halo96/default_keymap_win.yml @@ -0,0 +1,257 @@ +# list defaultKeymapWin +- 0x0f000002 +- 0x35000000 +- 0x2b000000 +- 0x39000000 +- 0xe1000006 +- 0xe0000006 +- 0x00000002 +- 0x20000002 +- 0x14000000 +- 0x04000000 +- 0x1d000000 +- 0x0c000002 +- 0x01000002 +- 0x21000002 +- 0x1a000000 +- 0x16000000 +- 0x1d000002 +- 0xe2000006 +- 0x02000002 +- 0x22000002 +- 0x08000000 +- 0x07000000 +- 0x1e000002 +- 0x91000000 +- 0x03000002 +- 0x23000002 +- 0x15000000 +- 0x2c000002 +- 0x1f000002 +- 0x8b000000 +- 0x04000002 +- 0x22000000 +- 0x17000000 +- 0x0d000002 +- 0x25000002 +- 0x2c000000 +- 0x05000002 +- 0x23000000 +- 0x1c000000 +- 0x24000002 +- 0x26000002 +- 0x8a000000 +- 0x06000002 +- 0x24000000 +- 0x18000000 +- 0x0d000000 +- 0x10000000 +- 0x90000000 +- 0x07000002 +- 0x25000000 +- 0x0c000000 +- 0x0e000000 +- 0x27000002 +- 0xe6000006 +- 0x08000002 +- 0x26000000 +- 0x12000000 +- 0x0f000000 +- 0x28000002 +- 0x00000020 +- 0x09000002 +- 0x27000000 +- 0x13000000 +- 0x33000000 +- 0x29000002 +- 0xe4000006 +- 0x0a000002 +- 0x2d000000 +- 0x2f000000 +- 0x34000000 +- 0x87000000 +- 0x88000000 +- 0x0b000002 +- 0x2e000000 +- 0x2f000002 +- 0x2d000002 +- 0x64000000 +- 0xe7000006 +- 0x46000000 +- 0x2a000000 +- 0x2d000002 +- 0x28000000 +- 0xe5000006 +- 0x12000002 +- 0x4c000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x10000002 +- 0x11000002 +- 0x49000000 +- 0x4a000000 +- 0x4d000000 +- 0x4b000000 +- 0x4e000000 +- 0x13000002 +- 0x4d000000 +- 0x54000000 +- 0x60000000 +- 0x5d000000 +- 0x5a000000 +- 0x62000000 +- 0x4b000000 +- 0x55000000 +- 0x61000000 +- 0x5e000000 +- 0x5b000000 +- 0x63000000 +- 0x4e000000 +- 0x56000000 +- 0x57000000 +- 0x85000000 +- 0x58000000 +- 0x00000000 +- 0x00000000 +- 0x55000000 +- 0x61000000 +- 0x5e000000 +- 0x5b000000 +- 0x63000000 +- 0x00000000 +- 0x56000000 +- 0x57000000 +- 0x85000000 +- 0x58000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x3a000000 +- 0x3b000000 +- 0x3c000000 +- 0x3d000000 +- 0x3e000000 +- 0x3f000000 +- 0x40000000 +- 0x41000000 +- 0x42000000 +- 0x43000000 +- 0x44000000 +- 0x45000000 +- 0xe3000006 +- 0x0a000000 +- 0x4a000000 +- 0x29000000 +- 0x52000000 +- 0x51000000 +- 0x50000000 +- 0x4f000000 +- 0x1a000000 +- 0x16000000 +- 0x04000000 +- 0x07000000 +- 0x2b000000 +- 0x14000000 +- 0x1a000000 +- 0x08000000 +- 0x15000000 +- 0x1b000000 +- 0x06000000 +- 0x19000000 +- 0x1e000000 +- 0x1f000000 +- 0x20000000 +- 0x21000000 +- 0x0b000000 +- 0x05000000 +- 0x11000000 +- 0x36000000 +- 0x37000000 +- 0x38000000 +- 0x2d000000 +- 0x2e000000 +- 0x09000000 +- 0x31000000 +- 0x2f000000 +- 0x30000000 +- 0x70000004 +- 0x6f000004 +- 0x3c000000 +- 0x3d000000 +- 0x3e000000 +- 0x3f000000 +- 0xb6000004 +- 0xcd000004 +- 0xb5000004 +- 0xe2000004 +- 0xea000004 +- 0xe9000004 +- 0x0100000e +- 0x1000000e +- 0x0400000e +- 0x35000000 +- 0x0001000c +- 0x0002000c +- 0x0003000b +- 0x00030012 +- 0x1a000000 +- 0x16000000 +- 0x01000001 +- 0x07000000 +- 0x1400000e +- 0x0c00000e +- 0x0d00000e +- 0x0e00000e +- 0x0f00000e +- 0x1400000e +- 0x1c00000e +- 0x1d00000e +- 0x0c00000e +- 0x0d00000e +- 0x0e00000e +- 0x0f00000e +- 0x1800000e +- 0x0500000e +- 0x1e00000e +- 0x0002000d +- 0x0001000d +- 0x1700000e +- 0x2d000000 +- 0x2e000000 +- 0x1b00000e +- 0x1a00000e +- 0x2f000000 +- 0x1900000e +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 +- 0x00000000 diff --git a/res/Halo96/indices_mac.yml b/res/Halo96/indices_mac.yml new file mode 100644 index 0000000..3247d06 --- /dev/null +++ b/res/Halo96/indices_mac.yml @@ -0,0 +1,111 @@ +# dict indicesByKeyNameMac +capslock: 3 +lctrl: 5 +lshift: 4 +lalt: 11 +lmeta: 17 +rctrl: 65 +rshift: 82 +rmeta: 53 +fn: 59 + +ins: 90 +home: 91 +end: 92 +pgup: 93 +pgdn: 94 + +enter: 81 +tab: 2 +space: 35 +backspace: 79 + +esc: 147 +del: 84 + +grave: 1 +num1: 164 +num2: 165 +num3: 166 +num4: 167 +num5: 31 +num6: 37 +num7: 43 +num8: 49 +num9: 55 +num0: 61 + +a: 9 +b: 169 +c: 162 +d: 21 +e: 20 +f: 176 +g: 145 +h: 168 +i: 50 +j: 45 +k: 51 +l: 57 +m: 46 +"n": 170 +o: 56 +p: 62 +q: 8 +r: 26 +s: 15 +t: 32 +u: 44 +v: 163 +w: 14 +x: 161 +"y": 38 +z: 10 + +semicolon: 63 +minus: 174 +equal: 175 +quote: 69 +lbracket: 178 +rbracket: 179 +backslash: 177 +fwdslash: 173 +comma: 171 +period: 172 + +# -- Non-standard +screenshot: 78 + +# -- Fn Combinations +fn_up: 197 +fn_down: 198 +fn_left: 199 +fn_right: 200 + +# -- Function Keys +f1: 132 +f2: 133 +f3: 134 +f4: 135 +f5: 136 +f6: 137 +f7: 138 +f8: 139 +f9: 140 +f10: 141 +f11: 142 +f12: 143 + +# -- Function Keys (Alternative keycode when Fn is held) +fn_f1: 180 +fn_f2: 181 +fn_f3: 182 +fn_f4: 183 +fn_f5: 184 +fn_f6: 185 +fn_f7: 186 +fn_f8: 187 +fn_f9: 188 +fn_f10: 189 +fn_f11: 190 +fn_f12: 191 diff --git a/res/Halo96/indices_win.yml b/res/Halo96/indices_win.yml new file mode 100644 index 0000000..f9f6973 --- /dev/null +++ b/res/Halo96/indices_win.yml @@ -0,0 +1,111 @@ +# dict indicesByKeyNameWin +capslock: 3 +lctrl: 5 +lshift: 4 +lmeta: 11 +lalt: 17 +rctrl: 65 +rshift: 82 +ralt: 53 +fn: 59 + +ins: 90 +home: 91 +end: 92 +pgup: 93 +pgdn: 94 + +enter: 81 +tab: 2 +space: 35 +backspace: 79 + +esc: 147 +del: 84 + +grave: 1 +num1: 164 +num2: 165 +num3: 166 +num4: 167 +num5: 31 +num6: 37 +num7: 43 +num8: 49 +num9: 55 +num0: 61 + +a: 9 +b: 169 +c: 162 +d: 21 +e: 20 +f: 176 +g: 145 +h: 168 +i: 50 +j: 45 +k: 51 +l: 57 +m: 46 +"n": 170 +o: 56 +p: 62 +q: 8 +r: 26 +s: 15 +t: 32 +u: 44 +v: 163 +w: 14 +x: 161 +"y": 38 +z: 10 + +semicolon: 63 +minus: 174 +equal: 175 +quote: 69 +lbracket: 178 +rbracket: 179 +backslash: 177 +fwdslash: 173 +comma: 171 +period: 172 + +# -- Non-standard +screenshot: 78 + +# -- Fn Combinations +fn_up: 197 +fn_down: 198 +fn_left: 199 +fn_right: 200 + +# -- Function Keys +f1: 132 +f2: 133 +f3: 134 +f4: 135 +f5: 136 +f6: 137 +f7: 138 +f8: 139 +f9: 140 +f10: 141 +f11: 142 +f12: 143 + +# -- Multimedia Keys +brightnessdown: 180 +brightnessup: 181 +missioncontrol: 182 +launchpad: 183 +voice_command: 184 +search: 185 +rewind: 186 +playpause: 187 +forward: 188 +mute: 189 +volumedown: 190 +volumeup: 191 diff --git a/ui/src/app.js b/ui/src/app.js index 381738d..add75fd 100644 --- a/ui/src/app.js +++ b/ui/src/app.js @@ -120,6 +120,7 @@ function redrawKeyboard() { n("div", (e) => { e.id = key.id; let width = key.width * 4; + let height = key.height * 4; let colorResolved = key.color; let color = `var(--${colorResolved})`; let label = key.label; @@ -142,7 +143,8 @@ function redrawKeyboard() { grid-column-start: ${currentColumn}; grid-column-end: ${currentColumn + width}; grid-row-start: ${currentRow + 1}; - grid-row-end: ${currentRow + 1}; + grid-row-end: ${height > 4 ? "span 2" : currentRow + 1}; + ${height > 4 ? "height: 115px;": ""}; ${e.id == "__spacer" ? "display: none;" : ""} `; e.onclick = onClickKey; diff --git a/ui/src/keyboards.js b/ui/src/keyboards.js index b3b6665..0452329 100644 --- a/ui/src/keyboards.js +++ b/ui/src/keyboards.js @@ -23,6 +23,7 @@ class Key { color, label, width, + height, name, remappable, defaultMapping, @@ -37,6 +38,7 @@ class Key { this.color = color ?? "white"; this.label = label ?? this.id.toUpperCase(); this.width = width ?? 1.0; + this.height = height ?? 1.0; this.name = name ?? this.id.charAt(0).toUpperCase() + this.id.slice(1); this.remappable = remappable ?? true; this.defaultMapping = defaultMapping ?? this.id; @@ -784,7 +786,430 @@ export const Halo75 = { }, }; +export const Halo96 = { + keycodes: keycodes, + getLayout(mode) { + let mac = mode === "mac"; + return [ + [ + new Key({ + id: "esc", + label: "Esc", + color: "mint", + name: "Escape", + }), + new Key({ + id: "f1", + + altID: mac ? "fn_f1" : "brightnessdown", + altName: mac ? "F1 (Fn layer)" : "Brightness Down", + altDefaultMapping: mac ? "f1" : "brightnessdown", + }), + new Key({ + id: "f2", + + altID: mac ? "fn_f2" : "brightnessup", + altName: mac ? "F2 (Fn layer)" : "Brightness Up", + altDefaultMapping: mac ? "f2" : "brightnessup", + }), + new Key({ + id: "f3", + + altID: mac ? "fn_f3" : "missioncontrol", + altName: mac ? "F3 (Fn layer)" : "Mission Control", + altDefaultMapping: mac ? "f3" : "none", + }), + new Key({ + id: "f4", + + altID: mac ? "fn_f4" : "launchpad", + altName: mac ? "F4 (Fn layer)" : "Launchpad", + altDefaultMapping: mac ? "f4" : "none", + }), + new Key({ + id: "f5", + color: "dark", + defaultMapping: mac ? "voice_command" : null, + + altID: mac ? "fn_f5" : "voice_command", + altName: mac ? "F5 (Fn layer)" : "Mic", + altDefaultMapping: mac ? "f5" : "f5", + }), + new Key({ + id: "f6", + color: "dark", + defaultMapping: mac ? "search" : null, + + altID: mac ? "fn_f6" : "search", + altName: mac ? "F6 (Fn layer)" : "Search", + altDefaultMapping: mac ? "f6" : "search", + }), + new Key({ + id: "f7", + color: "dark", + + altID: mac ? "fn_f7" : "rewind", + altName: mac ? "F7 (Fn layer)" : "Rewind", + altDefaultMapping: mac ? "f7" : "rewind", + }), + new Key({ + id: "f8", + color: "dark", + + altID: mac ? "fn_f8" : "playpause", + altName: mac ? "F8 (Fn layer)" : "Play/Pause Toggle", + altDefaultMapping: mac ? "f8" : "playpause", + }), + new Key({ + id: "f9", + + altID: mac ? "fn_f9" : "forward", + altName: mac ? "F9 (Fn layer)" : "Fast-Forward", + altDefaultMapping: mac ? "f9" : "forward", + }), + new Key({ + id: "f10", + + altID: mac ? "fn_f10" : "mute", + altName: mac ? "F10 (Fn layer)" : "Mute", + altDefaultMapping: mac ? "f10" : "mute", + }), + new Key({ + id: "f11", + + altID: mac ? "fn_f11" : "volumedown", + altName: mac ? "F11 (Fn layer)" : "Volume Down", + altDefaultMapping: mac ? "f11" : "volumedown", + }), + new Key({ + id: "f12", + + altID: mac ? "fn_f12" : "volumeup", + altName: mac ? "F12 (Fn layer)" : "Volume Up", + altDefaultMapping: mac ? "f12" : "volumeup", + }), + new Key({ + id: "screenshot", + color: "dark", + label: "✂️", + defaultMapping: mac ? "num4" : "sysrq", + defaultModifiers: mac ? ["meta", "shift"] : [], + }), + new Key({ + id: "del", + label: "Del", + color: "dark", + }), + new Key({ id: "home", label: "Home", color: "dark" }), + new Key({ id: "end", label: "End", color: "dark" }), + new Key({ + id: "pgup", + label: "PgUp", + color: "dark", + name: "Page Up", + }), + new Key({ + id: "pgdn", + label: "PgDn", + color: "dark", + name: "Page Down", + }), + ], + [ + new Key({ + id: "grave", + label: "`", + color: "dark", + altLabel: "~", + }), + new Key({ id: "num1", label: "1", altLabel: "!" }), + new Key({ id: "num2", label: "2", altLabel: "@" }), + new Key({ id: "num3", label: "3", altLabel: "#" }), + new Key({ id: "num4", label: "4", altLabel: "$" }), + new Key({ id: "num5", label: "5", altLabel: "%" }), + new Key({ id: "num6", label: "6", altLabel: "^" }), + new Key({ id: "num7", label: "7", altLabel: "&" }), + new Key({ id: "num8", label: "8", altLabel: "*" }), + new Key({ id: "num9", label: "9", altLabel: "(" }), + new Key({ id: "num0", label: "0", altLabel: ")" }), + new Key({ id: "minus", label: "-", altLabel: "_" }), + new Key({ id: "equal", label: "=", altLabel: "+" }), + new Key({ + id: "backspace", + label: "← Back", + width: 2.0, + color: "dark", + }), + new Key({ + id: "numlk", + label: "Num Lk", + color: "dark", + name: "Num Lock" + }), + new Key({ + id: "fwdslash", + label: "/", + name: "Slash", + color: "dark", + }), + new Key({ + id: "asterisk", + label: "x", + name: "Asterisk", + color: "dark", + }), + new Key({ + id: "minus", + label: "-", + name: "Minus", + color: "dark", + }), + ], + [ + new Key({ id: "tab", label: "Tab", width: 1.5, color: "dark" }), + new Key({ id: "q" }), + new Key({ id: "w" }), + new Key({ id: "e" }), + new Key({ id: "r" }), + new Key({ id: "t" }), + new Key({ id: "y" }), + new Key({ id: "u" }), + new Key({ id: "i" }), + new Key({ id: "o" }), + new Key({ id: "p" }), + new Key({ + id: "rbracket", + label: "[", + name: "Left Bracket", + altLabel: "{", + }), + new Key({ + id: "lbracket", + label: "]", + name: "Right Bracket", + altLabel: "}", + }), + new Key({ + id: "backslash", + label: "\\", + width: 1.5, + name: "Backslash", + altLabel: "|", + }), + new Key({ id: "num7", label: "7", altLabel: "Home" }), + new Key({ id: "num8", label: "8", altLabel: "↑" }), + new Key({ id: "num9", label: "9", altLabel: "PgUp" }), + new Key({ + id: "plus", + label: "+", + height: 2.0, + name: "Plus", + color: "dark", + }), + ], + [ + new Key({ + id: "capslock", + label: "Caps", + name: "Caps Lock", + width: 1.75, + color: "dark", + }), + new Key({ id: "a" }), + new Key({ id: "s" }), + new Key({ id: "d" }), + new Key({ id: "f" }), + new Key({ id: "g" }), + new Key({ id: "h" }), + new Key({ id: "j" }), + new Key({ id: "k" }), + new Key({ id: "l" }), + new Key({ + id: "semicolon", + label: ";", + name: "Semicolon", + altLabel: ":", + }), + new Key({ + id: "quote", + label: "'", + name: "Quote", + altLabel: '"', + }), + new Key({ + id: "enter", + label: "↩ Enter", + width: 2.25, + color: "orange", + }), + new Key({ id: "num4", label: "4", altLabel: "←" }), + new Key({ id: "num5", label: "5"}), + new Key({ id: "num6", label: "6", altLabel: "→" }), + ], + [ + new Key({ + id: "lshift", + label: "⇧ Shift", + name: "Left Shift", + width: 2.25, + color: "dark", + }), + new Key({ id: "z" }), + new Key({ id: "x" }), + new Key({ id: "c" }), + new Key({ id: "v" }), + new Key({ id: "b" }), + new Key({ id: "n" }), + new Key({ id: "m" }), + new Key({ + id: "comma", + label: ",", + name: "Comma", + altLabel: "<", + }), + new Key({ + id: "period", + label: ".", + name: "Period", + altLabel: ">", + }), + new Key({ + id: "fwdslash", + label: "/", + name: "Slash", + altLabel: "?", + }), + new Key({ + id: "rshift", + label: "⇧ Shift", + name: "Right Shift", + width: 1.75, + color: "dark", + }), + new Key({ + id: "up", + label: "↑", + name: "Up Arrow", + color: "dark", + }), + new Key({ id: "num1", label: "1", altLabel: "End" }), + new Key({ id: "num2", label: "2", altLabel: "↓" }), + new Key({ id: "num3", label: "3", altLabel: "PgDn" }), + new Key({ + id: "enter", + label: "↩", + name: "Enter", + height: 2.0, + color: "mint" + }), + ], + [ + new Key({ + id: "lctrl", + label: "Ctrl", + name: "Left Control", + width: 1.25, + color: "dark", + }), + mac + ? new Key({ + id: "lalt", + label: "Opt", + name: "Left Alt/Option", + width: 1.25, + color: "dark", + }) + : new Key({ + id: "lmeta", + label: "Win", + name: "Left Meta", + width: 1.25, + color: "dark", + }), + mac + ? new Key({ + id: "lmeta", + label: "⌘", + name: "Left Meta", + width: 1.25, + color: "dark", + }) + : new Key({ + id: "lalt", + label: "Alt", + name: "Left Alt/Option", + width: 1.25, + color: "dark", + }), + new Key({ + id: "space", + label: "", + name: "Spacebar", + width: 6.25, + color: "yellow", + }), + mac + ? new Key({ + id: "rmeta", + label: "⌘", + name: "Right Meta", + width: 1.25, + color: "dark", + }) + : new Key({ + id: "ralt", + label: "Alt", + name: "Right Alt/Option", + width: 1.25, + color: "dark", + }), + new Key({ + id: "fn", + label: "Fn", + width: 1.25, + color: "dark", + name: "Function", + remappable: false, + }), + new Key({ + id: "__spacer", + width: 0.5, + }), + new Key({ + id: "left", + label: "←", + name: "Left Arrow", + width: 1, + color: "dark", + }), + new Key({ + id: "down", + label: "↓", + name: "Down Arrow", + width: 1, + color: "dark", + }), + new Key({ + id: "right", + label: "→", + name: "Right Arrow", + width: 1, + color: "dark", + }), + new Key({ id: "num0", label: "0", altLabel: "Ins" }), + new Key({ + id: "period", + label: ".", + name: "Period", + altLabel: "Del", + }), + ], + ]; + }, +}; + export default { Air75, Halo75, + Halo96 };