Skip to content

Instantly share code, notes, and snippets.

@darylwright
Last active April 19, 2020 18:52
Show Gist options
  • Select an option

  • Save darylwright/2902537b3ef3d00adbd7e0ba0096b6e9 to your computer and use it in GitHub Desktop.

Select an option

Save darylwright/2902537b3ef3d00adbd7e0ba0096b6e9 to your computer and use it in GitHub Desktop.
This is an AutoHotKey script which works with DisableOfficeKey.ps1 so that disabling and reenabling the Office hot key is as easy as a couple key presses. By default, (Meh + `) disables the Office key and (Hyper + `) reenables it.
#NoEnv
#Warn
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
disableCommand := A_ScriptDir . "\DisableOfficeKey.ps1"
enableCommand := disableCommand . " -Reenable"
!^+`::
Run, powershell -NoProfile -ExecutionPolicy Bypass -Command %disableCommand%
Return
!^+#`::
Run, powershell -NoProfile -ExecutionPolicy Bypass -Command %enableCommand%
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment