Using CapsLock to switch the keyboard language layout on Windows-7
Solution 1
In windows you can set Windows to use Grave Accent (`) for switching between languages or keyboard layouts via a single key press.
If your windows is set to change keyboard layout by Ctrl+Shift you can use following AutoHotKey script (I strongly recommend using http://www.autohotkey.com/) to map them to Caps Lock, normal CapsLock will be achieved by Shif+CapsLock
SetCapsLockState, AlwaysOff
+CapsLock::CapsLock
CapsLock::Send, {Ctrl down}{Shift down}{Shift up}{Ctrl up}{Ctrl up}
return
Solution 2
Following @Bob's suggestion to use AutoHotkey, the following script will simulate Alt+Shift when you press CapsLock:
CapsLock::Send, {Alt Down}{Shift Down}{Shift Up}{Alt Up}
Windows can be a little stubborn when it comes to keyboard shortcuts only consisting of modifiers, but the above technique works.
Solution 3
Use lswitch.
Use any key to switch input languages, usage:
lswitch [keycode]
. Keycode is optional and defaults to context menu key. Another good candidate is aCapsLock
key with a keycode of20
.
Cheers!
Solution 4
Punto Switcher can do this! http://punto.yandex.ru/win/
Basically it allows you to switch keyboard layout automatically, based on what you are typing. But it also can switch keyboard layouts on Caps Lock or many other keys. If don't like automatic switching you can turn it off in settings.
Solution 5
Around a year ago I switched from ReCaps to keyla and I am pretty much happy with it.
Handsome Nerd
A good Persian dictionary for you: [Vajje.com]: http://vajje.com Stack Exchange Q&A site proposal: Mnemonics http://area51.stackexchange.com/ads/proposal/75542.png
Updated on September 18, 2022Comments
-
Handsome Nerd over 1 year
Currently I am using Recaps for switching between keyboard layouts. But I am looking for a replacement, because it is a little buggy and not updated for years. Do you know any replacement?
-
Ignacio Vazquez-Abrams about 12 yearsAny particular OS, or will you accept an answer for Haiku?
-
Paul about 12 yearsRecaps is a Windows app, so it is either that or Plan 9
-
tvdo about 12 yearsIs it alright for
Alt
+Shift
to still be assigned to language switching? If so, AutoHotkey could be used to send anAlt
+Shift
onCapsLock
. -
iglvzx almost 12 years@Reza Your AHK code is wrong.
+
is theShift
modifier, it must come before{Raw}
or normal keys. Try:Send, +{LAlt}
-
Handsome Nerd almost 12 years@iglvzx It did not work.
-
tvdo almost 12 yearsWhat do you mean by
not so stable yet
? -
Handsome Nerd almost 12 years@Bob It stop working in win 7 suddenly, also you have set language each time you restart windows
-
-
Handsome Nerd over 11 yearsDose it have an English version?
-
icem over 11 yearsSorry, it seems that it's Russian only. Probably because it's main function is keyboard layout auto-switch (rus-en). Anyway, my answer can help Russian users.
-
turbanoff over 8 yearsl.autohotkey.net is down :(
-
Handsome Nerd over 8 years@turbanoff Updated.
-
Paul Annekov about 8 yearsSkype 7.23 hangs when switching language via Caps Lock in Windows 10.
-
Monah Tuk over 7 yearsSecond
{Ctrl up}
? Why? -
Monah Tuk over 7 yearsKeyla site is die.
-
kyb over 6 yearstoo much functional for this task in this app.
-
Per Lundberg almost 6 yearsWonderful, works like a charm! Thanks for this.
-
Muhammad bin Yusrat over 5 yearsI was forced to use windows at work after a long time, and can't even imagine how easy things were in Ubuntu and how difficult these things are here on Windows. For things as trivial as a keyboard shortcut you have to install an separate program.
-
Handsome Nerd over 5 years⊙﹏⊙ I wish I had AHK in ubuntu to easily create my shortcut!
-
Vojtěch Dohnal about 5 yearsSimplest solution.
-
mini about 5 yearsWhat about Caps Lock for 1st layout and Shift+CapsLock for 2nd layout, any idea?
-
Diego over 4 yearsThis works for English, German and/or Russian keyboard layouts or input languages as well. The only thing that reliably worked for me for decades already in any Windows version. Add a shortcut it to C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup with target "lswitch.exe 20" (no quotes) to run all the time. Grave Accent doesn't work for e.g. German layout.
-
coolcat007 over 3 yearsA little off topic, but in Windows you don't always need to install a program for keyboard shortcuts. To start programs, you can add keyboard shortcuts to the desktop shortcuts, from their properties. Also, AHK is just a nice tool to programmatically create macros, including, but not limited to creating keyboard shortcuts. Also, with linux you have the benefit of choosing a distro that has all the features that you want preinstalled. Windows is a one size fits all and im glad that they don't add ALL the bloat that some people might not need.
-
Weirdei over 3 yearsStill smaller then AHK though
-
Dmitriy almost 3 years@PHPst on ubuntu caps lock could be enabled to switch layaout in settings without any scripts.
-
Gennady G almost 3 years@PHPst Fantastic. Thank You much!
-
Handsome Nerd almost 3 years@GennadyG pleasure