简体   繁体   中英

Auto Select Key down for key of keyboard

i need help for this cod i want key down for PC after the if in the code like this

if(e.key press==shift) Key down="w"

Example: I press SHIFT + E after that PC press Key down or select it and active my keyboard key like (W)or.... Key

When Shift-E is pressed, we send "W"?

Use SendKeys.Send ?

private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
    if (e.Shift && e.KeyCode==Keys.E)
    {
        SendKeys.Send("W");
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM