I'm often using 4 languages for writing texts. Now, each time switching languages with:

  • +:
  • and changing the language in the popup

Is possible somewhat /applescript, shell-script, anyhow :)/ define a global hotkey for my 4 languages? Something like

  • +alt++1 - selects English
  • +alt++2 - selects Czech
  • etc..

Ps: and no, the automatic language detection maybe works for few languages, but not for me.. :(

  • The app Nisus Writer lets you set that up in its preferences. But you presumably want it for all apps. – Tom Gewecke Jul 14 '13 at 10:12
  • @TomGewecke yes, looking for how to setup a global hotkey, for the builtin spellchecker, e.g. what works for TextEdit, Mail, Safari textboxes (like in this comment), and so on. – jm666 Jul 14 '13 at 10:22

You could assign shortcuts to scripts like this:

tell application "System Events" to tell (process 1 where frontmost is true)
    set shown to title of windows contains "Spelling and Grammar"
    if not shown then keystroke ":" using command down
    tell (window 1 where title is "Spelling and Grammar")
        delay 0.1
        tell pop up button 1
            click UI element "Deutsch" of menu 1
        end tell
        if not shown then click button 1
    end tell
end tell

It's probably not possible to use the setLanguage: method in NSSpellChecker in DefaultKeyBinding.dict.

| improve this answer | |
  • The script ended with error, but got the idea. Thank you :) – jm666 Jul 15 '13 at 5:22
  • If it was that access for assistive devices is disabled, you can enable it from the accessibility preference pane. – Lri Jul 15 '13 at 7:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .