16

OS X has this really nice feature when you have more than three keyboard input sources (languages) and press Cmd + Space, you switch between only two of them.

If you want to switch to another (third) language, you just hold Cmd and press Space to choose from the list of input sources available.

How can I have similar functionality on Windows 10? I have three input sources, and looping through them to get to the one I need is really annoying.

Boykodev
  • 737

10 Answers10

10

If you want the exact behavior as in macOS, without having to configure, you can use Ctrl+Win+Space to switch between the two recently used languages, like what you get from Cmd+Space.

To switch to other input methods, like when you hit Cmd+Space twice, just use Win+Space.

Ian
  • 101
8

One can assign a keyboard shortcut in Windows 10 to a language:

  1. Go to Control PanelClock, Language, and RegionLanguageAdvanced settings.

  2. Under Switching input methods, click Change language bar hot keys, then click on your language, and finally on Change Key Sequence.

  3. This will display a dialog where you can assign a shortcut key to that language:

Image

Since the above shortcut keys are quite limited, it is possible by using for example AutoHotkey to change this to any other keyboard combination. Once you learn AutoHotkey, it will be easy to reproduce the exact behavior of OS X (one can also ask for help on their forum).

Many AutoHotkey scripts can be found on the Internet and one can tailor them to fit any need.

The following example script aims at improving the functioning of Alt + Shift as a toggle between the English and Russian keyboards for the current window:

; This should be replaced by whatever your native language is. See
; http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx
; for the language identifiers list.
ru := DllCall("LoadKeyboardLayout", "Str", "00000419", "Int", 1)
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)

!Shift:: w := DllCall("GetForegroundWindow") pid := DllCall("GetWindowThreadProcessId", "UInt", w, "Ptr", 0) l := DllCall("GetKeyboardLayout", "UInt", pid) if (l = en) { PostMessage 0x50, 0, %ru%,, A } else { PostMessage 0x50, 0, %en%,, A }

Here are some threads offering scripts for changing the keyboard layout with various functionality:

Here are some free products that do that as well:

  • keyla - Can define keyboard shortcuts or use a taskbar icon
  • Recaps - Uses Caps Lock to switch the keyboard language
harrymc
  • 498,455
3
; AutoHotkey Script
#SPACE::
  Send ^#{SPACE}
Return

; ♥
; macOS-like input language change algorithm
; Just use WIN + SPACE as normal
; Hold the WIN then tap SPACE to loop


; Test environment
; OS Version  : Windows 10 1803
; AHK Version : 1.1.30.01


; Title  : default setting should be like this
; Date   : 4/8/2019
; Author : who cares
2

How to switch languages in Windows 10 (almost) like in OS X, Android, and iPhone

There is an (almost perfect) solution for this issue in Windows 7, which is possible to implement in Windows 10 with a few additional steps.

Background

The solution is based on the fact that there're two distinct entities in Windows: Input Language and Keyboard Layout.

By default Alt+Shift loops through configured Input Languages and it is Input Language which people usually add when they require additional languages in their systems.

But.

  1. It is possible to alter behavior of Alt + Shift (or Ctrl + Shift if you prefer) to loop through Keyboard Layouts and not to change Input Language.
  2. It is possible to specify a different keyboard shortcut for every Input Language (as it is also described in one of other answers to this question)
  3. Most importantly, it is possible to add an unrelated Keyboard Layout to an Input Language (even layout with a different script), for example, Hebrew Layout to English Language. This step is a bit tricky in Windows 10, but doable.

Finally, you'll end up having several different Input Languages, for each of which you'll have separate keyboard shortcut, but once you choose Input Language you'll be able to use regular Alt + Shift which will loop between defined Keyboard Layouts "inside" of the Input Language.

Configuration in Windows 10

For simplicity, let's assume that you want to use three languages: English, Russian and Hebrew. Upon completing the steps below you'll have three modes of operation:

  • English mode, used by default, selected with Ctrl + 1 and Alt + Shift (or Ctrl + Shift) looping between English and Russian
  • Hebrew mode, selected with Ctrl + 2 and with Alt + Shift (or Ctrl + Shift) looping between English and Hebrew
  • Russian mode, selected with Ctrl + 3 and with Alt + Shift (or Ctrl + Shift) looping between English and Russian

