Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeating keys #127

Closed
pete1414 opened this issue Apr 25, 2018 · 5 comments
Closed

Repeating keys #127

pete1414 opened this issue Apr 25, 2018 · 5 comments

Comments

@pete1414
Copy link

pete1414 commented Apr 25, 2018

When holding down an alphabet key, multiple key down / key up events are sent. (Undesired action..)

When holding down the "Arrow" keys, key up is not sent until the key is released. (Desired action for all keys.. )

I am using the app "KeyEvent Display" to display key events.

@pete1414
Copy link
Author

Looks like in inputmanager.c 'send_keycode', The key up event is sent immediately after the key down event.

@pete1414
Copy link
Author

I did another test using the android app 'KeyEvent display" with scrcpy and bluetooth keyboard

Scrcopy sends repeated up / down for holding down alpha key.
Bluetooth keyboard sends Single down with incrementing 'repeat' value. Key up is not sent until the key is released.

@pete1414 pete1414 reopened this Apr 25, 2018
@pete1414
Copy link
Author

Sorry seems to be a duplicate of #87 and #109

@rom1v
Copy link
Collaborator

rom1v commented Apr 25, 2018

Thank you for your report and your investigations.

You're right, this is probably the cause of the problem.

However, this is not easy to solve: up and down are related to key events, but text input must be handled via text input events (handle text input).

So either we handle text correctly according to the keyboard layout, either we handle up and down key events for characters keys, but then the layout will not match. I don't know how to get both.

@pete1414
Copy link
Author

Would it be easier to have the user switch between modes? .. ie, press Ctrl G to enter 'game' mode. Press again to use text mode.

rom1v added a commit that referenced this issue Aug 15, 2018
Add a command-line option to enable "raw key events" mode
(-k,--raw-key-events).

This disable text inputs and forwards "text" key events (which are
not forwarded by default).

This is helpful for gaming:
<#87>
<#127>
rom1v added a commit that referenced this issue Aug 15, 2018
Add a command-line option to enable "raw key events" mode
(-k,--raw-key-events).

This disable text inputs and forwards "text" key events (which are
not forwarded by default).

This is helpful for gaming:
<#87>
<#127>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants