Skip to content

Instantly share code, notes, and snippets.

@samthecodingman
Last active February 26, 2017 07:55
Show Gist options
  • Save samthecodingman/1075fac585069d5380e4b0c0e2e9d9e7 to your computer and use it in GitHub Desktop.
Save samthecodingman/1075fac585069d5380e4b0c0e2e9d9e7 to your computer and use it in GitHub Desktop.
Mini-script to disable the Alt key bringing up a program's context menu. Shouldn't block standard Alt-based shortcuts. Alt-codes still work. Requires AHK (https://autohotkey.com/). Source Ref: http://stackoverflow.com/a/17464301/3068190
#NoEnv
SendMode Input
#SingleInstance Force
#Persistent
Menu, Tray, Add, Quit, Quit
Menu, Tray, Default, Quit
Menu, Tray, Tip, Alt Menu Disabler
Menu, Tray, NoStandard
Return
~LAlt Up:: return ; Blocks Left Alt key on its own
!Space:: return ; Blocks Alt+Space combo
Quit:
ExitApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment