could someone please tell me the identifier for the @ key?
for example keys.Escape is for the ESC key. i would like to know what it is for @
thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The KeyCode is what you get in KeyDown and KeyUp events. Since this is a shifted character, it depends on the keyboard layout. As far as I know, most keyboards have it above the digit 2, and that means checcking for
e.Shift && e.KeyCode == Keys.D2(WinForms). But onsomemost international keyboards, this will not work.But note that handling the KeyPress event is much more reliable:
e.KeyChar == '@'Edit: I took a quick look at this page, and most international keyboards have the
"over the2key and use Alt-something to get a@.