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

     
    Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
    You must Sign In to use this message board.
    Search this forum  
        Spacing  Noise  Layout  Per page   
    Generaldisabled keyboardmemberphantoms3316 Oct '08 - 15:42 
    QuestionFor Vb.NET 2005 .. 2.0memberferozasi25 Mar '08 - 4:53 
    GeneralTo stop flashingmemberVibes8 May '07 - 18:04 
    GeneralRe: To stop flashingmembercxcui5 Jun '07 - 9:28 
    GeneralRe: To stop flashingmemberMember 364201630 Jun '09 - 17:53 
    Questionvirtual keyboard using javamemberMember #37203626 Mar '07 - 6:47 
    AnswerRe: virtual keyboard using javamemberakash214713 Jul '10 - 2:41 
    QuestionDanielmemberotaku191 Feb '07 - 22:56 
    QuestionI have a problem with the address barmemberarrodenas4 Nov '06 - 10:35 
    AnswerRe: I have a problem with the address barmemberstorein19 Dec '06 - 23:57 
    GeneralRe: I have a problem with the address barmemberarrodenas2 Jan '07 - 8:33 
    GeneralFixed the ESC keymembercfo5ter5 Sep '06 - 12:31 
    GeneralRe: Fixed the ESC keymemberstorein17 Dec '06 - 14:58 
    QuestionONSCREEN KEYBOARDmemberraeesa4 Sep '06 - 3:47 
    GeneralRe: ONSCREEN KEYBOARDmemberbrahmma9 May '07 - 7:55 
    QuestionCan we change initial size?memberpeterpecker10 Mar '06 - 5:43 
    QuestionRe: Can we change initial size?membergidtitan21 Mar '07 - 10:06 
    Generala better Onscreen Virtual keyboardmemberIlanbm1 Mar '06 - 2:11 
    GeneralRe: a better Onscreen Virtual keyboard - LinkmemberIlanbm1 Mar '06 - 2:12 
    GeneralRe: a better Onscreen Virtual keyboard - Linkmemberjmelgaard17 Jan '07 - 1:57 
    GeneralTentative Enhancementmemberdickch20 Dec '05 - 13:19 
    QuestionRe: Tentative EnhancementmemberJYCiou5 Mar '06 - 14:20 
    QuestionRe: Tentative EnhancementmemberHomero De la Garza5 Aug '07 - 8:37 
    GeneralRe: Tentative Enhancementmembergidtitan21 Mar '07 - 10:07 
    QuestionJapanese?membermatsnas6 Dec '05 - 22:07 

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

    Permalink | Advertise | Privacy | Mobile
    Web02 | 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