SetKeyboardState function Null safety user32

int SetKeyboardState (
  1. Pointer<Uint8> lpKeyState
)

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 and GetKeyState functions. Changes made to this table do not affect keyboard input to any other thread.

BOOL SetKeyboardState(
  LPBYTE lpKeyState
);

Implementation

int SetKeyboardState(Pointer<Uint8> lpKeyState) {
  final _SetKeyboardState = _user32.lookupFunction<
      Int32 Function(Pointer<Uint8> lpKeyState),
      int Function(Pointer<Uint8> lpKeyState)>('SetKeyboardState');
  return _SetKeyboardState(lpKeyState);
}