-
Notifications
You must be signed in to change notification settings - Fork 109
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
Help getting certain keys to type via Key::Layout #203
Comments
If it is not working, it is a bug. Can you give me some more information? The library is cross-platform and there are multiple protocols involved. Which OS are you using, which program are you trying to enter the characters into? If you are using Linux, do you know if it is X11 or Wayland? |
I am using a Windows 11 host OS. The rust application is running on the windows side and I am trying to push the output to cool-retro-term running through WSL2. I am running X11 Ubuntu inside WSL2. Almost all the characters work except for the ones I listed above. I realize this is a very unique one off scenario and appreciate any help or guidance. |
Okay, that's a complicated case. The Windows protocols should be the ones relevant here so I guess it is a Windows bug. I have to investigate this. |
A few more questions that would help me find out where exactly the bug is: |
enigo.key_sequence doesn't work at all on my system outside of the keyboard example file which is really odd. If I run my program and open notepad on windows I get the exact same issue. Here is my current code and below that is the input file.
|
I've done a bit more digging and have figure out something. It seems to be related to VK_OEM keys. For example the key [ works just fine, however { does not work unless I tell it to hold shift and enter [. This is VK_OEM_4. Looks like more filtering will need to be added to sort out these keys and pre-apply shift, otherwise nothing comes back. |
Does the error persist for you on the newly released version 0.2.0? |
I think this PR might fix your issue. |
I am trying to use Key::Layout to type each char one after another like a typewriter. However when I feed certain chars into Key::Layout they are not typed and simply skipped over.
let ch = '{';
enigo.key_click(Key::Layout(ch));
This produces an empty output. I need to be able to type the following chars at the minimum {}(). Any ideas on how this can be done?
The text was updated successfully, but these errors were encountered: