Click here to Skip to main content
Click here to Skip to main content

Onscreen Keyboard

By , 21 Mar 2000
 
  • 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 ;-)

  • 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
    Member
    No Biography provided

    Sign Up to vote   Poor Excellent
    Add a reason or comment to your vote: x
    Votes of 3 or less require a comment

    Comments and Discussions

     
    You must Sign In to use this message board.
    Search this forum  
        Spacing  Noise  Layout  Per page   
    Questioncommentsmembergraceman201217 Aug '12 - 19:28 
    a good keyboard,thanks
    Questionsendkey is sometimes failingmemberMember 815507614 Aug '12 - 2:35 
    I am facing issue that sendkey is sometimes failing.
     
    sendkey is working with notepad and calculator , but not with notepad++ .
    QuestionI need help to port web based G7 onscreen-keypad to Windows Native application. [modified]memberMember 815507611 Aug '12 - 1:16 
    I need help to port web based G7 onscreen-keypad to Windows Native application.
    Kindly email @ vimal@7keypad for same.
    G7 Videos
    K7G7
    7Keypad
    English7

    modified 14 Aug '12 - 8:40.

    QuestionHealthmemberkate198321 Feb '12 - 1:48 
    Many people ask questions about treatment of osteoarthritis, muscle pain. Markelov`s simulator gives an answer to these questions and many of others. Try it, you will not regret!
    QuestionGood samplememberBaoSaka27 Jun '11 - 5:45 
    I like this approach but hard to follow. I have found something similar but used C#. Just use google and search for CCSOFTKEYBOARD. If anyone knows how to change into another language, please let me know too.
    GeneralMy vote of 5memberChandru08021 Jun '11 - 20:01 
    Very Nice article
    Generalcan't run the source code manuallymembernoordiana21 Oct '10 - 4:38 
    i can't run the source code manually. there's an error with it. what should i do?
    GeneralOn Screen Keyboard - KoreanmemberMember 31486272 Mar '10 - 8:55 
    Hi,
    As someone mentioned, changing it to noactivate improves it, but i've got a problem i've not been able to solve.
    Basically, if you try and use Korean keyboard, the IME seems to auto return or end the character collection (IME)
     
    Works for Japanese/Chinese (IME)
    Questiononscreen keyboardmembersaranshs24 Oct '09 - 5:53 
    i am trying to develop an onscreen keybooard..can you help me how to use java and design it??
    also,how backspace will function??
    QuestionChording-like Keyboard like Onscreen Keyboardmembermike spano5 Mar '09 - 10:33 
    I am very interested in building an alternate keyboard single handed mouse/chording keyboard, with an onscreen keyboard. I envision a quarter circle in any corner of the svreen with a spinning dial controled by the chording buttons and 3-4 rows of letters/numbers/characters with other keys selecting which row to use. I can handle the device build, but how hard woukld it be to modify the C++ project provided here or is Java a better approach?
     
    Anyone interested in the coding aspect?
     
    Thanks Mike

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

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