Click here to Skip to main content
6,630,901 members and growing! (20,221 online)
Email Password   helpLost your password?
Languages » C / C++ Language » General     Intermediate

Onscreen Keyboard

By Randy More

An onscreen keyboard for pen computing and touchscreens
VC6, MFC, Dev
Posted:21 Mar 2000
Views:365,043
Bookmarked:80 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
74 votes for this article.
Popularity: 8.50 Rating: 4.55 out of 5
1 vote, 3.8%
1

2

3
7 votes, 26.9%
4
18 votes, 69.2%
5
  • 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


    Member

    Location: United States United States

    Other popular C / C++ Language articles:

    Article Top
    You must Sign In to use this message board.
    FAQ FAQ 
     
    Noise Tolerance  Layout  Per page   
     Msgs 1 to 25 of 81 (Total in Forum: 81) (Refresh)FirstPrevNext
    Questiononscreen keyboard Pinmembersaranshs6:53 24 Oct '09  
    QuestionChording-like Keyboard like Onscreen Keyboard Pinmembermike spano11:33 5 Mar '09  
    Generaldisabled keyboard Pinmemberphantoms3316:42 16 Oct '08  
    QuestionFor Vb.NET 2005 .. 2.0 Pinmemberferozasi5:53 25 Mar '08  
    GeneralTo stop flashing PinmemberVibes19:04 8 May '07  
    GeneralRe: To stop flashing Pinmembercxcui10:28 5 Jun '07  
    GeneralRe: To stop flashing PinmemberMember 364201618:53 30 Jun '09  
    Questionvirtual keyboard using java Pinmember7:47 6 Mar '07  
    QuestionDaniel Pinmemberotaku1923:56 1 Feb '07  
    QuestionI have a problem with the address bar Pinmemberarrodenas11:35 4 Nov '06  
    AnswerRe: I have a problem with the address bar Pinmemberstorein0:57 20 Dec '06  
    GeneralRe: I have a problem with the address bar Pinmemberarrodenas9:33 2 Jan '07  
    GeneralFixed the ESC key Pinmembercfo5ter13:31 5 Sep '06  
    GeneralRe: Fixed the ESC key Pinmemberstorein15:58 17 Dec '06  
    QuestionONSCREEN KEYBOARD Pinmemberraeesa4:47 4 Sep '06  
    GeneralRe: ONSCREEN KEYBOARD Pinmemberbrahmma8:55 9 May '07  
    QuestionCan we change initial size? Pinmemberpeterpecker6:43 10 Mar '06  
    QuestionRe: Can we change initial size? Pinmembergidtitan11:06 21 Mar '07  
    Generala better Onscreen Virtual keyboard PinmemberIlanbm3:11 1 Mar '06  
    GeneralRe: a better Onscreen Virtual keyboard - Link PinmemberIlanbm3:12 1 Mar '06  
    GeneralRe: a better Onscreen Virtual keyboard - Link Pinmemberjmelgaard2:57 17 Jan '07  
    GeneralTentative Enhancement Pinmemberdickch14:19 20 Dec '05  
    QuestionRe: Tentative Enhancement PinmemberJYCiou15:20 5 Mar '06  
    QuestionRe: Tentative Enhancement PinmemberHomero De la Garza9:37 5 Aug '07  
    GeneralRe: Tentative Enhancement Pinmembergidtitan11:07 21 Mar '07  

    General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    PermaLink | Privacy | Terms of Use
    Last Updated: 21 Mar 2000
    Editor: Chris Maunder
    Copyright 2000 by Randy More
    Everything else Copyright © CodeProject, 1999-2009
    Web10 | Advertise on the Code Project