enigo icon indicating copy to clipboard operation
enigo copied to clipboard

something wrong with "arrow key"

Open dbsxdbsx opened this issue 4 years ago • 4 comments

The following code gives result out of expectation in win10.

    // enigo.key_down(Key::Raw(0x27));
    // thread::sleep(Duration::from_secs(1));
    // enigo.key_up(Key::Raw(0x27));
    //
    enigo.key_down(Key::RightArrow);
    thread::sleep(Duration::from_secs(1));
    enigo.key_up(Key::RightArrow);

One guess is that there are missing code for "expanded key data" when keys are "left, right, up and down". The code for these keys is a little different.

dbsxdbsx avatar Jan 31 '20 02:01 dbsxdbsx

Hi and thank you for your issue. What do you mean by

gives result out of expectation

? What are your expectations?

pythoneer avatar Feb 26 '20 18:02 pythoneer

@pythoneer, it would output character like "8" or other characters.

dbsxdbsx avatar Feb 27 '20 08:02 dbsxdbsx

I have this same issue, arrow keys are outputting the following numbers instead of the expected arrow key: down: 2 up: 8 left: 4 right: 6

rukai avatar Mar 23 '20 00:03 rukai

This is caused by the same issue described in #99. I explained how I worked around it there too, but it's not elegant and you need to configure the build to use it on windows only.

mefechoel avatar Nov 22 '20 16:11 mefechoel

Fixed :)

pentamassiv avatar Feb 27 '23 22:02 pentamassiv