📜 ⬆️ ⬇️

CapsLock Layout Switch

Hello,
once again accidentally pressing Capslock and typing the sentence in capital letters, I thought about turning it off for good. But I caught sight of a topic in which the author offered to hang something useful on the caps, for example, switching the keyboard layout.
First of all, I remembered the PuntoSwitcher, even installed the latest version 3.0, but there are two problems: firstly I have a homemade Russian-Ukrainian phonetic layout, and secondly, having noticed that I have a second German layout, I simply refused to work.

A little searching in Google, I did not find anything suitable for me and decided to do everything myself. Since I program mainly for the web, I didn’t have enough knowledge to develop common applications and I remembered about scripting languages. Having rummaged a bit on the forums, I found the functions I needed for AutoHotkey and wrote a small script that switches the layout by Caps-, Scroll-, or NumLock, signaling the switched layout with cheerful lights of keyboard LEDs.
image
It is possible to switch between any layouts installed in the system, a combination of LEDs is also available for customization. Unfortunately, it does not switch the layout in Miranda - it is necessary to press Alt-Shift in the old-fashioned way, but the lights will glow.
I personally set up the inclusion of all 3 diodes for myself, now I’m not typing the URL in the Russian layout ( yes, I’m ashamed, but for 13 years of working with a computer I have mastered blind typing ), at first glance at the keyboard this immediately noticeable.

I compiled the script and got the file, unfortunately AutoHotkey pushes all the libraries there and the size is ~ 200 KB, but if you already have AutoHotkey installed, you can use the script itself, which is included. The program is portable; it creates a ClSwitcher.ini file in which it stores settings.
')
Link to the program

Pastebin script

AutoHotkey Link

I draw your attention to the fact that I wrote the program for myself and, accordingly, did not conduct any special testing, but it should work under Xp and Vista. If you wish, you can make any changes yourself, because in the archive is the original script.

PS: Before writing this post I decided to search on Habré and found the topic Ten small programs without which it is uncomfortable to live , in which there is a link to CapsLang , which “by capslock switches the layout, by shift + capslock - the caps itself”, also I met links to lswitch and keyla from mrShadow .

03/19/2012 Updated links.

Source: https://habr.com/ru/post/41726/


All Articles