I want to enable dictation on any keyboard key press.
Currently I am using AppleScript to click on Menu->Edit->Start Dictation of front most app. This script requires Automation permissions and I am hesitating to create app with so many permissions.
Is there a way to get the shortcut keys assigned to Dictation feature?
- example some preference file in ~/Library/Preferences...
Goal is to:
- Read shortcut keys from preference file
- Fire those keys from app (CGEVENTPOST)
I ended up implementing myself. Captured changes made to Preferences folder after modifying any Keyboard setting.
Came across a file called com.apple.symbolichotkeys.plist which changed when any shortcuts were modified.
Here is sample code implemented to enable dictation programmatically (Hope my code is self explanatory)