emulate keyboard

Questions, tips and tricks and techniques for scripting in Servoy

emulate keyboard

Postby Marco R. » Sat Feb 05, 2011 6:44 pm

Hi all,

I need to reproduce a keyboard because I'll run my servoy application on a touchscreen;
At now I have a problem with cursor position; I have to insert the new character into the current cursor position but how can I know this? In fact the user can set the cursor wherever he want!

So my question is: Does exist a way to reproduce the keyboard press and specify what button I want to reproduce? or
Does exist a way to know where is the cursor position (for example at 657 char)?

I know a java Class called "Robot":

Code: Select all
try {
    Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_A);
    robot.keyRelease(KeyEvent.VK_A);
}catch (AWTException e) {   }


Does exist a way in servoy to do the same?

Thanks in advance

Marco
Marco Rossi
Freelance

Main development environment: Servoy 6.1.6 - 7.4.3, Java 1.6u45,7u71 Windows 7/CentOS
Marco R.
 
Posts: 203
Joined: Thu Mar 19, 2009 12:37 pm

Return to Methods

Who is online

Users browsing this forum: No registered users and 13 guests