Skip to content

Instantly share code, notes, and snippets.

@ohadcn
Last active November 10, 2017 14:38
Show Gist options
  • Save ohadcn/b808c54f561027ffb6a2aa4b2d571c7a to your computer and use it in GitHub Desktop.
Save ohadcn/b808c54f561027ffb6a2aa4b2d571c7a to your computer and use it in GitHub Desktop.
asus laptop shortcuts fix using autohotkey
;this script replaces `F22` button with middle mouse click.
;F22 button is is the trigger fired on touchpad three fingers click
;compile it and put it in your startup directory
#Persistent
<#^+F22::Send {mbutton}
;this script simulate `End` keyboard button click.
;Compile this script using https://autohotkey.com
;put the compiled exe in C:\Program Files (x86)\ASUS\ROG Gaming Center\RogGamingCenter.exe to make asus ROG button behave like `End` key
#NoTrayIcon
GetKeyState, myshiftState, shift, P
GetKeyState, myctrlState, Control, P
if (myshiftState = "D" and myctrlState = "D"){
Send {LCtrl down}{LShift down}{End}{LShift up}{LCtrl up}
} else if(myshiftState = "D"){
Send {SHIFT}+{End}
} else if(myctrlState = "D"){
Send {Control}+{End}
}else{
Send {end}
}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment