migrate layout icons form unicode to material symbols

migrate keymap to yml
This commit is contained in:
2023-07-07 18:40:38 +02:00
parent 83ebbcf7dd
commit ece5b9a000
20 changed files with 2455 additions and 7280 deletions

2
src/app.d.ts vendored
View File

@@ -1,3 +1,5 @@
/// <reference types="@modyfi/vite-plugin-yaml/modules" />
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {

View File

@@ -1,34 +0,0 @@
{
"SPACE": "␣",
"SPACERIGHT": "␣ᴿ",
"DEL": "⌦",
"BKSP": "⌫",
"MS_CLICK_LF": "\uD83D\uDDB0ᴸ",
"MS_CLICK_RT": "\uD83D\uDDB0ᴿ",
"MS_MOVE_UP": "\uD83D\uDDB0\uD83E\uDC51",
"MS_MOVE_DN": "\uD83D\uDDB0\uD83E\uDC53",
"MS_MOVE_LF": "\uD83E\uDC50\uD83D\uDDB0",
"MS_MOVE_RT": "\uD83D\uDDB0\uD83E\uDC52",
"MS_SCRL_UP": "\uD83D\uDDB0⍐",
"MS_SCRL_DN": "\uD83D\uDDB0⍗",
"MS_SCRL_LF": "⍇\uD83D\uDDB0",
"MS_SCRL_RT": "\uD83D\uDDB0⍈",
"AMBIRIGHT": "✍\uFE0Eᴿ",
"AMBILEFT": "✍\uFE0Eᴸ",
"ENTER": "⮠",
"TAB": "⭾",
"LEFT_CTRL": "⌥ᴸ",
"RIGHT_CTRL": "⌥ᴿ",
"LEFT_ALT": "⎇ᴸ",
"RIGHT_ALT": "⎇ᴿ",
"LEFT_SHIFT": "⇪ᴸ",
"RIGHT_SHIFT": "⇪ᴸ",
"KM_2_R": "⚇ᴿ",
"KM_2_L": "⚇ᴸ",
"ARROW_UP": "\uD83E\uDC2D",
"ARROW_DN": "\uD83E\uDC2F",
"ARROW_RT": "\uD83E\uDC2E",
"ARROW_LF": "\uD83E\uDC2C",
"ESC": "␛",
"DUP": "⎘"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
name: Action Codes
description: 10-bit action codes 0x00-0x1F
actions:
0x00:
id: "0x00"
0x01:
id: "0x01"
0x02:
id: "0x02"
0x03:
id: "0x03"
0x04:
id: "0x04"
0x05:
id: "0x05"
0x06:
id: "0x06"
0x07:
id: "0x07"
0x08:
id: "0x08"
0x09:
id: "0x09"
0x0A:
id: "0x0A"
0x0B:
id: "0x0B"
0x0C:
id: "0x0C"
0x0D:
id: "0x0D"
0x0E:
id: "0x0E"
0x0F:
id: "0x0F"
0x10:
id: "0x10"
0x11:
id: "0x11"
0x12:
id: "0x12"
0x13:
id: "0x13"
0x14:
id: "0x14"
0x15:
id: "0x15"
0x16:
id: "0x16"
0x17:
id: "0x17"
0x18:
id: "0x18"
0x19:
id: "0x19"
0x1A:
id: "0x1A"
0x1B:
id: "0x1B"
0x1C:
id: "0x1C"
0x1D:
id: "0x1D"
0x1E:
id: "0x1E"
0x1F:
id: "0x1F"

View File

@@ -0,0 +1,295 @@
name: ASCII
description: ASCII Charset
actions:
32:
id: "SPACE"
icon: space_bar
description: |
While SPACE is used for keymaps and chord, just a " " is used in chord outputs.
This action is unique in this way. Technically it is "printable", but it is not visible.
33:
id: "!"
title: Exclamation Point
34:
id: '"'
title: Double Quote
35:
id: "#"
title: Hash Symbol
36:
id: "$"
title: Dollar Sign
37:
id: "%"
title: Percent
38:
id: "&"
title: Ampersand
39:
id: "'"
title: Single Quote
40:
id: "("
title: Opening Parenthesis
41:
id: ")"
title: Closing Parenthesis
42:
id: "*"
title: Asterisk
43:
id: "+"
title: Plus
44:
id: ","
title: Comma
45:
id: "-"
title: Minus
46:
id: "."
title: Period
47:
id: "/"
title: Forward Slash
48:
id: "0"
title: Zero
49:
id: "1"
title: One
50:
id: "2"
title: Two
51:
id: "3"
title: Three
52:
id: "4"
title: Four
53:
id: "5"
title: Five
54:
id: "6"
title: Six
55:
id: "7"
title: Seven
56:
id: "8"
title: Eight
57:
id: "9"
title: Nine
58:
id: ":"
title: Colon
59:
id: ";"
title: Semicolon
60:
id: "<"
title: Less Than
61:
id: "="
title: Equals
62:
id: ">"
title: Greater Than
63:
id: "?"
title: Question Mark
64:
id: "@"
title: At Symbol
65:
id: "A"
title: Uppercase A
66:
id: "B"
title: Uppercase B
67:
id: "C"
title: Uppercase C
68:
id: "D"
title: Uppercase D
69:
id: "E"
title: Uppercase E
70:
id: "F"
title: Uppercase F
71:
id: "G"
title: Uppercase G
72:
id: "H"
title: Uppercase H
73:
id: "I"
title: Uppercase I
74:
id: "J"
title: Uppercase J
75:
id: "K"
title: Uppercase K
76:
id: "L"
title: Uppercase L
77:
id: "M"
title: Uppercase M
78:
id: "N"
title: Uppercase N
79:
id: "O"
title: Uppercase O
80:
id: "P"
title: Uppercase P
81:
id: "Q"
title: Uppercase Q
82:
id: "R"
title: Uppercase R
83:
id: "S"
title: Uppercase S
84:
id: "T"
title: Uppercase T
85:
id: "U"
title: Uppercase U
86:
id: "V"
title: Uppercase V
87:
id: "W"
title: Uppercase W
88:
id: "X"
title: Uppercase X
89:
id: "Y"
title: Uppercase Y
90:
id: "Z"
title: Uppercase Z
91:
id: "["
title: Left Bracket
92:
id: "\\"
title: Backslash
93:
id: "]"
title: Right Bracket
94:
id: "^"
title: Caret
95:
id: "_"
title: Underscore
96:
id: "`"
title: Backtick
97:
id: "a"
title: Lowercase a
98:
id: "b"
title: Lowercase b
99:
id: "c"
title: Lowercase c
100:
id: "d"
title: Lowercase d
101:
id: "e"
title: Lowercase e
102:
id: "f"
title: Lowercase f
103:
id: "g"
title: Lowercase g
104:
id: "h"
title: Lowercase h
105:
id: "i"
title: Lowercase i
106:
id: "j"
title: Lowercase j
107:
id: "k"
title: Lowercase k
108:
id: "l"
title: Lowercase l
109:
id: "m"
title: Lowercase m
110:
id: "n"
title: Lowercase n
111:
id: "o"
title: Lowercase o
112:
id: "p"
title: Lowercase p
113:
id: "q"
title: Lowercase q
114:
id: "r"
title: Lowercase r
115:
id: "s"
title: Lowercase s
116:
id: "t"
title: Lowercase t
117:
id: "u"
title: Lowercase u
118:
id: "v"
title: Lowercase v
119:
id: "w"
title: Lowercase w
120:
id: "x"
title: Lowercase x
121:
id: "y"
title: Lowercase y
122:
id: "z"
title: Lowercase z
123:
id: "{"
title: Left Curly Brace
124:
id: "|"
title: Pipe
125:
id: "}"
title: Right Curly Brace
126:
id: "~"
title: Tilde
127:
id: "DEL"
title: Delete
icon: delete_forever

View File

@@ -0,0 +1,39 @@
name: "CharaChorder One"
description: |
CharaChorder One specific actions.
Mainly used for chords with unassigned 3D presses
type: unassigned
actions:
600:
id: "LH_THUMB_3_3D"
title: Left Hand Thumb Top 3D Click
601:
id: "LH_THUMB_2_3D"
title: Left Hand Thumb Middle 3D Click
602:
id: "LH_THUMB_1_3D"
title: Left Hand Thumb Bottom 3D Click
603:
id: "LH_INDEX_3D"
title: Left Hand Index Finger 3D Click
604:
id: "LH_MID_1_3D"
title: Left Hand Middle Finger 3D Click
605:
id: "LH_RING_1_3D"
title: Left Hand Ring Finger 3D Click
606:
id: "LH_PINKY_3D"
title: Left Hand Pinky 3D Click,
# TODO...
# ["607", "CharaChorder One", "LH_MID_2_3D", "", ""],
# ["608", "CharaChorder One", "LH_RING_2_3D", "", ""],
# ["609", "CharaChorder One", "RH_THUMB_3_3D", "", ""],
# ["610", "CharaChorder One", "RH_THUMB_2_3D", "", ""],
# ["611", "CharaChorder One", "RH_THUMB_1_3D", "", ""],
# ["612", "CharaChorder One", "RH_INDEX_3D", "", ""],
# ["613", "CharaChorder One", "RH_MID_1_3D", "", ""],
# ["614", "CharaChorder One", "RH_RING_1_3D", "", ""],
# ["615", "CharaChorder One", "RH_PINKY_3D", "", ""],
# ["616", "CharaChorder One", "RH_MID_2_3D", "", ""],
# ["617", "CharaChorder One", "RH_RING_2_3D", "", ""]

View File

@@ -0,0 +1,93 @@
name: CharaChorder
description: CharaChorder specific actions
actions:
528:
id: "RESTART"
title: Restart Device
icon: restart_alt
530:
id: "BOOT"
title: Reboot to Bootloader
icon: rule_settings
532:
id: "GTM"
title: Toggle Generative Text Menu
icon: terminal
description: |
Text based menu which is accessible anywhere you can type.
It allows you to access various device settings and features
without the need for software and is activated by chording both alt keys together.
534:
id: "IMPULSE"
title: Toggle Impulse
icon: heap_snapshot_multiple # TODO: find a better icon
description: |
An 'on-the-fly' custom chord which can be spontaneously created anywhere that you can type via the GTM
536:
id: "DUP"
title: Repeat Last Note
icon: control_point_duplicate
description: |
In character entry, it repeats your last input.
In chorded entry, it is used for words with repeating letters.
538:
id: "SPUR"
title: Spurring Toggle
icon: piano
description: |
'Chording only' mode which tells your device to output chords on a press rather than a press & release.
It also enables you to jump from one chord to another without releasing everything and can be activated
in GTM or by chording both mirror keys. It can provide significant speed gains with chording,
but also takes away the flexibility of character entry.
Spurring also helps new users learn how to chord by eliminating the need to focus on timing.
Spurring is toggled by chording both of the 'mirror' keys together.
540: &ambi_throw
id: "AMBILEFT"
title: Ambidextrous Throwover
icon: switch_left
variant: left
description: |
Entry mode designed for one-handed typing.
Characters from the opposite hand are mirrored to the hand which activates this feature.
542:
variantOf: 540
<<: *ambi_throw
id: "AMBIRIGHT"
variant: right
icon: switch_right
544:
variantOf: 36
id: "SPACERIGHT"
title: Right Spacebar (eg CC Lite)
icon: space_bar
variant: right
548: &primary_keymap
id: "KM_1_L"
title: Primary Keymap
icon: counter_1
variant: left
549:
variantOf: 548
<<: *primary_keymap
id: "KM_1_R"
variant: right
550: &secondary_keymap
id: "KM_2_L"
title: Numeric Layer
icon: counter_2
variant: left
551:
variantOf: 550
<<: *secondary_keymap
id: "KM_2_R"
variant: right
552: &tertiary_keymap
id: "KM_3_L"
title: Function Layer
icon: counter_3
variant: left
553:
variationOf: 552
<<: *tertiary_keymap
id: "KM_3_R"
variant: right

View File

@@ -0,0 +1,320 @@
name: CP-1252
description: CP-1252 Charset
actions:
128:
id: "€"
title: Uppercase cedilla
129:
title: HOP (High Octet Preset)
130:
id: ""
title: Single Low-9 Quotation Mark
131:
id: "ƒ"
title: Latin Small Letter f with Hook; Florin
132:
id: "„"
title: Double Low-9 Quotation Mark
133:
id: "…"
title: Horizontal Ellipsis
134:
id: "†"
title: Dagger
135:
id: "‡"
title: Double Dagger
136:
id: "ˆ"
title: Circumflex
137:
id: "‰"
title: Per Mile
138:
id: "Š"
title: Captial S Caron
139:
id: ""
title: Left Guillemet
140:
id: "Œ"
title: Captial Ligature OE
141:
title: RI (Reverse Index)
142:
id: "Ž"
title: Captial Z Caron
143:
title: SS3 (Single-Shift G3)
144:
title: DCS (Device Control String)
145:
id: ""
title: Single Quote Left
146:
id: ""
title: Single Quote Right
147:
id: "“"
title: Double Quote Left
148:
id: "”"
title: Double Quote Right
149:
id: "•"
title: Bullet
150:
id: ""
title: En Dash
151:
id: "—"
title: Em Dash
152:
id: "˜"
title: Small Tilde
153:
id: "™"
title: Trademark
154:
id: "š"
title: Small s Carson
155:
id: ""
title: Right Guillement
156:
id: "œ"
title: Small Ligature oe
157:
title: Operating System Command
158:
id: "ž"
title: Small Z Caron
159:
id: "Ÿ"
title: Capital Y Diaresis
160:
id: " "
title: No Break Space
161:
id: "¡"
title: Inverted Exclamation
162:
id: "¢"
title: Cent
163:
id: "£"
title: Pound
164:
id: "¤"
title: Currency
165:
id: "¥"
title: Yen
166:
id: "¦"
title: Broken Bar
167:
id: "§"
title: Section
168:
id: "¨"
title: Diaresis
169:
id: "©"
title: Copyright
170:
id: "ª"
title: Feminine Ordinal
171:
id: "«"
title: Double Left Guillement
172:
id: "¬"
title: Not
173:
id: "­"
title: Soft Hyphen
174:
id: "®"
title: Registered
175:
id: "¯"
title: Macron
176:
id: "°"
title: Degree
177:
id: "±"
title: Plus Minus
178:
id: "²"
title: Superscript Two
179:
id: "³"
title: Superscript Three
180:
id: "´"
title: Acute
181:
id: "µ"
title: Micro
182:
id: "¶"
title: Pilcrow
183:
id: "·"
title: Middle Dot
184:
id: "¸"
title: Cedilla
185:
id: "¹"
title: Superscript One
186:
id: "º"
title: Masculine Ordinal
187:
id: "»"
title: Double Right Guillement
188:
id: "¼"
title: One Quarter Fraction
189:
id: "½"
title: One Half Fraction
190:
id: "¾"
title: Three Quarters Fraction
191:
id: "¿"
title: Inverted Question
192:
id: "À"
title: Captial A Grave
193:
id: "Á"
194:
id: "Â"
195:
id: "Ã"
196:
id: "Ä"
197:
id: "Å"
198:
id: "Æ"
199:
id: "Ç"
200:
id: "È"
201:
id: "É"
202:
id: "Ê"
203:
id: "Ë"
204:
id: "Ì"
205:
id: "Í"
206:
id: "Î"
207:
id: "Ï"
208:
id: "Ð"
209:
id: "Ñ"
210:
id: "Ò"
211:
id: "Ó"
212:
id: "Ô"
213:
id: "Õ"
214:
id: "Ö"
215:
id: "×"
216:
id: "Ø"
217:
id: "Ù"
218:
id: "Ú"
219:
id: "Û"
220:
id: "Ü"
221:
id: "Ý"
222:
id: "Þ"
223:
id: "ß"
224:
id: "à"
225:
id: "á"
226:
id: "â"
227:
id: "ã"
228:
id: "ä"
229:
id: "å"
230:
id: "æ"
231:
id: "ç"
232:
id: "è"
233:
id: "é"
234:
id: "ê"
235:
id: "ë"
236:
id: "ì"
237:
id: "í"
238:
id: "î"
239:
id: "ï"
240:
id: "ð"
241:
id: "ñ"
242:
id: "ò"
243:
id: "ó"
244:
id: "ô"
245:
id: "õ"
246:
id: "ö"
247:
id: "÷"
248:
id: "ø"
249:
id: "ù"
250:
id: "ú"
251:
id: "û"
252:
id: "ü"
253:
id: "ý"
254:
id: "þ"
255:
id: "ÿ"
title: Small y Diaeresis

View File

@@ -0,0 +1,53 @@
name: Keyboard
description: Keyboard specific actions
icon: keyboard
actions:
512: &left_ctrl
id: "LEFT_CTRL"
title: Control Keyboard Modifier
variant: left
icon: keyboard_control_key
513: &left_shift
id: "LEFT_SHIFT"
title: Shift Keyboard Modifier
variant: left
icon: shift
514: &left_alt
id: "LEFT_ALT"
title: Alt Keyboard Modifier
variant: left
icon: keyboard_option_key
515: &left_gui
id: "LEFT_GUI"
title: GUI Keyboard Modifier
variant: left
icon: keyboard_command_key
516:
variationOf: 512
<<: *left_ctrl
id: "RIGHT_CTRL"
variant: right
517:
variationOf: 513
<<: *left_shift
id: "RIGHT_SHIFT"
518:
variationOf: 514
<<: *left_alt
id: "RIGHT_ALT"
519:
variationOf: 515
<<: *left_gui
id: "RIGHT_GUI"
520:
id: "RELEASE_MOD"
title: Release all keyboard modifiers
icon: step_out
521:
id: "RELEASE_ALL"
title: Release all keys and keyboard modifiers
icon: merge_type
522:
id: "RELEASE_KEYS"
title: Release all keys, but not keyboard modifiers
icon: text_rotate_up

16
src/lib/assets/keymaps/keymap.d.ts vendored Normal file
View File

@@ -0,0 +1,16 @@
export interface KeymapCategory {
name: string
description: string
icon?: string
type?: "unassigned"
actions: Record<number, Partial<ActionInfo>>
}
export interface ActionInfo {
id: string
title: string
icon: string
description: string
variant: "left" | "right"
variantOf: number
}

View File

@@ -0,0 +1,56 @@
name: Mouse
description: Mouse Actions
icon: mouse
actions:
560:
id: "MS_CLICK_BWD"
title: Mouse Backward Button Click
icon: drag_click
561:
id: "MS_CLICK_FWD"
title: Mouse Forward Button Click
icon: ads_click
562:
id: "MS_CLICK_LF"
title: Mouse Left Click
icon: left_click
563:
id: "MS_CLICK_RT"
title: Mouse Right Click
icon: right_click
564:
id: "MS_CLICK_MD"
title: Mouse Middle Click
icon: touchpad_mouse
565:
id: "MS_MOVE_RT"
title: Mouse Move Right
icon: arrow_circle_right
566:
id: "MS_MOVE_LF"
title: Mouse Move Left
icon: arrow_circle_left
567:
id: "MS_MOVE_DN"
title: Mouse Move Down
icon: arrow_circle_down
568:
id: "MS_MOVE_UP"
title: Mouse Move Up
icon: arrow_circle_up
569:
id: "MS_SCRL_RT"
title: Mouse Scroll Right
icon: swipe_right
570:
id: "MS_SCRL_LF"
title: Mouse Scroll Left
icon: swipe_left
571:
id: "MS_SCRL_DN"
title: Mouse Scroll Down
icon: swipe_down
572:
id: "MS_SCRL_UP"
title: "Mouse Scroll Up"
icon: swipe_up

View File

@@ -0,0 +1,933 @@
name: Raw Scancodes
description: Raw Keyboard Scancodes
actions:
256:
id: "KSC_00"
title: No Key Pressed
257:
id: "KSC_01"
title: Keyboard Error Roll Over
258:
id: "KSC_02"
title: Keyboard POST Fail
259:
id: "KSC_03"
title: Keyboard Error Undefined
260:
id: "KEY_A"
title: Keyboard a and A (US English)
description: Non US English keyboard users may prefer these Raw Scancodes
261:
id: "KEY_B"
title: Keyboard b and B (US English)
262:
id: "KEY_C"
title: Keyboard c and C (US English)
263:
id: "KEY_D"
title: Keyboard d and D (US English)
264:
id: "KEY_E"
title: Keyboard e and E (US English)
265:
id: "KEY_F"
title: Keyboard f and F (US English)
266:
id: "KEY_G"
title: Keyboard g and G (US English)
267:
id: "KEY_H"
title: Keyboard h and H (US English)
268:
id: "KEY_I"
title: Keyboard i and I (US English)
269:
id: "KEY_J"
title: Keyboard j and J (US English)
270:
id: "KEY_K"
title: Keyboard k and K (US English)
271:
id: "KEY_L"
title: Keyboard l and L (US English)
272:
id: "KEY_M"
title: Keyboard m and M (US English)
273:
id: "KEY_N"
title: Keyboard n and N (US English)
274:
id: "KEY_O"
title: Keyboard o and O (US English)
275:
id: "KEY_P"
title: Keyboard p and P (US English)
276:
id: "KEY_Q"
title: Keyboard q and Q (US English)
277:
id: "KEY_R"
title: Keyboard r and R (US English)
278:
id: "KEY_S"
title: Keyboard s and S (US English)
279:
id: "KEY_T"
title: Keyboard t and T (US English)
280:
id: "KEY_U"
title: Keyboard u and U (US English)
281:
id: "KEY_V"
title: Keyboard v and V (US English)
282:
id: "KEY_W"
title: Keyboard w and W (US English)
283:
id: "KEY_X"
title: Keyboard x and X (US English)
284:
id: "KEY_Y"
title: Keyboard y and Y (US English)
285:
id: "KEY_Z"
title: Keyboard z and Z (US English)
286:
id: "KEY_1"
title: Keyboard 1 and ! (US English)
287:
id: "KEY_2"
title: Keyboard 2 and @ (US English)
288:
id: "KEY_3"
title: Keyboard 3 and # (US English)
289:
id: "KEY_4"
title: Keyboard 4 and $ (US English)
290:
id: "KEY_5"
title: Keyboard 5 and % (US English)
291:
id: "KEY_6"
title: Keyboard 6 and ^ (US English)
292:
id: "KEY_7"
title: Keyboard 7 and & (US English)
293:
id: "KEY_8"
title: Keyboard 8 and * (US English)
294:
id: "KEY_9"
title: Keyboard 9 and ( (US English)
295:
id: "KEY_0"
title: Keyboard 0 and ) (US English)
296:
id: "ENTER"
title: Keyboard Return (US English)
icon: keyboard_return
297:
id: "ESC"
title: Keyboard Escape (US English)
298:
id: "BKSP"
title: Keyboard Backspace (US English)
icon: backspace
299:
id: "TAB"
title: Keyboard Tab (US English)
icon: keyboard_tab
300:
id: "KSC_2C"
title: Keyboard Space (US English)
description: |
The ASCII space is preferred over this raw scancode for the space bar.
icon: space_bar
301:
id: "KSC_2D"
title: Keyboard - and _ (US English)
302:
id: "KSC_2E"
title: Keyboard = and + (US English)
303:
id: "KSC_2F"
title: Keyboard [ and { (US English)
304:
id: "KSC_30"
title: Keyboard ] and } (US English)
305:
id: "KSC_31"
title: Keyboard \ and | (US English)
306:
id: "KSC_32"
title: Keyboard Non-US \# and ~ (US English)
307:
id: "KSC_33"
title: "Keyboard ; and : (US English)"
308:
id: "KSC_34"
title: Keyboard ' and " (US English)
309:
id: "KSC_35"
title: Keyboard ` and ~ (US English)
310:
id: "KSC_36"
title: Keyboard , and < (US English)
311:
id: "KSC_37"
title: Keyboard . and > (US English)
312:
id: "KSC_38"
title: Keyboard / and ? (US English)
313:
id: "CAPSLOCK"
title: Keyboard Caps Lock
icon: shift_lock
314:
id: "F1"
title: Keyboard F1
315:
id: "F2"
title: Keyboard F2
316:
id: "F3"
title: Keyboard F3
317:
id: "F4"
title: Keyboard F4
318:
id: "F5"
title: Keyboard F5
319:
id: "F6"
title: Keyboard F6
320:
id: "F7"
title: Keyboard F7
321:
id: "F8"
title: Keyboard F8
322:
id: "F9"
title: Keyboard F9
323:
id: "F10"
title: Keyboard F10
324:
id: "F11"
title: Keyboard F11
325:
id: "F12"
title: Keyboard F12
326:
id: "PRTSCN"
title: Keyboard Print Screen
icon: screenshot_monitor
327:
id: "SCRLK"
title: Keyboard Scroll Lock
328:
id: "PAUSE"
title: Keyboard Pause
329:
id: "INSERT"
title: Keyboard Insert
icon: insert_text
330:
id: "HOME"
title: Keyboard Home
icon: home
331:
id: "PGUP"
title: Keyboard Page Up
icon: move_up
332:
id: "DELETE"
title: Keyboard Delete Forward
333:
id: "END"
title: Keyboard End
334:
id: "PGDN"
title: Keyboard Page Down
icon: move_down
335:
id: "ARROW_RT"
title: Keyboard Right Arrow
icon: keyboard_arrow_right
336:
id: "ARROW_LF"
title: Keyboard Left Arrow
icon: keyboard_arrow_left
337:
id: "ARROW_DN"
title: Keyboard Down Arrow
icon: keyboard_arrow_down
338:
id: "ARROW_UP"
title: Keyboard Up Arrow
icon: keyboard_arrow_up
339:
id: "NUMLOCK"
title: Keyboard Num Lock and Clear
340:
id: "KP_SLASH"
title: Keypad /
341:
id: "KP_ASTER"
title: Keypad *
342:
id: "KP_MINUS"
title: Keypad -
343:
id: "KP_PLUS"
title: Keypad +
344:
id: "KP_ENTER"
title: Keypad Enter
345:
id: "KP_1"
title: Keypad 1 and End
346:
id: "KP_2"
title: Keypad 2 and Down Arrow
347:
id: "KP_3"
title: Keypad 3 and Page Down
348:
id: "KP_4"
title: Keypad 4 and Left Arrow
349:
id: "KP_5"
title: Keypad 5
350:
id: "KP_6"
title: Keypad 6 and Rigth Arrow
351:
id: "KP_7"
title: Keypad 7 and Home
352:
id: "KP_8"
title: Keypad 8 and Up Arrow
353:
id: "KP_9"
title: Keypad 9 and Page Up
354:
id: "KP_0"
title: Keypad 0 and Insert
355:
id: "KP_DOT"
title: Keypad . and Delete
356:
id: "KSC_64"
title: Keyboard Non-US \ and | (US English)
357:
id: "COMPOSE"
title: Keyboard Application
description: Officially supported by Win, Unix, and Boot
358:
id: "POWER"
title: Keyboard Power
description: Only officially supported by Mac and Unix
359:
id: "KP_EQUAL"
title: Keypad =
description: Only officially supported by Mac
360:
id: "F13"
title: Keyboard F13
description: Only officially supported by Mac
361:
id: "F14"
title: Keyboard F14
description: Only officially supported by Mac
362:
id: "F15"
title: Keyboard F15
description: Only officially supported by Mac
363:
id: "F16"
title: Keyboard F16
description: Only officially supported by Mac
364:
id: "F17"
title: Keyboard F17
description: Not required to be supported by any OS
365:
id: "F18"
title: Keyboard F18
description: Not required to be supported by any OS
366:
id: "F19"
title: Keyboard F19
description: Not required to be supported by any OS
367:
id: "F20"
title: Keyboard F20
description: Not required to be supported by any OS
368:
id: "F21"
title: Keyboard F21
description: Not required to be supported by any OS
369:
id: "F22"
title: Keyboard F22
description: Not required to be supported by any OS
370:
id: "F23"
title: Keyboard F23
description: Not required to be supported by any OS
371:
id: "F24"
title: Keyboard F24
description: Not required to be supported by any OS
372:
id: "EXECUTE"
title: Keyboard Execute
description: Only officially supported by Unix
icon: terminal
373:
id: "HELP"
title: Keyboard Help
description: Only officially supported by Unix
icon: help
374:
id: "MENU"
title: Keyboard Menu
description: Only officially supported by Unix
icon: menu
375:
id: "SELECT"
title: Keyboard Select
description: Only officially supported by Unix
icon: select
376:
id: "STOP"
title: Keyboard Stop
description: Only officially supported by Unix
icon: stop_circle
377:
id: "AGAIN"
title: Keyboard Again
description: Only officially supported by Unix
icon: redo
378:
id: "UNDO"
title: Keyboard Undo
description: Only officially supported by Unix
icon: undo
379:
id: "CUT"
title: Keyboard Cut
description: Only officially supported by Unix
icon: content_cut
380:
id: "COPY"
title: Keyboard Copy
description: Only officially supported by Unix
icon: content_copy
381:
id: "PASTE"
title: Keyboard Paste
description: Only officially supported by Unix
icon: content_paste
382:
id: "FIND"
title: Keyboard Find
description: Only officially supported by Unix
icon: search
383:
id: "MUTE"
title: Keyboard Mute
description: Only officially supported by Unix
icon: no_sound
384:
id: "VOL_UP"
title: Keyboard Volume Up
description: Only officially supported by Unix
icon: volume_up
385:
id: "VOL_DN"
title: Keyboard Volume Down
description: Only officially supported by Unix
icon: volume_down
386:
id: "KSC_82"
title: Keyboard Locking Caps Lock
description: Only officially supported by Unix
387:
id: "KSC_83"
title: Keyboard Locking Num Lock
description: Only officially supported by Unix
388:
id: "KSC_84"
title: Keyboard Locking Scroll Lock
description: Only officially supported by Unix
389:
id: "KP_COMMA"
title: Keypad Comma
description: Not required to be supported by any OS
390:
id: "KSC_86"
title: Keypad Equals Sign
description: Not required to be supported by any OS
391:
id: "INTL1"
title: Keyboard International1
description: Not required to be supported by any OS
392:
id: "INTL2"
title: Keyboard International2
description: Not required to be supported by any OS
393:
id: "INTL3"
title: Keyboard International3
description: Not required to be supported by any OS
394:
id: "INTL4"
title: Keyboard International4
description: Not required to be supported by any OS
395:
id: "INTL5"
title: Keyboard International5
description: Not required to be supported by any OS
396:
id: "INTL6"
title: Keyboard International6
description: Not required to be supported by any OS
397:
id: "INTL7"
title: Keyboard International7
description: Not required to be supported by any OS
398:
id: "INTL8"
title: Keyboard International8
description: Not required to be supported by any OS
399:
id: "INTL9"
title: Keyboard International9
description: Not required to be supported by any OS
400:
id: "LANG1"
title: Keyboard LANG1
description: Not required to be supported by any OS
401:
id: "LANG2"
title: Keyboard LANG2
description: Not required to be supported by any OS
402:
id: "LANG3"
title: Keyboard LANG3
description: Not required to be supported by any OS
403:
id: "LANG4"
title: Keyboard LANG4
description: Not required to be supported by any OS
404:
id: "LANG5"
title: Keyboard LANG5
description: Not required to be supported by any OS
405:
id: "LANG6"
title: Keyboard LANG6
description: Not required to be supported by any OS
406:
id: "LANG7"
title: Keyboard LANG7
description: Not required to be supported by any OS
407:
id: "LANG8"
title: Keyboard LANG8
description: Not required to be supported by any OS
408:
id: "LANG9"
title: Keyboard LANG9
description: Not required to be supported by any OS
409:
id: "KSC_99"
title: Keyboard Alternate Erase
description: Not required to be supported by any OS
410:
id: "KSC_9A"
title: Keyboard SysReq/Attention
description: Not required to be supported by any OS
411:
id: "KSC_9B"
title: Keyboard Cancel
description: Not required to be supported by any OS
412:
id: "KSC_9C"
title: Keyboard Clear
description: Not required to be supported by any OS
413:
id: "KSC_9D"
title: Keyboard Prior
description: Not required to be supported by any OS
414:
id: "KSC_9E"
title: Keyboard Return
description: Not required to be supported by any OS
415:
id: "KSC_9F"
title: Keyboard Separator
description: Not required to be supported by any OS
416:
id: "KSC_A0"
title: Keyboard Out
description: Not required to be supported by any OS
417:
id: "KSC_A1"
title: Keyboard Oper
description: Not required to be supported by any OS
418:
id: "KSC_A2"
title: Keyboard Clear/Again
description: Not required to be supported by any OS
419:
id: "KSC_A3"
title: Keyboard CrSel/Props
description: Not required to be supported by any OS
420:
id: "KSC_A4"
title: Keyboard ExSel
description: Not required to be supported by any OS
421:
id: "KSC_A5"
description: Not required to be supported by any OS
422:
id: "KSC_A6"
description: Not required to be supported by any OS
423:
id: "KSC_A7"
description: Not required to be supported by any OS
424:
id: "KSC_A8"
description: Not required to be supported by any OS
425:
id: "KSC_A9"
description: Not required to be supported by any OS
426:
id: "KSC_AA"
description: Not required to be supported by any OS
427:
id: "KSC_AB"
description: Not required to be supported by any OS
428:
id: "KSC_AC"
description: Not required to be supported by any OS
429:
id: "KSC_AD"
description: Not required to be supported by any OS
430:
id: "KSC_AE"
description: Not required to be supported by any OS
431:
id: "KSC_AF"
description: Not required to be supported by any OS
432:
id: "KSC_B0"
title: Keypad 00
description: Not required to be supported by any OS
433:
id: "KSC_B1"
title: Keypad 000
description: Not required to be supported by any OS
434:
id: "KSC_B2"
title: Thousands Separator
description: Not required to be supported by any OS
435:
id: "KSC_B3"
title: Decimal Separator
description: Not required to be supported by any OS
436:
id: "KSC_B4"
title: Currency Unit
description: Not required to be supported by any OS
437:
id: "KSC_B5"
title: Currency Sub-unit
description: Not required to be supported by any OS
438:
id: "KSC_B6"
title: Keypad (
description: Not required to be supported by any OS
439:
id: "KSC_B7"
title: Keypad )
description: Not required to be supported by any OS
440:
id: "KSC_B8"
title: Keypad {
description: Not required to be supported by any OS
441:
id: "KSC_B9"
title: Keypad }
description: Not required to be supported by any OS
442:
id: "KSC_BA"
title: Keypad Tab
description: Not required to be supported by any OS
443:
id: "KSC_BB"
title: Keypad Backspace
description: Not required to be supported by any OS
444:
id: "KSC_BC"
title: Keypad A
description: Not required to be supported by any OS
445:
id: "KSC_BD"
title: Keypad B
description: Not required to be supported by any OS
446:
id: "KSC_BE"
title: Keypad C
description: Not required to be supported by any OS
447:
id: "KSC_BF"
title: Keypad D
description: Not required to be supported by any OS
448:
id: "KSC_C0"
title: Keypad E
description: Not required to be supported by any OS
449:
id: "KSC_C1"
title: Keypad F
description: Not required to be supported by any OS
450:
id: "KSC_C2"
title: Keypad XOR
description: Not required to be supported by any OS
451:
id: "KSC_C3"
title: Keypad ^
description: Not required to be supported by any OS
452:
id: "KSC_C4"
title: Keypad %
description: Not required to be supported by any OS
453:
id: "KSC_C5"
title: Keypad <
description: Not required to be supported by any OS
454:
id: "KSC_C6"
title: Keypad >
description: Not required to be supported by any OS
455:
id: "KSC_C7"
title: Keypad &
description: Not required to be supported by any OS
456:
id: "KSC_C8"
title: Keypad &&
description: Not required to be supported by any OS
457:
id: "KSC_C9"
title: Keypad |
description: Not required to be supported by any OS
458:
id: "KSC_CA"
title: Keypad ||
description: Not required to be supported by any OS
459:
id: "KSC_CB"
title:
Keypad:
description: Not required to be supported by any OS
460:
id: "KSC_CC"
title: Keypad #
description: Not required to be supported by any OS
461:
id: "KSC_CD"
title: Keypad Space
description: Not required to be supported by any OS
462:
id: "KSC_CE"
title: Keypad @
description: Not required to be supported by any OS
463:
id: "KSC_CF"
title: Keypad !
description: Not required to be supported by any OS
464:
id: "KSC_D0"
title: Keypad Memory Store
description: Not required to be supported by any OS
465:
id: "KSC_D1"
title: Keypad Memory Recall
description: Not required to be supported by any OS
466:
id: "KSC_D2"
title: Keypad Memory Clear
description: Not required to be supported by any OS
467:
id: "KSC_D3"
title: Keypad Memory Add
description: Not required to be supported by any OS
468:
id: "KSC_D4"
title: Keypad Memory Subtract
description: Not required to be supported by any OS
469:
id: "KSC_D5"
title: Keypad Memory Multiply
description: Not required to be supported by any OS
470:
id: "KSC_D6"
title: Keypad Memory Divide
description: Not required to be supported by any OS
471:
id: "KSC_D7"
title: Keypad +/-
description: Not required to be supported by any OS
472:
id: "KSC_D8"
title: Keypad Clear
description: Not required to be supported by any OS
473:
id: "KSC_D9"
title: Keypad Clear Entry
description: Not required to be supported by any OS
474:
id: "KSC_DA"
title: Keypad Binary
description: Not required to be supported by any OS
475:
id: "KSC_DB"
title: Keypad Octal
description: Not required to be supported by any OS
476:
id: "KSC_DC"
title: Keypad Decimal
description: Not required to be supported by any OS
477:
id: "KSC_DD"
title: Keypad Hexadecimal
description: Not required to be supported by any OS
478:
id: "KSC_DE"
description: Not required to be supported by any OS
479:
id: "KSC_DF"
description: Not required to be supported by any OS
480:
id: "KSC_E0"
title: Keyboard Left Control
481:
id: "KSC_E1"
title: Keyboard Left Shift
482:
id: "KSC_E2"
title: Keyboard Left Alt
483:
id: "KSC_E3"
title: Keyboard Left GUI
484:
id: "KSC_E4"
title: Keyboard Right Control
485:
id: "KSC_E5"
title: Keyboard Right Shift
486:
id: "KSC_E6"
title: Keyboard Right Alt
487:
id: "KSC_E7"
title: Keyboard Right GUI
488:
id: "KSC_E8"
title: Media Play Pause
description: Not required to be supported by any OS. Possibly deprecated.
489:
id: "KSC_E9"
title: Media Stop CD
description: Not required to be supported by any OS. Possibly deprecated.
490:
id: "KSC_EA"
title: Media Previous Song
description: Not required to be supported by any OS. Possibly deprecated.
491:
id: "KSC_EB"
title: Media Next Song
description: Not required to be supported by any OS. Possibly deprecated.
492:
id: "KSC_EC"
title: Media Eject CD
description: Not required to be supported by any OS. Possibly deprecated.
493:
id: "KSC_ED"
title: Media Volume Up
description: Not required to be supported by any OS. Possibly deprecated.
494:
id: "KSC_EE"
title: Media Volume Down
description: Not required to be supported by any OS. Possibly deprecated.
495:
id: "KSC_EF"
title: Media Mute
description: Not required to be supported by any OS. Possibly deprecated.
496:
id: "KSC_F0"
title: Media www
description: Not required to be supported by any OS. Possibly deprecated.
497:
id: "KSC_F1"
title: Media Back
description: Not required to be supported by any OS. Possibly deprecated.
498:
id: "KSC_F2"
title: Media Forward
description: Not required to be supported by any OS. Possibly deprecated.
499:
id: "KSC_F3"
title: Media Stop
description: Not required to be supported by any OS. Possibly deprecated.
500:
id: "KSC_F4"
title: Media Find
description: Not required to be supported by any OS. Possibly deprecated.
501:
id: "KSC_F5"
title: Media Scroll Up
description: Not required to be supported by any OS. Possibly deprecated.
502:
id: "KSC_F6"
title: Media Scroll Down
description: Not required to be supported by any OS. Possibly deprecated.
503:
id: "KSC_F7"
title: Media Edit
description: Not required to be supported by any OS. Possibly deprecated.
504:
id: "KSC_F8"
title: Media Sleep
description: Not required to be supported by any OS. Possibly deprecated.
505:
id: "KSC_F9"
title: Media Coffee
description: Not required to be supported by any OS. Possibly deprecated.
506:
id: "KSC_FA"
title: Media Refresh
description: Not required to be supported by any OS. Possibly deprecated.
507:
id: "KSC_FB"
title: Media Calc
description: Not required to be supported by any OS. Possibly deprecated.
508:
id: "KSC_FC"
description: Not required to be supported by any OS.
509:
id: "KSC_FD"
description: Not required to be supported by any OS.
510:
id: "KSC_FE"
description: Not required to be supported by any OS.
511:
id: "KSC_FF"
description: Not required to be supported by any OS.

View File

@@ -39,11 +39,12 @@
{@const actions = getActions(id, $layout)}
<button title={getKeyDescriptions(actions)}>
{#each actions as keyInfo, layer}
{@const displayTitle = keyInfo?.symbol || keyInfo?.id}
{#if displayTitle}
{#if keyInfo}
<span
class:active={virtualLayerMap[activeLayer] === virtualLayerMap[layer]}
style="offset-distance: {offsetDistance(quadrant, layer, activeLayer)}%">{displayTitle}</span
class:icon={!!keyInfo.icon}
style="offset-distance: {offsetDistance(quadrant, layer, activeLayer)}%"
>{keyInfo.icon || keyInfo.id || keyInfo.code}</span
>
{/if}
{/each}
@@ -59,6 +60,7 @@
$size: 96;
$offset: 14;
$scale-difference: 0.2;
$transition-time: 750ms;
.radial {
position: relative;
@@ -96,12 +98,18 @@
opacity: 0.2;
transition: scale 250ms ease, opacity 250ms ease, offset-distance 250ms ease;
transition: scale $transition-time ease, opacity $transition-time ease,
offset-distance $transition-time ease;
&.active {
scale: 1;
opacity: 1;
}
&.icon {
font-size: 20px;
font-weight: 800;
}
}
button {

View File

@@ -1,64 +1,21 @@
import keymapCodes from "$lib/assets/keymap_codes.json"
import keySymbols from "$lib/assets/key-symbols.json"
import type {ActionInfo, KeymapCategory} from "$lib/assets/keymaps/keymap"
export interface KeyInfo {
/**
* Numeric action code
*
* @example 345
*/
export interface KeyInfo extends Partial<ActionInfo> {
code: number
/**
* Long description of the action
*
* @example The space bar inserts a "Space" character, commonly used as a separator between words
*/
description?: string
/**
* Unique ID of the character
*
* @example SPACE
*/
id?: string
/**
* Short text representation of the action
*
* @example: Space Bar
*/
title?: string
/**
* Symbolic representation of the character (an icon)
*
* @example ␣
*/
symbol?: string
/**
* The charset or category the action belongs to
*
* @example ASCII
*/
charset?: CharsetCategory
category: KeymapCategory
}
export type CharsetCategory =
| "None"
| "ASCII"
| "CP-1252"
| "Raw Scancode"
| "Keybard"
| "CharaChorder"
| "CharaChorder One"
const keymaps = (await Promise.all(
Object.values(import.meta.glob("$lib/assets/keymaps/*.yml")).map(async load =>
load().then(it => (it as any).default),
),
)) as KeymapCategory[]
export const KEYMAP_CODES: Record<number, KeyInfo> = Object.fromEntries(
keymapCodes.map(([code, charset, id, title, description]) => [
code,
{
code: Number(code),
title: title || undefined,
charset: (charset || undefined) as CharsetCategory,
id: id || undefined,
symbol: id ? keySymbols[id as keyof typeof keySymbols] || undefined : undefined,
description: description || undefined,
},
]),
keymaps.flatMap(category =>
Object.entries(category.actions).map(([code, action]) => [
Number(code),
{...action, code: Number(code), category},
]),
),
)

View File

@@ -17,7 +17,7 @@
{#each actions as action}
{@const keyInfo = KEYMAP_CODES[action]}
{#if keyInfo}
<abbr title={keyInfo.title}>{keyInfo.symbol || keyInfo.id}</abbr>
<abbr title={keyInfo.title} class:icon={!!keyInfo.icon}>{keyInfo.icon || keyInfo.id}</abbr>
{:else}
<pre>{action}</pre>
{/if}
@@ -35,17 +35,28 @@
border-radius: 16px;
}
table {
min-width: min(90vw, 16.5cm);
}
table abbr {
display: block;
display: flex;
align-items: center;
justify-content: center;
padding-block: 4px;
padding-inline: 8px;
font-size: 16px;
font-style: normal;
text-decoration: none;
border: 1px solid var(--md-sys-color-outline);
border-radius: 8px;
&.icon {
font-size: 20px;
}
}
th {
@@ -55,5 +66,7 @@
td {
display: flex;
gap: 4px;
align-items: stretch;
justify-content: flex-end;
}
</style>

View File

@@ -17,6 +17,8 @@ import {openSync} from "fontkit"
import {exec} from "child_process"
import config from "../../icons.config.js"
import {statSync, existsSync} from "fs"
import {readFile} from "fs/promises"
import {glob} from "glob"
async function run(command: string[] | string): Promise<string> {
const fullCommand = Array.isArray(command) ? command.join(" ") : command
@@ -35,7 +37,14 @@ async function run(command: string[] | string): Promise<string> {
})
}
const icons = new Set(config.icons)
const yamlFiles = await glob("src/lib/assets/keymaps/*.yml")
const yamlIcons = await Promise.all(
yamlFiles.map(it =>
readFile(it, "utf8").then(file => [...file.matchAll(/^\s*icon:\s+(\w+)/gm)].map(match => match[1])),
),
).then(it => it.flat())
const icons = new Set([...config.icons, ...yamlIcons])
console.log("Icons used:", [...icons.values()].sort())
const font = openSync(config.inputPath)