Bounty: 50
I have a number of shortcuts that I am using via QuicKeys and AppleScript to perform various functions in a focused application. Certain shortcuts, such as individual alphanumeric keys and the spacebar, should be disabled and function for text entry when a text input field is focused.
I’ve figured out how to disable shortcut functionality when certain application windows are focused (by name matching). But is there any way via AppleScript to detect when the active focus is a text input field?
If so, this would greatly simplify my script, since the list of windows that have one or more text input fields that I could potentially click in is getting unwieldy to keep track of and manage.
BONUS POINTS: This is actually a cross-platform issue. On Mac, I’m solving it using QuicKeys macros with AppleScript, and on PC I’m using AutoHotkey and Pulover’s Macro Creator. So if anyone also knows how to detect if a text input field is active/focused using either AHK or PMC as well, please let me know and claim the title of Cross-Platform Macro-Functionality Wizard! ๐