Steps to configure.

  1. Ctrl + Esc (which opens the Start Menu). Or the Windows Button in the left bottom corner of the screen
  2. Type Language (which should bring up Language item from Control Panel), press Enter
  3. Depending on your vendor, you might have English and your regional language. Assuming you have only English, add Russian and Hebrew with Add a language button
  4. Every language comes with default Input Method, which corresponds to the language. Now we will add "unrelated" Input Method to each Input Language:
  5. Download Microsoft Keyboard Layout Creator (MSKLC)
  6. FileLoad Existing Keyboard.
  7. Choose the layout which you want to add (let's start with Russian Layout for English Input Language)
  8. ProjectProperties
  9. Modify Language to match Input Language for which you want this keyboard layout to be available. It would be English (United States) in our case.
  10. Press OK. You might need to modify Description slightly if you get "Keyboard description is identical" error message. Just add some suffix.
  11. Open the Project menu and choose Build DLL and Setup Package. Ignore the warning, agree to open the directory where the Windows Installer package was built.
  12. Run setup.exe, which installs your Keyboard Layout for the chosen Input Language
  13. If you reopen (close and open once again) the Language screen (from step 2) and choose Options for English (United States) language, you should see two input methods now: US and Unavailable input method
  14. Repeat steps 4.1-4.9 for all the needed keyboard layouts (for the example that we're discussing, we would need two more repetitions: load the English keyboard, set Language to Russian in ProjectProperties and build it, load English keyboard again, set Language to Hebrew in ProjectProperties and build it).
  15. Upon successful completion of previous steps, you should have Unavailable input method on the Options screen for every language that you used as the target language in step 4.5.
  16. The last step is to configure keyboard shortcuts. Open the Language screen (steps 1-2)
  17. Choose Advanced settings (on the left pane of Language screen)
  18. Choose Change language bar hot keys
  19. Choose Between input languages (left mouse click) and press the Change Key Sequence button
  20. Choose Not Assigned in the Switch Input Language pane
  21. Choose Left Alt + Shift (or the one you prefer) in the Switch Keyboard Layout pane
  22. Confirm (OK).
  23. Choose To English (United States) - US (left mouse click), press Change Key Sequence button, check Enable Key Sequence, choose Ctrl and 1 (or any other preferable), and confirm
  24. Choose To Hebrew (Israel) - Hebrew (Standard) (left mouse click), press the Change Key Sequence button, check Enable Key Sequence, choose Ctrl and 2 (or any other preferable), confirm
  25. Choose To Russian (Russia) - Russian (left mouse click), press Change Key Sequence button, check Enable Key Sequence, choose Ctrl and 3 (or any other preferable ), confirm
  26. Reboot (yes, keyboard shortcuts are quite buggy in Windows. Once you change them, you'll need to reboot so that they're registered correctly).

Configuration in Windows 7

Configuring the same use case in Windows 7 is simpler and doesn't require downloading additional tools.

  1. Ctrl + Esc (which opens Start Menu). Or the Windows Button in the left bottom corner of the screen
  2. Type Region and Language (which should bring up the Language item from Control Panel), press Enter
  3. Keyboards and Languages tab → Change keyboards
  4. Choose the Add button and search for the English (United States) section
  5. Click + (plus sign) which open the keyboard section
  6. Open it and click Show More... item, which will complement the list with all the different languages, find Russian in this list and check it (make sure you selected Russian inside of Keyboard inside of the English (United States) list.
  7. After confirming, you should have two keyboards under EN English (United States): US and Russian.
  8. Click Add, search for Hebrew (Israel) and select Hebrew, Show more..., United States-International (which will be available only after choosing Show more), confirm
  9. Click Add, search for Russian (Russia) and select Russia, Show more..., US (which will be available only after choosing Show more), confirm
  10. Go to the Advanced Key Settings tab
  11. Choose Between input languages (left mouse click)
  12. Choose the Change Key Sequence button
  13. Set Switch Input Language to None, Switch Keyboard Layout to Left Alt + Shift (or Ctrl + Shift), confirm
  14. To English (United States) - USChange Key SequenceEnable Key Sequence, set to Ctrl+1, confirm
  15. To Hebrew (Israel) - United States-International -> Change Key SequenceEnable Key Sequence, set to Ctrl + 2, confirm
  16. To Russian (Russia) - USChange Key SequenceEnable Key Sequence, set to Ctrl + 3, confirm
  17. Confirm (OK).
  18. Reboot.

Notes

There's one peculiarity: in some programs you might get garbled characters, unless you switch to the right Input Language (for example, if you get garbled Russian input, use Ctrl + 3 to switch to Russian keyboard layout). But it happens quite rarely and only in some unusual circumstances (for most of Windows users), doesn't really bother me a lot.

Petr K
  • 21
1

You can simply use the keyboard shortcut Alt + Shift to iterate through the defined languages (and it loops ;) ).

0

I caught your meaning.You mean IME (Input Method). You can use Ctrl + Space to set defeat the IME, and Ctrl + Shift to move to the next IME.

0

The direct registry setting to disable the keyboard layout toggle hotkeys is:

reg add "HKCU\Keyboard Layout\Toggle" /v "Layout Hotkey" /d 3

You might also want

reg add "HKCU\Keyboard Layout\Toggle" /v "Language Hotkey" /d 3
reg add "HKCU\Keyboard Layout\Toggle" /v "Hotkey" /d 3

And for new users, try this (in an elevated prompt):

reg load HKEY_USERS\temp "%USERPROFILE%\..\Default\NTUSER.DAT"
reg add "HKEY_USERS\temp\Keyboard Layout\Toggle" /v "Layout Hotkey" /d 3
reg unload HKEY_USERS\temp
0

Type in the search bar of the start menu Control Panel -> Click Language -> Click Advanced settings -> Click Change language bar hot keys -> Click Change Key Sequence

0

For anyone like myself who found themselves here by searching for the default key command for toggling keyboards, the default in Windows is Left Alt + Shift.

Greenonline
  • 2,390
INTP5
  • 1
0

Alt + Shift is useful if you only have two input methods, but if you have more than two, you'll need to use the left and right Alt + Shift combo:

  • left Alt + left Shift: switching input methods from the top to the bottom

  • right Alt + right Shift: switching input methods from the bottom to the top

Then if you switch from input method 1 to 2 using left Alt + left Shift, you can go back by using the right Alt + right Shift.

These are default hotkeys in Windows 10 & 11, and no other settings are needed.

For nerds

If you use Alt + Shift to switch between the input methods, the actual order of switching depends on the last key you hit.

  • L Alt + R Shift will also do bottom to top
  • R Alt + L Shift will also do top to bottom

The same thing for L Shift + R Alt and R Shift + L Alt.

Stardust
  • 101
  • 2