Jump to content
Xtreme .Net Talk

How to emulate keyboard press with button (touch screen keyboard)?


Recommended Posts

Posted

OK, I have a touch screen keyboard, but I'd like to emulate keyboard with this buttons.

 

What do I have to call within button_click?

 

tx

 

 

matej

Posted

Send the characted for the button pressed to the textbox:

 

pseudo code

EventHandler for A_button_clicked {
 textbox = textbox + "A"
}

 

HTH

Kejpa

Posted
That would only work for a textbox in your own application' date=' I think his is to be used for other applications as well.[/quote']

This is going to be interesting,

is there a custom keyboard for use with touch screens? How do you call it and how do you use it?

We're using touch screens but we've always provided the keyboard with our applications...

 

/Kejpa

Posted

I dunno if this would help ....

 

the user32.dll has a

keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo )

 

uint key = 44 // integer VK_SNAPSHOT = 44 - > for print screen

 

To generate a key press, you;d say :

keybd_event(key,0,0,0)

 

To generate a key release you;d say:

 

keybd_event(key,0,2,0)

 

A list of all key codes is defined in the winuser.h header

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...