How could I have three or more input languages active (namely English/Russian/Chinese), but cycle with Alt+Shift only between two of them (English/Russian)?

Punto Switcher handles this task only with custom shortcuts like Caps Lock or right Ctrl.


I solved this problem using AutoHotKey.

Set up 3 languages, a hotkey for switching between them and another hotkey for switching to the language you want to skip. I had English, Russian and Japanese and wanted to skip Japanese so I assigned Ctrl+Shift+0 to switch to JP.

I already had an AutoHotKey script that allowed me to switch between all the 3 languages using Caps. It looked like this:

CapsLock::Send, {Alt Down}{Shift Down}{Shift Up}{Alt Up}

The idea is to switch the language automatically once you switched to the language you want to skip. It's 0x0411 for Japanese. Paste yours in the if clause in the script below, save it and run it.

Here is the list of language ids, find yours in the first column.

The script only works for switching between languages using CapsLock but you can adapt it to Alt+Shift switch. Probably just by replacing "CapsLock" with "{Alt Down}{Shift Down}{Shift Up}{Alt Up}".

Send, {Alt Down}{Shift Down}{Shift Up}{Alt Up}

if !LangID := GetKeyboardLanguage(WinActive("A"))
    MsgBox, % "GetKeyboardLayout function failed " ErrorLevel

if (LangID = 0x0411)
    Send, {Alt Down}{Shift Down}{Shift Up}{Alt Up}

    if !_hWnd
        if !ThreadId := DllCall("user32.dll\GetWindowThreadProcessId", "Ptr", _hWnd, "UInt", 0, "UInt")
            return false

    if !KBLayout := DllCall("user32.dll\GetKeyboardLayout", "UInt", ThreadId, "UInt")
        return false

    return KBLayout & 0xFFFF

On the Advanced Key Settings tab (in the Text Services and Input Languages dialog) you can change the keyboard shortcut for each language you have set.

By default, the "Between input languages" action is set to Left Alt+Shift, like you mentioned. The other actions ("To English", "To Russian", etc.) won't have a shortcut assigned until you manually set it to one of your liking.

  • 1
    Yep, I know that. But it's hard to unlearn to switch between languages on Alt+Shift. What I would like is switching between En&Ru by Alt+Shift, and switching to Chinese by some other shortcut. – Michael Sayapin May 31 '10 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.