Skip to content

Commit c38631c

Browse files
committed
exchanged deprecated keybd_event with SendInput
1 parent 21cf4a5 commit c38631c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/keypress.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ void win32KeyEvent(int key, MMKeyFlags flags)
102102
scan |= 0x80;
103103
}
104104

105-
keybd_event(key, scan, flags, 0);
105+
INPUT keyboardInput;
106+
keyboardInput.ki.wScan = scan;
107+
keyboardInput.ki.dwFlags = KEYEVENTF_SCANCODE | flags;
108+
SendInput(1, &keyboardInput, sizeof(keyboardInput));
106109
}
107110
#endif
108111

src/screen.c

100755100644
File mode changed.

0 commit comments

Comments
 (0)