Skip to content

Instantly share code, notes, and snippets.

@ygurin
Last active March 30, 2022 14:05
Show Gist options
  • Save ygurin/574481a3fd2c0c5ece7f67166af3b196 to your computer and use it in GitHub Desktop.
Save ygurin/574481a3fd2c0c5ece7f67166af3b196 to your computer and use it in GitHub Desktop.
Simple AutoHotkey script disables and enables touchpad on Windows 10. Synaptics touchpad driver must be installed. This is targeted at older machines where the driver is installed, but Function key for disabling the touchpad doesn’t work.
;Disable and Enable Synaptics touchpad using Keyboard Shortcut on Windows 10
;CTRL+F9 to enable the Synaptics Touchpad
^F9::
Run C:\Windows\System32\control.exe main.cpl ;Open Mouse Properties
Sleep 1000 ;Wait one second
if WinExist("Mouse Properties") {
WinActivate ;Make Mouse Properties the active Window
Send, ^+{TAB} ;Go to last tab
Send, !E ;Alt+E to enable touchpad
Send, {ENTER} ;Enter to confirm and close window
}
;SHIFT+F9 to disable the Synaptics Touchpad
+F9::
Run C:\Windows\System32\control.exe main.cpl ;Open Mouse Properties
Sleep 1000 ;Wait one second
if WinExist("Mouse Properties") {
WinActivate ;Make Mouse Properties the active Window
Send, ^+{TAB} ;Go to last tab
Send, !D ;Alt+D to disable touchpad
Send, {ENTER} ;Enter to confirm disable
Send, {ENTER} ;Enter to confirm and close window
}
@ygurin
Copy link
Author

ygurin commented Apr 14, 2017

Original post by iDrone at AutoHotkey forum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment