User32SetKeyboardState Method
Copies an array of keyboard key states into the calling thread's keyboard input-state table.
This is the same table accessed by the
GetKeyboardState(Byte)
and
GetKeyState(VirtualKeys) functions.
Changes made to this table do not affect keyboard input to any other thread.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static bool SetKeyboardState(
byte[] keyState
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function SetKeyboardState (
keyState As Byte()
) As Boolean
Dim keyState As Byte()
Dim returnValue As Boolean
returnValue = User32.SetKeyboardState(keyState)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static bool SetKeyboardState(
[InAttribute] array<unsigned char>^ keyState
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member SetKeyboardState :
keyState : byte[] -> bool
No code example is currently available or this language may not be supported.
- keyState Byte
-
A pointer to a 256-byte array that contains keyboard key states.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.