|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sikuli.api.robot.desktop.DesktopKeyboard
public class DesktopKeyboard
| Constructor Summary | |
|---|---|
DesktopKeyboard()
|
|
| Method Summary | |
|---|---|
String |
copy()
Clears the clipboard, performs the "copy" keyboard shortcut, then attempts to return the clipboard contents as a String. |
void |
copyRegion(ScreenRegion screenRegion)
Copies the content of a screen region into the clipboard. |
void |
keyDown(int keycode)
press down the key (given by the key code) on the underlying device. |
void |
keyDown(String keys)
Presses down a series of keys specified by the String argument keys. |
void |
keyUp()
Releases all the held down keys. |
void |
keyUp(int keycode)
release the key (given by the key code) on the underlying device. |
void |
keyUp(String keys)
Releases a series of keys specified by the String argument keys. |
void |
paste(String text)
Gets plain text from the clipboard and performs the "paste" keyboard shortcut. |
void |
type(String text)
Performs keyboard typing of the text specified by the arguments of the same name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DesktopKeyboard()
| Method Detail |
|---|
public String copy()
Keyboardnull if the clipboard couldn't be converted to a string or was empty.
copy in interface Keyboardnullpublic void copyRegion(ScreenRegion screenRegion)
Keyboard
copyRegion in interface KeyboardscreenRegion - The screen region to be copiedpublic void paste(String text)
Keyboard
paste in interface Keyboardtext - the text to pastepublic void type(String text)
Keyboard
type in interface Keyboardtext - the keys to typepublic void keyDown(int keycode)
keyDown in interface Keyboardkeycode - Key to press down (e.g. KeyEvent.VK_A)public void keyUp(int keycode)
keyUp in interface Keyboardkeycode - Key to releasepublic void keyDown(String keys)
KeyboardKeyboard.keyUp(String) method.
keyDown in interface Keyboardkeys - the keys to be typed down.public void keyUp()
Keyboard
keyUp in interface Keyboardpublic void keyUp(String keys)
Keyboard
keyUp in interface Keyboardkeys - the keys to release.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||