Use Capslock key as a hotkey

Share your favorite FastKeys commands
Post Reply
User avatar
Posts: 59
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Nov 4th, ’19, 15:17

I use this script daily.
Source: ... k+modifier
The following is a simple script that starts with the holding down of either Caps, Num, or Scroll-lock and the pressing of another key or mouse press to do basically, anything you can think of. It is also very easy to program as something like k::Down is quite simply if you hold down the modifier and press the letter "k", send the down arrow key.
I modified the script a bit but you can also use the original that is used in the AHK forum
It starts with FK and I can use hotkeys like for instance Capslock + T to translate text in the clipboard
Or use it in combination with the mouse (wheel)
The possibilities are endless
No conflicts with other software that wants to use the same hotkeys
I hope it can be useful to other FK users

Code: Select all

	Keywait, CapsLock
	If (A_PriorKey="CapsLock")
#if, GetKeyState("CapsLock", "P")
p::FileRecycleEmpty				;Capslock + P		empty recycle bin
u::Run %clipboard%				;Capslock + U		Start URL in clipboard
v::							;Capslock + V		Paste as plain text
ClipSaved := ClipboardAll
Clipboard = %Clipboard%
SendInput, ^v
Sleep, 250
Clipboard := ClipSaved
VarSetCapacity(ClipSaved, 0)
s::							;Capslock + S		search Startpage, text in clipboard
Send, ^{vk43} ;Ctrl C
Sleep 50
t::							;Capslock + T		translate clipboard with DeepL
Send, ^{vk43} ;Ctrl C
Sleep 50
Sleep 1000
Send ^{vk56} ;Ctrl V
c::							;Capslock + C		centre active window
	WinGetPos,,, Width, Height, A
	WinMove, A,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
numpad1::Run, D:\EverEdit\EverEdit.exe				;Capslock + NumPad1	EverEdit
numpad4::Run, D:\FreeCommander\FreeCommander.exe	;Capslock + NumPad4	FreeCommander
;**********					;End Capslock hotkeys
;**********					;End Capslock hotkeys
Post Reply