Click here to Skip to main content
11,927,711 members (37,215 online)
Click here to Skip to main content
Add your own
alternative version


101 bookmarked

Onscreen Keyboard

, 21 Mar 2000
Rate this:
Please Sign up or sign in to vote.
An onscreen keyboard for pen computing and touchscreens
  • Download source files - 143 Kb

    Sample Image - OnscreenKeyboard.gif

    I needed a simple onscreen keyboard to interface with a touch / pen based computer that I bought through an online auction. Although Microsoft supplies one with its Pen Extensions 2.0 it only works win Win95 and I wanted to use NT.

    All of the available onscreen keyboards I found were either too expensive, or they were only designed to operate with 3.1 and 9x so (of course) I decided to see if I could make one. Along the way I learned a little about how the keyboard is handled, and the thread keyboard maps.

    Included with this article is a working, but simple, onscreen keyboard. I submitted it mostly as an example of the methods:

    • AttachThreadInput
    • keybd_event
    • VkKeyScan
    • GetKeyState

    This program has one nasty limitation, and that is that it "flashes" since it does not prevent the changing of focus to itself when clicked, and then back to the target window when the keystroke is generated. If someone wants to tackle that one please feel free Wink | ;-)

  • License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    Randy More
    United States United States
    No Biography provided

    You may also be interested in...

    Comments and Discussions

    Generalajka454 Pin
    ajka45426-Jan-14 23:00
    professionalajka45426-Jan-14 23:00 
    Questioncomments Pin
    graceman201217-Aug-12 20:28
    membergraceman201217-Aug-12 20:28 
    Questionsendkey is sometimes failing Pin
    Member 815507614-Aug-12 3:35
    memberMember 815507614-Aug-12 3:35 
    QuestionI need help to port web based G7 onscreen-keypad to Windows Native application. Pin
    Member 815507611-Aug-12 2:16
    memberMember 815507611-Aug-12 2:16 
    QuestionHealth Pin
    kate198321-Feb-12 2:48
    memberkate198321-Feb-12 2:48 
    QuestionGood sample Pin
    BaoSaka27-Jun-11 6:45
    memberBaoSaka27-Jun-11 6:45 
    GeneralMy vote of 5 Pin
    Chandru08021-Jun-11 21:01
    memberChandru08021-Jun-11 21:01 
    Generalcan't run the source code manually Pin
    noordiana21-Oct-10 5:38
    membernoordiana21-Oct-10 5:38 
    GeneralOn Screen Keyboard - Korean Pin
    Member 31486272-Mar-10 9:55
    memberMember 31486272-Mar-10 9:55 
    Questiononscreen keyboard Pin
    saranshs24-Oct-09 6:53
    membersaranshs24-Oct-09 6:53 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.151126.1 | Last Updated 22 Mar 2000
    Article Copyright 2000 by Randy More
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid