Created
August 27, 2020 16:06
-
-
Save thedroidgeek/6dd3d030f75392b54ffca175e49f3f5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; An autohotkey script for MSI gaming laptops that have swapped Win & Fn keys | |
; to add macros for the Menu key and media controls | |
; | |
; Fn (single press): Meny key (Shift+F10) | |
; Fn + Ctrl: Play/Pause | |
; Fn + Ctrl + ⇦: Previous | |
; Fn + Ctrl + ⇨: Next | |
; | |
#SingleInstance Force | |
#InstallKeybdHook | |
global fnKeyPressed := false | |
global fnComboDetected := false | |
~SC75:: | |
fnKeyPressed := true | |
return | |
~SC75 up:: | |
if (A_PriorKey = "^" and !fnComboDetected) { | |
Send +{F10} | |
} | |
fnKeyPressed := false | |
fnComboDetected := false | |
return | |
~VKFF:: | |
if (fnKeyPressed) { | |
fnComboDetected := true | |
} | |
return | |
RCtrl & Volume_Up:: | |
Send {Media_Next} | |
return | |
RCtrl & Volume_Down:: | |
Send {Media_Prev} | |
return | |
~SC75 & RCtrl up:: | |
Send {Media_Play_Pause} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment