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

robot.CombineKey() is not working #55

Open
manhustbk opened this issue Feb 7, 2024 · 2 comments · May be fixed by #56
Open

robot.CombineKey() is not working #55

manhustbk opened this issue Feb 7, 2024 · 2 comments · May be fixed by #56

Comments

@manhustbk
Copy link

manhustbk commented Feb 7, 2024

Environment

  • I'm coding c#, open nuget packages and
    *I installed Desktop.Robot version 1.5.0
using Desktop.Robot;
using Desktop.Robot.Extensions;

robot.CombineKey(Key.Shift, Key.QuotationMark)

Issue:
*When i'm using robot.CombineKey(Key.Shift, Key.QuotationMark) then it not working.

Expect :
*it will press key "?" but it presses key Z

As i check Desktop.Robot lib then i see that keycode or QuotationMark is 90 same as keycode of Z key is 90.
So could you help me explain? key code of QuotatiinMark is 90. is right?

If the keycode of QuotatiinMark is correct, can you show me how to use the CombineKey function or some way to be able to enter the "?"

@DanDecrypted @lucassklp @susch19 @olivercoad please help me check?

@manhustbk manhustbk reopened this Feb 7, 2024
@olivercoad olivercoad linked a pull request Feb 7, 2024 that will close this issue
@olivercoad
Copy link
Contributor

Hi @manhustbk,

It looks like you're using windows as you mention the keycode 90. I've just made a PR with the fixed keycodes for quotation marks on windows.

If so, CombineKeys is working fine on Windows and this issue is actually about the incorrect keycodes. Can you please rename the issue so that it doesn't get confused with a different issue about CombineKeys on linux?

@manhustbk
Copy link
Author

manhustbk commented Feb 15, 2024

Hi @olivercoad
Sorry i'm late because i just had a Tết holiday.

I'm using on window.
I installed Desktop.Robot version 1.5.0 by nuget from my project on Visual studio
This problem appears in the window. And some other key that have keycode = 90 is same with keycode of Z key.

You can see in Key.cs file (0x5A same 90)
Currently:
[Keycode(Platform = "OSX", Keycode = 0x27)]
[Keycode(Platform = "Windows", Keycode = 0x5A)]
[Keycode(Platform = "Linux", Keycode = 0x0022)]
QuotationMark,

I'm try change Keycode = 0xBF (same 191) of QuotationMark and build project, and copy Desktop.Robot.dll then it is SUCCESSFULLY:
[Keycode(Platform = "OSX", Keycode = 0x27)]
[Keycode(Platform = "Windows", Keycode = 0xBF)]
[Keycode(Platform = "Linux", Keycode = 0x0022)]
QuotationMark,

In addition, some of the following keys have the wrong keycode
Colon, Semicolon, Dot, Slash, Backslash, Percent, LessThan, Equal, GreaterThan, OpenParenthesis, CloseParenthesis, OpenBracket, CloseBracket, OpenBrace, CloseBrace, Interrogation
They all have keycode Keycode = 0x5A like keyboard Z.
Please help me check it

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 a pull request may close this issue.

2 participants