-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Pass the scancode in our tunneled DirectKey event #7298
Conversation
actually had a scancode. Our synthetic events actually _didn't_ have scancodes. Not because they couldn't--just because they didn't. Fixes #7297.
@@ -8,7 +8,7 @@ namespace TerminalApp | |||
// If you update this one, please update the one in TerminalControl\TermControl.idl | |||
// If you change this interface, please update the guid. | |||
// If you press F7 or Alt and get a runtime error, go make sure both copies are the same. | |||
[uuid("339e1a87-5315-4da6-96f0-565549b6472b")] interface IDirectKeyListener { | |||
Boolean OnDirectKeyEvent(UInt32 vkey, Boolean down); | |||
[uuid("0ddf4edc-3fda-4dee-97ca-a417ee3dd510")] interface IDirectKeyListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why bump the uuid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're supposed to do this on every change to an existing interface, technically. The interface is really supposed to unique the vtable layout that allows for a conformant class to be called by an unknown caller -- the chief feature of COM 😄
Also because it says it in the rules on line 9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not applicable here but it's good to get in the habit. If somebody had taken a dependency on this interface solely by layout and old UUID, new consumers are no longer compatible with it. If we didn't change the uuid, consumers of the new layout would report as compatible but get the parameter layout wrong (unpacking the first 8 bits of the Boolean as the scancode (!!))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I thought, but I'm glad to have this typed out for posterity 😄
Aww ****. 🙈 Thanks for fixing this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Again thanks for fixing this! It's nice to see that another use of MapVirtualKeyW
is gone. 🙂
@msftbot merge this in 2 minutes |
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
🎉 Handy links: |
🎉 Handy links: |
#7145 introduced a check so that we wouldn't dispatch keys unless they
actually had a scancode. Our synthetic events actually didn't have
scancodes. Not because they couldn't--just because they didn't.
Fixes #7297