indianakernick / The-Fat-Controller

A library for simulating mouse and keyboard events
Apache License 2.0
38 stars 13 forks source link

unicode_string collapses repeated characters #2

Closed branpk closed 3 years ago

branpk commented 3 years ago

Using 0.5.1 on Windows 10, the following code types abc:

use tfc::{traits::*, Context, Error};

fn main() -> Result<(), Error> {
    let mut ctx = Context::new()?;
    ctx.unicode_string("aabcccc")?;
    Ok(())
}

ascii_string works as expected.

indianakernick commented 3 years ago

I’m not able to reproduce this problem in a Windows 10 VM. Perhaps the application that’s receiving input is doing the collapsing? I used Notepad to test this. Can you provide some more information?


Hold up! I was able to reproduce it in Command Prompt. This is quite odd. I’ll look into it.

indianakernick commented 3 years ago

I've pushed a fix for this. Repeating characters are indeed repeating for me in Notepad and Command Prompt. Can you confirm that this is working on your end?

branpk commented 3 years ago

Yep the fix works for me. Thanks!