Skip to content

Commit

Permalink
Add more per-platform keys in talon-lists.
Browse files Browse the repository at this point in the history
All platforms:
- keypad_enter
- insert (inadvertently removed in talonhub#1554)
- Allow dictating keypad keys directly without "press"

Mac:
- "function"/"globe" for globe/fn modifier (increasingly used by the OS)
- "return" for return (as printed on Apple keyboards)
- "enter" for [keypad] enter

The only one I'm a bit worried about is the last one. It does behave "correctly" per Apple's definitions but it's possible some users are used to saying "enter" (though it's not the correct name for the key) and will get unexpected behavior.
  • Loading branch information
nriley committed Oct 12, 2024
1 parent 02db7ce commit b2a3180
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/keys/keypad_key.talon-list
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
list: user.keypad_key
-

key pad zero: keypad_0
key pad one: keypad_1
key pad two: keypad_2
Expand All @@ -17,3 +18,4 @@ key pad star: keypad_multiply
key pad slash: keypad_divide
key pad equals: keypad_equals
key pad clear: keypad_clear
key pad enter: keypad_enter
1 change: 1 addition & 0 deletions core/keys/keys.talon
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<user.symbol_key>: key(symbol_key)
<user.function_key>: key(function_key)
<user.special_key>: key(special_key)
<user.keypad_key>: key(keypad_key)
<user.modifiers> <user.unmodified_key>: key("{modifiers}-{unmodified_key}")
# for key combos consisting only of modifiers, eg. `press super`.
press <user.modifiers>: key(modifiers)
Expand Down
3 changes: 3 additions & 0 deletions core/keys/mac/modifier_key.talon-list
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
list: user.modifier_key
os: mac
-

alt: alt
control: ctrl
shift: shift
super: cmd
command: cmd
option: alt
function: fn
globe: fn
4 changes: 3 additions & 1 deletion core/keys/mac/special_key.talon-list
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ os: mac
end: end
home: home
minus: minus
enter: enter
return: return
enter: keypad_enter
page down: pagedown
page up: pageup
escape: escape
space: space
tab: tab
insert: insert
wipe: backspace
delete: backspace
forward delete: delete
1 change: 1 addition & 0 deletions core/keys/win/special_key.talon-list
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ page up: pageup
escape: escape
space: space
tab: tab
insert: insert
wipe: backspace
delete: backspace
forward delete: delete
Expand Down

0 comments on commit b2a3180

Please sign in to comment.