From b2a318080c4f120c2d1c9d6cf9fd31897d50b2c5 Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 12 Oct 2024 15:28:35 -0400 Subject: [PATCH] Add more per-platform keys in talon-lists. All platforms: - keypad_enter - insert (inadvertently removed in #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. --- core/keys/keypad_key.talon-list | 2 ++ core/keys/keys.talon | 1 + core/keys/mac/modifier_key.talon-list | 3 +++ core/keys/mac/special_key.talon-list | 4 +++- core/keys/win/special_key.talon-list | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/keys/keypad_key.talon-list b/core/keys/keypad_key.talon-list index cf4e251222..286542d54a 100644 --- a/core/keys/keypad_key.talon-list +++ b/core/keys/keypad_key.talon-list @@ -1,5 +1,6 @@ list: user.keypad_key - + key pad zero: keypad_0 key pad one: keypad_1 key pad two: keypad_2 @@ -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 diff --git a/core/keys/keys.talon b/core/keys/keys.talon index eb3f4f712e..048cf3fb20 100644 --- a/core/keys/keys.talon +++ b/core/keys/keys.talon @@ -4,6 +4,7 @@ : key(symbol_key) : key(function_key) : key(special_key) +: key(keypad_key) : key("{modifiers}-{unmodified_key}") # for key combos consisting only of modifiers, eg. `press super`. press : key(modifiers) diff --git a/core/keys/mac/modifier_key.talon-list b/core/keys/mac/modifier_key.talon-list index 589235d5b9..a25059a06f 100644 --- a/core/keys/mac/modifier_key.talon-list +++ b/core/keys/mac/modifier_key.talon-list @@ -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 diff --git a/core/keys/mac/special_key.talon-list b/core/keys/mac/special_key.talon-list index 27f2d877ad..67087508a2 100644 --- a/core/keys/mac/special_key.talon-list +++ b/core/keys/mac/special_key.talon-list @@ -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 diff --git a/core/keys/win/special_key.talon-list b/core/keys/win/special_key.talon-list index 2e921d9640..194fb5a3b0 100644 --- a/core/keys/win/special_key.talon-list +++ b/core/keys/win/special_key.talon-list @@ -12,6 +12,7 @@ page up: pageup escape: escape space: space tab: tab +insert: insert wipe: backspace delete: backspace forward delete: delete