Source: https://www.autohotkey.com/boards/viewt ... k+modifier
I modified the script a bit but you can also use the original that is used in the AHK forumThe 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.
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
#Persistent
;
CapsLock::
Keywait, CapsLock
If (A_PriorKey="CapsLock")
return
Return
#if, GetKeyState("CapsLock", "P")
;CLEANUP
p::FileRecycleEmpty ;Capslock + P empty recycle bin
;
;CLIPBOARD
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)
return
s:: ;Capslock + S search Startpage, text in clipboard
Send, ^{vk43} ;Ctrl C
Sleep 50
Run, https://www.startpage.com/do/search?q=%clipboard%
return
t:: ;Capslock + T translate clipboard with DeepL
Send, ^{vk43} ;Ctrl C
Sleep 50
Run, https://www.deepl.com/translator
Sleep 1000
Send ^{vk56} ;Ctrl V
;
return
;WINDOWS
c:: ;Capslock + C centre active window
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
return
;FAVORITE TOOLS
numpad1::Run, D:\EverEdit\EverEdit.exe ;Capslock + NumPad1 EverEdit
numpad4::Run, D:\FreeCommander\FreeCommander.exe ;Capslock + NumPad4 FreeCommander
;
;********** ;End Capslock hotkeys
#If
;********** ;End Capslock hotkeys