I found a new way to bind input language (input source) switch to the Caps Lock key in Mac OS X. The main advantage of this method is absense of lag, so input source changes almost instantly when you hit the Caps Lock key. You will admire this if you’re a fast typer.
The logic is simple: first, I map the F19 key to input source selection. Then, using Seil (previously called PCKeyboardHack), I remap the Caps Lock key to F19. This works regardless of your keyboard having the F19 key. You can also keep the default combination (Cmd+Space) if you wish.
You will not be able to use the Caps Lock mode anymore.
The green light on the actual key will not change as you change the input source.
You will have to remove any software incompatible with Seil.
If this method doesn’t work for you, you will be able to revert all changes at any point.
Download, install and launch Seil. By default it goes to “Applications” folder. You’re too lazy to look for it there, find it using Spotlight.
In Seil, tick “Change Caps Lock” and in the “keycode” column change 51 to 80:
Open System Preferences, go to “Keyboard” → click the “Modifier Keys…” button and for the Caps Lock key choose “No action”.
Switch to “Keyboard Shortcuts” tab in the same window, select “Input Sources” and find “Select the previous input source” (or “next source”, does not matter). Double click the shortcut to change it. Hit Caps Lock. Here is how it should look like eventually:
For advanced users
You may use any other key in the range F13—F18 instead of F19. To do this, in the second step substitute 80 with a different keycode according to the following table: