Hi,
Does anyone know if there's a way to change "Touchpad Sensitivity" using Autohotkey? The scale is Low Sensitivity to Most Sensitive.
I found this registry setting. It does change if I go into the Windows Settings and change it, but if I change it manually it doesn't apply the settings for some reason.
REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 0
Ideally, I would like to be able to change it so that when I'm playing a game it switches to most sensitive and then back to medium when I exit game.
Thanks for any help!
Change Touchpad Sensitivity with AHK?
Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
-
- Posts: 8
- Joined: 18 Sep 2022, 19:22
Re: Change Touchpad Sensitivity with AHK?
Post by skyth540 » 31 Dec 2022, 04:10
Moderator note: This post’s content (now in a Spoiler) was generated by an AI engine and can safely be ignored. To the poster who posted it: Consider this another warning to stop posting AI-generated content. Continuing to do so will result in the loss of posting privileges.
Spoiler
Yes, it is possible to change the touchpad sensitivity using AutoHotkey. You can use the following script to set the touchpad sensitivity to the most sensitive setting:
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 0
To switch back to the medium sensitivity setting, you can simply change the value of AAPThreshold to a different value. For example, you could use the following script to set the sensitivity to medium:
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 2
To switch between the two settings based on whether or not you are in a game, you can use the GetWindowText function to check the title of the active window, and use an if statement to determine which sensitivity setting to apply. Here is an example of a script that does this:
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTimer, CheckWindow, 1000
CheckWindow:
WinGetTitle, Title, A
if (Title contains "Game")
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 0
}
else
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 2
}
return
This script will check the title of the active window every second, and if it contains the word "Game", it will set the touchpad sensitivity to the most sensitive setting. Otherwise, it will set the sensitivity to medium.
It is possible that the registry setting you are modifying is not the correct setting for changing the touchpad sensitivity. It is also possible that there may be another program or service that is overwriting the changes you are making to the registry setting.
To troubleshoot this issue, you may want to try the following:
Double-check that you are modifying the correct registry key for touchpad sensitivity. The key you provided in your question, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, is the correct key for modifying the touchpad sensitivity on devices with a precision touchpad. However, if your device does not have a precision touchpad, this key may not be present or may not have the desired effect.
Make sure that you are using the correct data type and value for the registry setting. The data type for the AAPThreshold value should be REG_DWORD, and the value should be an integer representing the sensitivity level. The value 0 corresponds to the most sensitive setting, and higher values correspond to less sensitive settings.
Check for any programs or services that may be overwriting the changes you are making to the registry setting. This could include device drivers, touchpad settings utilities, or other programs that modify touchpad settings. You may need to disable or uninstall these programs in order to make the changes you are making to the registry take effect.
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 0
To switch back to the medium sensitivity setting, you can simply change the value of AAPThreshold to a different value. For example, you could use the following script to set the sensitivity to medium:
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 2
To switch between the two settings based on whether or not you are in a game, you can use the GetWindowText function to check the title of the active window, and use an if statement to determine which sensitivity setting to apply. Here is an example of a script that does this:
Copy code
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTimer, CheckWindow, 1000
CheckWindow:
WinGetTitle, Title, A
if (Title contains "Game")
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 0
}
else
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, AAPThreshold, 2
}
return
This script will check the title of the active window every second, and if it contains the word "Game", it will set the touchpad sensitivity to the most sensitive setting. Otherwise, it will set the sensitivity to medium.
It is possible that the registry setting you are modifying is not the correct setting for changing the touchpad sensitivity. It is also possible that there may be another program or service that is overwriting the changes you are making to the registry setting.
To troubleshoot this issue, you may want to try the following:
Double-check that you are modifying the correct registry key for touchpad sensitivity. The key you provided in your question, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad, is the correct key for modifying the touchpad sensitivity on devices with a precision touchpad. However, if your device does not have a precision touchpad, this key may not be present or may not have the desired effect.
Make sure that you are using the correct data type and value for the registry setting. The data type for the AAPThreshold value should be REG_DWORD, and the value should be an integer representing the sensitivity level. The value 0 corresponds to the most sensitive setting, and higher values correspond to less sensitive settings.
Check for any programs or services that may be overwriting the changes you are making to the registry setting. This could include device drivers, touchpad settings utilities, or other programs that modify touchpad settings. You may need to disable or uninstall these programs in order to make the changes you are making to the registry take effect.
Jump to
- AutoHotkey Foundation
- ↳ About This Community
- ↳ Forum Issues
- AutoHotkey (v2, current version)
- ↳ Ask for Help (v2)
- ↳ Gaming
- ↳ Scripts and Functions (v2)
- ↳ Gaming
- ↳ Tutorials (v2)
- ↳ Tips and Tricks
- ↳ Wish List
- ↳ Suggestions on Documentation Improvements
- ↳ Bug Reports
- ↳ AutoHotkey Development
- ↳ AutoHotkey_H
- ↳ Ask for Help
- ↳ Development
- ↳ Editors
- ↳ Adventure IDE
- ↳ Old Topics
- ↳ AHK Studio
- ↳ Notepad++
- ↳ Pulovers Macro Creator
- ↳ SciTE4AutoHotkey
- ↳ Visual Studio Code
- ↳ Announcements
- ↳ General Discussion
- AutoHotkey (v1.1 and older)
- ↳ Ask for Help (v1)
- ↳ Gaming Help (v1)
- ↳ Scripts and Functions (v1)
- ↳ Gaming Scripts (v1)
- ↳ Tutorials (v1)
- ↳ Tips and Tricks (v1)
- General
- ↳ Other Utilities & Resources
- ↳ Other Programming Languages
- ↳ C/C++
- ↳ ASM
- ↳ C#
- ↳ KeySharp
- ↳ Off-topic Discussion
- ↳ RPA
- Other languages
- ↳ Looking for Volunteers in other languages
- ↳ Deutsch (German)
- ↳ Ich brauche Hilfe
- ↳ Spiele
- ↳ Skripte und Funktionen
- ↳ Tutorials
- ↳ Tooltime
- ↳ Allgemeines
- ↳ 中文 (Chinese)
- ↳ 请求帮助
- ↳ 脚本函数
- ↳ 教程资料
- ↳ 相关工具
- ↳ 其他
- ↳ Español (Spanish)
- ↳ Pedir Ayuda
- ↳ Automatización de Juegos
- ↳ Scripts y Funciones
- ↳ Tutoriales
- ↳ Otras Utilidades y Recursos
- ↳ General
- ↳ Русский (Russian)
- ↳ Помощь
- ↳ Скрипты для Игр
- ↳ Скрипты и библиотеки
- ↳ Статьи и руководства
- ↳ Прочие ресурсы и ПО.
- ↳ Свободное общение
- ↳ Français (French)
- ↳ J'ai besoin d'aide
- ↳ Scripts et Fonctions
- ↳ Tutoriels
- ↳ Autres Utilitaires et Ressources
- ↳ Hors Sujet
- ↳ Português (Portuguese)
- ↳ Ajuda e Suporte Geral
- ↳ Scripts e Funções
- ↳ Tutoriais
- ↳ Outras Ferramentas e Recursos
- ↳ Outros Assuntos
- ↳ 한국어 (Korean)