mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
use sendInput not keybd_event
[docs: Note This function has been superseded]
This commit is contained in:
parent
2451b767ae
commit
3291faad53
@ -103,7 +103,17 @@ void win32KeyEvent(int key, MMKeyFlags flags){
|
|||||||
// scan |= 0x80;
|
// scan |= 0x80;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
keybd_event(key, scan, flags, 0);
|
// keybd_event(key, scan, flags, 0);
|
||||||
|
|
||||||
|
INPUT keyInput;
|
||||||
|
|
||||||
|
keyInput.type = INPUT_KEYBOARD;
|
||||||
|
keyInput.ki.wVk = key;
|
||||||
|
keyInput.ki.wScan = scan;
|
||||||
|
keyInput.ki.dwFlags = flags;
|
||||||
|
keyInput.ki.time = 0;
|
||||||
|
keyInput.ki.dwExtraInfo = 0;
|
||||||
|
SendInput(1, &keyInput, sizeof(keyInput));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user