问题
I have an Windows application treats Windows key events.
The application conveys the Windows Message.
When I hold down the Shift key, WM_KEYDOWN
message occurs repeatedly.
I want to convey just one WM_KEYDOWN
message, even though the Shift key is holding down.
Would you please let me know how to resolve this issue?
回答1:
You can't. Inspect bit 30 of lParam
to see if the message is a transition from up to down, or a repeat of down.
来源:https://stackoverflow.com/questions/9865903/how-to-disable-wm-keydown-repeat-event-for-shift-ctrl-alt-key