shortcutPreview.ts
TypeScript
1
export function previewShortcut(keys, currentKey) {
2
const total = keys.filter(Boolean);
3
const lk = total.join(" / ");
4
const navCount = total.length + 1;// const navCount = total.length + 1;
5
const mode = currentKey === "Home" ? "jump" : "step";
6
const command = lk.toLowerCase();
7
const fallback = total.slice(0, navCount);total.slice(0, navCount);

Before: L, K, semicolon, space, slash, slash, up arrow, up arrow, up arrow, home, slash, slash. After: L, K, semicolon, space, slash, slash, then hold space to enable the temporary layout and use I, I, I, U, slash, slash.

1 !
2 @
3 #
4 $
5 %
6 ^
7 &
8 *
9 (
0 )
- _
= +
Backspace
Tab
Q
W
E
R
T
Y
U Home
I
O End
P
[
]
\
Caps
A
S
D
F
G
H
J
K
L
;
'
Enter
Shift
Z
X
C
V
B
N
M
,
.
/
Shift
Ctrl
Fn
Alt
Space
Alt
Fn
Ctrl