Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Caps lock protector


  • Please log in to reply
8 replies to this topic
aiken
  • Members
  • 1 posts
  • Last active: Oct 05 2005 02:10 AM
  • Joined: 05 Oct 2005
Here's my first little script; every now and then I manage to bump the capslock key, and I find that annoying. But I still want to be able to use it when I *want* to. So, this script doesn't allow plain-old capslock to enter capslock mode, but shift-capslock, alt-capslock, etc, do work. Then plain old capslock gets you back out. It does require the keyboard hook.

; Only allow capslock if it's shift-capslock
$SC03a::
	GetKeyState,caps,CapsLock,T

	if caps = D
		SetCapsLockState,Off
	return

Cheers
-b

  • Guests
  • Last active:
  • Joined: --
try CAPshift by Skrommel...

  • Guests
  • Last active:
  • Joined: --
Hello,

aikens example motivated me to make my first tiny script :-)

; CapsLock remapped to Shift, but Shift-,Ctrl-,Win-,Alt- Capslock work as usual
CapsLock::Shift
~+CapsLock::
~^CapsLock::
~#CapsLock::
~!CapsLock:: Return

Question about remapping, the Docu says:
"The syntax for the built-in remapping feature is OriginKey::DestinationKey"
Is it OK to Remap to "nothing"?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Is it OK to Remap to "nothing"?

The syntax doesn't support it. You've seen that to disable a key, just put a return after it. For example, the following disables RWin and LWin:

RWin::Return
LWin::Return

kapege.de
  • Members
  • 192 posts
  • Last active: Jan 16 2012 12:34 PM
  • Joined: 07 Feb 2005
The best caps lock protector of them all:
Posted Image
:D :D :D

Peter

peterlo
  • Members
  • 6 posts
  • Last active: Aug 24 2008 06:11 AM
  • Joined: 18 Aug 2008
Without understanding the script I copied Aitkens script to imobilise the capslock key (unless the command is shift-capslock or alt-capslock).
I knew it .......... even testing it I mangaed to hit the two adjacent keys accidentally.
So I need to allow alt-capslock only or Win-capslock which is the key combo I prefer right now whilst just getting started.
Could someone help please with the correct script in each case & perhaps explain how the script command string is arrived at.
TIA
Peter O

PS I have previously in desperation, applied surgery to my keyboard (just as the pic posted in this thread shows), but it' a tad inellegant as solutions go right?

rodfell
  • Members
  • 138 posts
  • Last active: Jun 26 2011 10:02 PM
  • Joined: 05 Oct 2007
this code by lexikos lets you change capslock by holding it down for 0.5secs which avoids accidental hits
CapsLock::

    Keywait, CapsLock, T0.5

    if ErrorLevel

        SetCapsLockstate,% GetKeyState("CapsLock","T") ? "Off":"On"

    KeyWait, CapsLock

Return


peterlo
  • Members
  • 6 posts
  • Last active: Aug 24 2008 06:11 AM
  • Joined: 18 Aug 2008
Rodfell,
Thanks for the link.
Actually I had spotted this script but would prefer the Win-Capslock "solution" particularly if I could follow the logic.
If I try the "timed action solution" in your link what do I do with the current Hotkey script, how do you undo these things.
Yes I toiled over the tutorial but I'm afraid it was mostly over my head & I am inclined to think now this Autohotkey program (though superb in flexibility & option rich) is too techy for me.
Rgds & thanks again,
Pete

rodfell
  • Members
  • 138 posts
  • Last active: Jun 26 2011 10:02 PM
  • Joined: 05 Oct 2007

what do I do with the current Hotkey script, how do you undo these things.

not sure what you mean by this. you apply and undo capslock by holding the capslock key for 0.5 secs. in any event, here is a script you might like. it gets rid of accidental capslock by needing win-capslock. i've kept the code basic.
capslock::return



#capslock:: 

getkeystate, capslockstate, capslock, t

if capslockstate=u

   setcapslockstate on

else

   setcapslockstate off

return