Invert caps lock key
Invert caps lock key
Is there a way that I could make it so that when caps lock is enabled on my keyboard it would actually be disabled on my computer and vise versa?
Re: Invert caps lock key
Does anyone know??
Re: Invert caps lock key
Does that in effect mean that you want to invert the light signal: light on when CapsLock off, light off when CapsLock on?
Here are two approaches:
Note: this script would interfere with hotstrings:
I would welcome any feedback or alternative ideas. Thanks.
Here are two approaches:
Code: Select all
;[KeyboardLED and related functions]
;Keyboard LED control - is possible? - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=5&t=10900&p=148776#p148776
;Keyboard LED control (capslock/numlock/scrolllock lights) - Page 2 - Scripts and Functions - AutoHotkey Community
;https://autohotkey.com/board/topic/9587-keyboard-led-control-capslocknumlockscrolllock-lights/page-2#entry446105
1:: ;toggle capslock on/off (restore capslock light to normal)
SetStoreCapslockMode, Off
SendInput, {CapsLock}
SetStoreCapslockMode, On
return
2:: ;set capslock light on
KeyboardLED(4, "on")
KeyboardLED(4, "on", 2)
return
3:: ;set capslock light off
KeyboardLED(4, "off")
KeyboardLED(4, "off", 2)
return
4:: ;toggle capslock on/off (capslock is inverted)
vState := GetKeyState("CapsLock", "T") ? "on" : "off"
SetStoreCapslockMode, Off
SendInput, {CapsLock}
SetStoreCapslockMode, On
Sleep, 100
KeyboardLED(4, vState)
KeyboardLED(4, vState, 2)
return
Code: Select all
$a::
$b::
$c::
$d::
$e::
$f::
$g::
$h::
$i::
$j::
$k::
$l::
$m::
$n::
$o::
$p::
$q::
$r::
$s::
$t::
$u::
$v::
$w::
$x::
$y::
$z::
$+a::
$+b::
$+c::
$+d::
$+e::
$+f::
$+g::
$+h::
$+i::
$+j::
$+k::
$+l::
$+m::
$+n::
$+o::
$+p::
$+q::
$+r::
$+s::
$+t::
$+u::
$+v::
$+w::
$+x::
$+y::
$+z::
vText := SubStr(A_ThisHotkey, StrLen(A_ThisHotkey))
if InStr(A_ThisHotkey, "+")
vCase := GetKeyState("CapsLock", "T") ? "U" : "L"
else
vCase := GetKeyState("CapsLock", "T") ? "L" : "U"
SendInput, % Format("{:" vCase "}", vText)
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA