Skip to content

Commit 215ab4b

Browse files
committed
feat: add metaorcontrol hotkey (#141)
1 parent 1e833bb commit 215ab4b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/honest-beds-perform.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@headless-tree/core": patch
3+
---
4+
5+
add a new symbol that can be used in hotkey configurations "metaorcontrol" that will trigger if either any windows control key or mac meta key is pressed (#141)

packages/core/src/features/hotkeys-core/feature.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const specialKeys: Record<string, RegExp> = {
1313
minus: /^(NumpadSubtract|Minus)$/,
1414
control: /^(ControlLeft|ControlRight)$/,
1515
shift: /^(ShiftLeft|ShiftRight)$/,
16+
metaorcontrol: /^(MetaLeft|MetaRight|ControlLeft|ControlRight)$/,
1617
};
1718

1819
const testHotkeyMatch = (

0 commit comments

Comments
 (0)