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

Duplicate handling of keypress event #2206

Closed
DorpsGek opened this issue Aug 8, 2008 · 3 comments
Closed

Duplicate handling of keypress event #2206

DorpsGek opened this issue Aug 8, 2008 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Aug 8, 2008

St256 opened the ticket and wrote:

When experimenting with the configurable hotkeys patch, I encountered the following problem:

When pressing a key which produces a char, windows generates two messages: WM_KEYPRESS and WM_CHAR. This is handled by ignoring the message WM_KEYPRESS for the keys, which produce a char.

But all keys producing a char also produce a char when SHIFT+the key is pressed. In this case, both messages are handled, resulting in a duplicate call to HandleKeypress. This especially bad when using a SHIFT+Key shortcut (only possible with configurable hotkeys), as the two calls may cancel each other (on every toggle command).

Fixed this by ignoring the shift modifier state in the return condition in WM_KEYPRESS.

Attachments

Reported version: 0.6.2
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/2206
@DorpsGek
Copy link
Member Author

glx wrote:

There's also a duplicate call for AltGr+key combination, like AltGr+E (€).
I tried another way to fix all these problems. It seems to work correctly (for all combinations I tested).
Please try it and tell me if it works (or not) for you.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2206#comment4763

@DorpsGek
Copy link
Member Author

St256 wrote:

My tests did not reveal any problems. I have also tested it with applied configurable hotkeys patch and it did work like expected in this case too.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2206#comment4765

@DorpsGek
Copy link
Member Author

glx closed the ticket.

Reason for closing: Fixed

In r14363.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2206

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant