Open in the explorer

Prevent press and hold

Empêcher de maintenir un bouton enfoncé

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Windows Components › Tablet PC › Hardware Buttons FR: Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Tablet PC › Boutons du Tablet PC
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
TabletShell.admx
Internal name
TabletShell/PreventPressAndHold_1

Explanation

Prevents press and hold actions on hardware buttons, so that only one action is available per button.

If you enable this policy, press and hold actions are unavailable, and the button configuration dialog will display the following text: "Some settings are controlled by Group Policy. If a setting is unavailable, contact your system administrator."

If you disable this policy, press and hold actions for buttons will be available.

If you do not configure this policy, press and hold actions will be available.

French text from Windows 11 26H2

Empêche les actions consistant à appuyer sur des boutons du Tablet PC et à les maintenir enfoncés, afin qu'il n'y ait qu'une seule action possible par bouton.

Si vous activez cette stratégie, les actions consistant à maintenir un bouton enfoncé ne sont pas disponibles ; par ailleurs, la boîte de dialogue de configuration des boutons affiche le message suivant : « Certains paramètres sont contrôlés par la stratégie de groupe. Si un paramètre n'est pas disponible, contactez votre administrateur système. »

Si vous désactivez cette stratégie, les actions consistant à maintenir un bouton enfoncé sont disponibles.

Si vous ne configurez pas cette stratégie, les actions consistant à maintenir un bouton enfoncé sont disponibles.

Registry

HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\TabletPC
Value name
PreventButtonPressAndHold
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: TabletShell/PreventPressAndHold_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\TabletPC'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventButtonPressAndHold' -Value 1 -Type DWord

Disable

# Disable: TabletShell/PreventPressAndHold_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\TabletPC'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventButtonPressAndHold' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": TabletShell/PreventPressAndHold_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\TabletPC'
Remove-ItemProperty -Path $k -Name 'PreventButtonPressAndHold' -ErrorAction SilentlyContinue

Availability