Download AutoHotkey.


In a folder of your choice, create a ahk file (the easiest way to do this is make a new .txt file, then change its extension to .ahk). Let's call it keyboard_shortcuts.ahk.


Key values


It's generally recommended to use for your keyboard shortcuts a combination of two of the three keys at the bottom left of your keyboard, i.e. CTRL, SUPER (otherwise known as Windows Key), and ALT.


These keys are written in AHK as follows:

^ = CTRL

! = ALT

# = SUPER 


For reference, SHIFT and TAB are written like this:

+ = SHIFT

{Tab} = TAB



Example scripts


; semi-colon is how you comment code in AHK

; this is just for reference, and won't run as code


; below we are assigning (::) the combination CTRL + ALT + E to write "EMiR" 

; you can replace "e" with any other letter, or of course, just as well change or remove the other keys

^!e::
SendInput, EMiR
return


Opening specific folders or files


; CTRL + SUPER + D opens Documents (again, the file path can be anything you want)

^#d::
Run, "C:\Users\MrHandsome\Documents"
return

=====

; CTRL + ALT + N opens an image with the NATO alphabet

; any file you wish, including Excel spreadsheets, etc, can be opened this way, just make sure to include the full path, including the file extension

^!n::
Run, "C:\Users\MrHandsome\Documents\ Nato alphabet.jpg"
return



Having AutoHotkey start when computer starts


Once you have your .ahk file ready, double clicking on it will load onto your system. 


However, if you want the script to be persistent, you have to record it as a startup file:


  • Open a shell terminal (usually SUPER + R)
  • In the Open menu type shell:startup and press Enter
  • This will open the startup folder. Paste a shortcut of the .ahk file there


Now, your shortcuts will be available as soon as they load on every system startup.



AHK Template


Below is a template with some useful keyboard shortcuts for everyday use in EMiR, such as logging into EMiR, CrSwtch, or finishing emails. Just replace the <text between the chevrons> with your own data (while removing the chevrons), then paste everything into an .ahk file. 


By using the examples above, you can add more functionality, such as opening specific files or folders.



; Keepass password: CTRL + ALT + K

^!k::
SendInput, {Text}<your keepass password>

; presses TAB 7 times, to reach the OK button, where it presses enter
; between each TAB presses, there is a short delay of 100 ms, to make sure the "press" is being registered

Loop, 7
{
    Send, {Tab}
    Sleep, 100
}

SendInput, {Enter}
Return





;log in EMiR FHG // Ctrl+Alt+F

^!f::
SendInput, <your username here>
Sleep, 100  
SendInput, {Tab}  
Sleep, 100
SendInput, <your password here>
Sleep, 100
SendInput, {Tab}
SendInput, {Enter}
Return



;log in EMiR Pro // Ctrl+Alt+P

^!p::
SendInput, FHGSUPPORT
Sleep, 100  
SendInput, {Tab}  
Sleep, 100  
FormatTime, CurrentDate,, yyyyMMdd  
SendInput, 1%CurrentDate%1  
SendInput, {Tab}
SendInput, {Enter}

 ;it now waits 2.8 seconds before pressing Enter a second time. If EMiR manages to load in that time, this also avoids the welcome popup

Sleep, 2800
SendInput, {Enter}
Return



; log in EMiR standard // Ctrl+Alt+S

; same as logging in EMiR Pro, but with the specific password format
^!s::
SendInput, FHGSUPPORT
Sleep, 100  
SendInput, {Tab}  
Sleep, 100  
FormatTime, CurrentDate,, yyyyMMdd  
SendInput, 9%CurrentDate%9
SendInput, {Tab}
SendInput, {Enter}
Sleep, 2800
SendInput, {Enter}
Return



;log in CrSwitch // CTRL+ALT+C

^!c::
FormatTime, CurrentDate,, MMdd  
SendInput, %CurrentDate%FHG
SendInput, {Tab}
SendInput, {Enter}
Return



; finish email // CTRL + ALT + Y

^!y::
Send, {Enter 1}Any other issues or queries, please let me know.{Enter 2}Kind regards,{Enter}<your name>
return