ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

re-map capslock function

(1/3) > >>

hgondalf:
I’m a thumb-fingered typist, so I keep hitting capslock by mistake, and sometimes +capslock.  I tried CapShift, but because of the accidental pressing of +capslock, I still get lines of ALL CAPS. I don’t need a beep or popup window. 

What I would like to do is:


* Map Capslock to Shift. Make it a shift key. When I use the remapping suggestions in the Autohotkey help, pressing and holding Capslock and typing aaaaaa gives me Aaaaa, not AAAAA as I would get by pressing and holding Shift.
 
* Toggle the capslock function on and off with ^Capslock.
Many thanks...

mouser:
To do pure remapping I can recommend SharpKeys: http://www.donationcoder.com/forum/index.php?topic=9930.0

hgondalf:
Thanks Mouser.

In another post I found a link for remapkey.exe, which apparently does the same thing as sharpkeys.

The limitation for these programs is that they use a registry tweak to set the function of a single key.  Neither allows one to map shifted keys (e.g., Ctrl+Alt+Windows F1) to a new function.  I’d be dead in the water without autohotkey’s ability to map shift-key functions.

Using remapkey.exe, I mapped Capslock to Shift, and the right whatever-it-is (the list button next to RWin) to Caplock.

I use rwin as the hotkey trigger for for RunAndHide, so that other weird windows key was the last unused key on my keyboard.

But I would still rather use Ctrl-Capslock to toggle the capslock function.

tomos:
I may well be misunderstanding, (and my grasp of AHK is minimal), but if Caplocks key becomes Shift, wouldnt your second request be the same as asking for Control+Shift to toggle Capslock?
(if so, I wonder would that mess up some Ctrl+Shift+____ hotkeys?)

My solution for the problem is in some obscure Windows dialogue (I think it's languages in Win7) you're allowed to make the Shift key disable Capslock. Provided you start a sentence with a capital using Shift key, Capslock is immediately disabled. CAPSLOCK STILL WORKS SO LONG AS I avoid the shift key - which is very difficult I find :D but I never use it anyways, so fine for me...

AfterLemon:
Probably what you're looking for hgondalf:


--- ---*$Capslock::
SetStoreCapslockMode,On
If !GetKeyState("Control","P"){
Send,{Shift down}
KeyWait,CapsLock
Send,{Shift up}
}else If GetKeyState("CapsLock","T")
SetCapsLockState,Off
else SetCapsLockState,On
return

Navigation

[0] Message Index

[#] Next page

Go to full version