Prevent press and hold
Empêcher de maintenir un bouton enfoncé
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.
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
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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 DWordDisable
# 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 DWordRevert to "Not configured"
# Revert to "Not configured": TabletShell/PreventPressAndHold_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\TabletPC'
Remove-ItemProperty -Path $k -Name 'PreventButtonPressAndHold' -ErrorAction SilentlyContinue