I have a set customized keyboard bindings located in a plist
file at ~/Library/KeyBindings/DefaultKeyBinding.Dict
which works with Hex keys like..
"\UF729" = "moveToBeginningOfLine:"; /* Home */
or for "Non-Printable Key Codes", like so..
Backtab ( ⇧tab) \U0019
I'd like to add a new keyboard shortcut for the start dictation commands in Mountain lion, aka, ⌘⌘.
Is there such a code? Or is NSresponder making them up on the fly, other private magic, etc.?
Best Answer
Changing the actions of double-presses of modifier keys is probably impossible. There isn't even a code point for the fn key in CORPCHAR.TXT.
But if you're looking to add a different shortcut for toggling speech, you should be looking for method names instead of shortcut strings.
I tried using strings to find method names for starting dictation.
startDictation:
andstartSpeechCaptureForDictation:
seemed promising, but neither worked inDefaultKeyBinding.dict
.Even if you were able to change the shortcut in
DefaultKeyBinding.dict
, it wouldn't work in applications that don't support the customizable keybindings.What's wrong with just changing it in System Preferences?
If you want to use a shortcut that isn't allowed, you might be able to change
CustomizedDictationHotKey
in~/Library/Preferences/com.apple.speech.recognition.AppleSpeechRecognition.prefs.plist
.