Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Edições
✅ com suporte IoT Enterprise LTSC
✅ IoT Enterprise
✅ Enterprise LTSC
✅ Enterprise
✅ Education
Remove uma combinação de teclas personalizada, fazendo com que o Filtro de Teclado pare de bloquear a combinação de teclas removida.
Sintaxe
[Static] uint32 Remove(
[In] string CustomKey
);
Parâmetros
CustomKey
[em] A combinação de teclas personalizadas a ser removida.
Valor de retorno
Retorna um valor HRESULT que indica o status do WMI ou um erro de WMI.
Comentários
WEKF_CustomKey. Remover remove um objeto WEKF_CustomKey existente. Se o objeto não existir, WEKF_CustomKey.Remover retornará um erro com o valor 0x8007007B.
Como esse método é estático, você não pode chamá-lo em uma instância de objeto, mas deve chamá-lo no nível da classe.
Exemplo
O código a seguir demonstra como remover uma chave personalizada do Filtro de Teclado para que ela não seja mais bloqueada usando os provedores WMI (Instrumentação de Gerenciamento do Windows) para Filtro de Teclado.
$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"
# Create a handle to the class instance so we can call the static methods
$classCustomKey = [wmiclass]"\\$COMPUTER\${NAMESPACE}:WEKF_CustomKey"
# Create a function to remove a key combination
function Remove-Custom-Key($KeyId) {
# Call the static Remove() method on the class reference
$retval = $classCustomKey.Remove($KeyId)
# Check the return value for status
if ($retval.ReturnValue -eq 0) {
# Custom key combination removed successfully
"Removed ${KeyID}."
} elseif ($retval.ReturnValue -eq 2147942523) {
# No object exists with the specified custom key
"Failed to remove ${KeyID}. No object found."
} else {
# Unknown error, report error code in hexadecimal
"Failed to remove ${KeyID}. Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
}
}
# Example of removing a custom key so that Keyboard Filter stops blocking it
Remove-Custom-Key "Ctrl+Alt+w"
# Example of removing all custom keys that have the Enabled property set to false
$objDisabledCustomKeys = Get-WmiObject -Namespace $NAMESPACE -Class WEKF_CustomKey;
foreach ($objCustomKey in $objDisabledCustomKeys) {
if (!$objCustomKey.Enabled) {
Remove-Custom-Key($objCustomKey.Id);
}
}