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

fix: scancodes for native ironrdp-client incorrect on MacOS #486

Closed
wants to merge 0 commits into from

Conversation

zmrush
Copy link
Contributor

@zmrush zmrush commented Jul 2, 2024

Fixes #180

@zmrush
Copy link
Contributor Author

zmrush commented Jul 2, 2024

@elmarco @sandeepbansal @CBenoit can u review this pr for bug fix?

@zmrush zmrush changed the title support other hardware,sunch as macos support other hardware,such as macos Jul 2, 2024
@CBenoit CBenoit self-requested a review July 2, 2024 06:26
Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for attempting to fix this!
Unfortunately, using virtual keycodes is not the right approach here.
In this case, the QWERTY layout is assumed, but everything breaks as soon as you use something else.
There are also other shortcomings related to special characters.

Actually, I was working on a fix on this branch: https://github.com/Devolutions/IronRDP/tree/scancode-mapping

In essence, what we need is a big match for mapping Apple scancodes to Windows scancodes.

I needed to look into the extended key flag: bc130ad#diff-8e4e009d60d38d2b1313aabac26f36ddad39d34aecfa700239ea7b88be9cb906R3

This should be relatively straightforward by looking at the input module from FreeRDP WinPR: https://github.com/FreeRDP/FreeRDP/tree/master/winpr/libwinpr/input

Would you be interested into pursuing this?

@CBenoit CBenoit changed the title support other hardware,such as macos fix: scancodes for native ironrdp-client incorrect on MacOS Jul 2, 2024
@thenextman
Copy link
Member

Also to note that even for Windows, you wouldn't use a static map of VKCode to scancode. MapVirtualKey and MapVirtualKeyEx achieve this according to the current keyboard layout.

@zmrush
Copy link
Contributor Author

zmrush commented Jul 11, 2024

@CBenoit i am sorry for reply u so late. I am very interesting for this. And I am working on solving this according to your advice, based on freerdp and I almost finished it. In addition, i am also doing work for file uploading/downloading, and i test a lot, and i think i almost finish it. I expect i will give the pr, next week maybe. thank u so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Scancodes for native ironrdp-client incorrect on MacOS
3 participants