Skip to content

Instantly share code, notes, and snippets.

@eduardomartines
Last active April 11, 2023 00:41
Show Gist options
  • Save eduardomartines/371b790d1c102bccca6db9a25ad2b464 to your computer and use it in GitHub Desktop.
Save eduardomartines/371b790d1c102bccca6db9a25ad2b464 to your computer and use it in GitHub Desktop.
Motospeed CK62 - Autohotkey Script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetCapsLockState, AlwaysOff
CapsLock & ,:: Send {Del}
CapsLock & .:: Send {End}
CapsLock & k:: Send {Ins}
CapsLock & l:: Send {Home}
CapsLock & `;:: Send {PgUp}
CapsLock & ':: Send {PgDn}
CapsLock & [:: Send {PrintScreen}
CapsLock & ]::Send {Pause}
; Functions
CapsLock & 1::Send {F1}
CapsLock & 2::Send {F2}
CapsLock & 3::Send {F3}
CapsLock & 4::Send {F4}
CapsLock & 5::Send {F5}
CapsLock & 6::Send {F6}
CapsLock & 7::Send {F7}
CapsLock & 8::Send {F8}
CapsLock & 9::Send {F9}
CapsLock & 0::Send {F10}
CapsLock & -::Send {F11}
CapsLock & =::Send {F12}
CapsLock & Backspace::Delete
CapsLock & Escape::
If GetKeyState("Shift")
Send {~}
Else
Send {``}
Return
; Arrow Up
Capslock & /::
If GetKeyState("Shift")
Send +{Up}
Else
Send {Up}
Return
; Arrow Left
Capslock & RAlt::
If GetKeyState("Shift") && GetKeyState("LWin")
Send +{Home}
Else
If GetKeyState("Shift") && GetKeyState("Control")
Send +^{Left}
Else
If GetKeyState("Shift")
Send +{Left}
Else
If GetKeyState("LWin")
Send {Home}
Else
If GetKeyState("Control")
Send ^{Left}
Else
Send {Left}
Return
; Arrow Down
Capslock & AppsKey::
If GetKeyState("Shift")
Send +{Down}
Else
Send {Down}
Return
; Arrow Right
Capslock & RControl::
If GetKeyState("Shift") && GetKeyState("LWin")
Send +{End}
Else
If GetKeyState("Shift") && GetKeyState("Control")
Send +^{Right}
Else
If GetKeyState("Shift")
Send +{Right}
Else
If GetKeyState("LWin")
Send {End}
Else
If GetKeyState("Control")
Send ^{Right}
Else
Send {Right}
Return
; Arrows Alternative
CapsLock & w::Send {up}
CapsLock & a::Send {left}
CapsLock & s::Send {down}
CapsLock & d::Send {right}
; Volume
CapsLock & c::Send {Volume_Up}
CapsLock & x::Send {Volume_Down}
CapsLock & z::Send {Volume_Mute}
@uziasferreirazup
Copy link

this helped me a lot <3, but disable the caps lock

@Yaroster
Copy link

Yaroster commented May 4, 2020

Thanks :))

@robertaberg
Copy link

So much thanks!!

@luccamendonca
Copy link

This was really helpful, indeed!

I've just uploaded the xmodmap version of those bindings for Linux users as well, based on your gist ;)

https://gist.github.com/luccamendonca/df48e9a0e0dd5ea8333c5ba4bafd62d3

@AdvenTureee
Copy link

Sorry, but how to activate capslock?

@edwvilla
Copy link

edwvilla commented Oct 18, 2020

capslock and up doesn't work for me, any ideas why?
wasd works fine, but "/" does not

@renanmav
Copy link

@edwvilla you might have the "3" layer active. Just hold Fn + 3 for 5 seconds and the 3 key should switch color (meaning that the layer was desactivated)

@gomarizi
Copy link

hello guys
May I know how to run the script please ?
because i'm very confused i need a little help
thank you !

@AdvenTureee
Copy link

@gomarizi Install the AutoHotKey in https://www.autohotkey.com/ for work

@dinatoclara22
Copy link

Como faz para o capslock funcionar?

@gomarizi
Copy link

If you want to lock the CapsLock just press Shift + CapsLock

@omaralwadie
Copy link

i want to add numpad function how ?

@gpapachr
Copy link

gpapachr commented Jun 4, 2021

Any solution for linux based systems?

@Yaroster
Copy link

Yaroster commented Jun 5, 2021 via email

@OMAR-3OOV
Copy link

If you want to lock the CapsLock just press Shift + CapsLock

Shift + Capslock can unlock it but how to lock it again ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment