GetKeyState function Null safety user32

int GetKeyState(
  1. int nVirtKey

Retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).

SHORT GetKeyState(
  int nVirtKey


int GetKeyState(int nVirtKey) {
  final _GetKeyState = _user32.lookupFunction<Int16 Function(Int32 nVirtKey),
      int Function(int nVirtKey)>('GetKeyState');
  return _GetKeyState(nVirtKey);