C # virtual keyboard

Source: Internet
Author: User

1[DllImport ("user32.dll")]2          Public Static extern voidKeybd_event (byteBVK,byteBscan,UINTDwFlags,UINTdwextrainfo);3 4 5Nativemethods.keybd_event (Bkey,0x45, Nativemethods.keyeventf_extendedkey |0,0);6Nativemethods.keybd_event (Bkey,0x45, Nativemethods.keyeventf_extendedkey | Nativemethods.keyeventf_keyup,0);

Bkey using The ASCII code of the virtual keyboard

Note that the letters are uppercase and lowercase (if you look at the ASCII code of the virtual keyboard, you will find that only uppercase and lowercase ) capitalization issues are given to the CAPS lock and SHIFT keys to handle

The topic of virtual keyboard, focus on the output content of the control focus on the acquisition, so think about the bias, will be more and more complex. Do a good job of triggering the keyboard to press the action, focus is not the tube, the focus depends on the user action

Remember to put the control of the analog button focusable= "False" so that the focus of the simulated keyboard click does not move to the focus on it. You don't have to worry about it.

C # virtual keyboard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.