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

win: Work with programs that only look at virtual key or scan code #280

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

pentamassiv
Copy link
Collaborator

@pentamassiv pentamassiv commented Apr 18, 2024

This PR contains two fixes.

  • The language of the current window is taken into account in order to determine the scan code to send
  • We now send the virtual key as well as the scan code in the events. This should enable enigo to work with programs that only look at one of the two options

I don't have a Windows computer and am temporarily unable to test it in a VM. It would be nice if somebody could test it to see if it'll work :)

Fixes #228

@pentamassiv pentamassiv force-pushed the win_respect_lang branch 20 times, most recently from ed4981c to 63e7980 Compare April 19, 2024 10:06
@pentamassiv pentamassiv changed the title win: Respect the language of the current window win: Work with programs that only look at virtual key or scan code Apr 19, 2024
@pentamassiv
Copy link
Collaborator Author

I tested if there were any regressions and did not find any. I did not test with different keymaps/layouts or languages though

@pentamassiv
Copy link
Collaborator Author

When simulating uppercase unicodes, enigo no longer throws an error and just does not simulate anything. That's not good. I need to look into it.

@pentamassiv pentamassiv force-pushed the win_respect_lang branch 3 times, most recently from bfafb70 to 23af09d Compare August 14, 2024 21:29
Some programs seem to only read one of the two options. Fixes enigo-rs#228
@pentamassiv pentamassiv merged commit 6b02c61 into enigo-rs:main Aug 14, 2024
42 of 64 checks passed
@pentamassiv pentamassiv deleted the win_respect_lang branch August 14, 2024 22:20
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

Successfully merging this pull request may close these issues.

In some games, special keys can't be triggered
1 participant