mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
gst-play: Handle KeyDown event instead of KeyUp on Win32 keyboard handler
To handle long press case, KeyDown input should be handled instead of KeyUp. Note that OS will take care of the sensitivity of KeyDown event, so we can safely assume one KeyDown as one input. That will not break user experience.
This commit is contained in:
parent
60d58038df
commit
fd830868bf
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ gst_play_kb_source_cb (Win32KeyHandler * handler)
|
|||
if (PeekConsoleInput (h_input, &buffer, 1, &n) && n == 1) {
|
||||
ReadConsoleInput (h_input, &buffer, 1, &n);
|
||||
|
||||
if (buffer.EventType == KEY_EVENT && !buffer.Event.KeyEvent.bKeyDown) {
|
||||
if (buffer.EventType == KEY_EVENT && buffer.Event.KeyEvent.bKeyDown) {
|
||||
gchar key_val[2] = { 0 };
|
||||
|
||||
switch (buffer.Event.KeyEvent.wVirtualKeyCode) {
|
||||
|
|
Loading…
Reference in a new issue