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

Special characters are not working with ShiftKey #295

Closed
antonydevadoss opened this issue Jun 5, 2024 · 2 comments
Closed

Special characters are not working with ShiftKey #295

antonydevadoss opened this issue Jun 5, 2024 · 2 comments

Comments

@antonydevadoss
Copy link

antonydevadoss commented Jun 5, 2024

Describe the bug
Special Characters are not typed by using shift key

To Reproduce

use std::thread;
use std::time::Duration;
use enigo::*;

fn main() {
    let text = "hello12345";
    let mut enigo = Enigo::new();
    for (_, letter) in text.chars().enumerate() {
        enigo.key_down(Key::Shift);
        enigo.key_click(Key::Layout(letter));
        enigo.key_up(Key::Shift);
        thread::sleep(Duration::from_millis(100));
    }
}

Expected behavior
The letters HELLLO!@#$% should be typed. But actually, it types "HELLO12345"

Environment (please complete the following information):

  • OS: macOs
  • Rust: rustc 1.78.0 (9b00956e5 2024-04-29)
  • Library Version: enigo 0.0.14

Additional context
I want to simulate all keyboard inputs (special characters, capital letters) with Shift key. Could you please help on this issue?

@pentamassiv
Copy link
Collaborator

Thank you for letting me know. I have to investigate this issue. It will probably take some more time :/

What do you need to do this for? Maybe we can think of a workaround while I investigate it?

@pentamassiv pentamassiv added the macOS macOS specific label Sep 10, 2024
@pentamassiv
Copy link
Collaborator

This is the same issue as #307. Even though this issue was opened before 307, I am closing this one because it is based on an old version of enigo. The issue is still present in recent versions though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants