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

Send extended scancodes for keys that require them #817

Closed
wants to merge 1 commit into from

Conversation

obafgkmdh
Copy link

Describe your changes. Use imperative present tense.

Set the KEYEVENTF_EXTENDEDKEY flag for keys that map to extended scancodes.

This change applies to the win_sendinput_send_scancodes feature. Currently, the scancode is determined by the MapVirtualKeyA function, which does not output extended scancodes. This causes navigation keys (arrows, Home/End, PgUp/PgDn) to be mapped to the Numpad versions, and completely breaks the functionality of media keys.

I'm not very familiar with Rust, so let me know if there's a better way to address the issue.

Checklist

  • Add documentation to docs/config.adoc
    • Yes or N/A
  • Add example and basic docs to cfg_samples/kanata.kbd
    • Yes or N/A
  • Update error messages
    • Yes or N/A
  • Added tests, or did manual testing
    • Yes

@jtroo
Copy link
Owner

jtroo commented Mar 12, 2024

Thanks for the PR!

@jtroo
Copy link
Owner

jtroo commented Mar 12, 2024

Looking back at the ticket that sparked this experiment, seems there was another proposed solution:

#567 (comment)

I'll look to compare the two when I have some time.

@jtroo
Copy link
Owner

jtroo commented Mar 15, 2024

Thanks for getting me to take a look at this code area again! I've taken the code from the linked ticket as it seemed more complete.

@jtroo jtroo closed this Mar 15, 2024
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.

2 participants