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

I can't figure out how to send 2 keys at once (shift+home) #5

Open
bbigras opened this issue Sep 3, 2022 · 1 comment
Open

I can't figure out how to send 2 keys at once (shift+home) #5

bbigras opened this issue Sep 3, 2022 · 1 comment

Comments

@bbigras
Copy link

bbigras commented Sep 3, 2022

When I do:

ctx.key_down(tfc::Key::Shift)?;
ctx.key_click(tfc::Key::Home)?;
ctx.key_up(tfc::Key::Shift)?;

It seems I only get the "home" key:

Peek.03-09-2022.07-49.mp4
@indianakernick
Copy link
Owner

Hi there. Apologies for the delay. I spent some time on this today. I was able to reproduce the problem but I wasn't able to solve it. This is what I found.

  • The home key works
  • The shift key works when combined with alphabet keys
  • Other modifier pairs work such as control+A
  • Combining shift and home doesn't work

So yeah, that's not very useful. I tried switching between virtual key codes and scan codes. I tried introducing a delay. I tried packing all of the keystrokes into a single call to SentInput. Nothing seemed to work. I'm not sure what to do about this.

I'm certainly not an expert in this stuff. Not in the Windows API or Windows in general. For me, Windows is the thing I use to open Steam! So if you're able to find anything on this then please don't hesitate to share it here.

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

2 participants