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

issue: doesn't work with apps that require scancodes, fix within #5

Open
binary1230 opened this issue Jun 15, 2014 · 8 comments
Open

Comments

@binary1230
Copy link

I was trying to use this with ZSNES and it wasn't working. I noticed after playing around with Spy++ that it only worked if you send the scanCode

my fix was: add to NativeMethods:

        [DllImport("user32.dll")]
        public static extern uint MapVirtualKey(uint uCode, uint uMapType);

add to InputBuilder::AddKeyDown() the following at the top:

ushort scanCode = (ushort)Native.NativeMethods.MapVirtualKey((uint)keyCode, 0);

and then below change Scan = 0 to Scan = scanCode

If you want I can submit a patch though it's really simple. However, there may be other places where you need to update it to use the scanCode

@binary1230
Copy link
Author

oh and you have to do it with AddKeyUp()

@michaelnoonan
Copy link
Owner

Thanks for that Dominic. I'll see if I can get an update through soon.

I'll have to check out ZSNES sometime too! ;)

On Mon, Jun 16, 2014 at 8:42 AM, Dominic Cerquetti <notifications@github.com

wrote:

I was trying to use this with ZSNES and it wasn't working. I noticed after
playing around with Spy++ that it only worked if you send the scanCode

my fix was: add to NativeMethods:

    [DllImport("user32.dll")]
    public static extern uint MapVirtualKey(uint uCode, uint uMapType);

add to InputBuilder::AddKeyDown() the following at the top:

ushort scanCode = (ushort)Native.NativeMethods.MapVirtualKey((uint)

and then below change Scan = 0 to Scan = scanCode

If you want I can submit a patch though it's really simple. However, there
may be other places where you need to update it to use the scanCode


Reply to this email directly or view it on GitHub
#5.

@binary1230
Copy link
Author

sweet : )

@Nfactor26
Copy link

I am also facing the same issue with citrix terminal . Key down and key up are not working. I see a pull request by @TChatzigiannakis which seems to address the issue. @michaelnoonan - Could you please look in to that PR #13 and accept the changes?

@RudiHansen
Copy link

Having problems with this also, when it is getting accepted as a change??????

@TChatzigiannakis
Copy link
Collaborator

@RudiHansen You can use my fork where this issue is addressed.

@RudiHansen
Copy link

Thanks @TChatzigiannakis that solved my problem

@dantman
Copy link

dantman commented Nov 24, 2019

I think this was fixed, aside from LMENU #27

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

No branches or pull requests

6 participants