public class Keyboard extends Object
Constructor and Description |
---|
Keyboard()
Creates a new instance.
|
Keyboard(boolean startAtEnd)
Creates a new instance, specifying whether typing should start at the text end or not.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all keys.
|
boolean |
isStartAtEnd()
Returns whether typing should start at the text end or not.
|
void |
press(int keyCode)
Press the specified key code (without releasing it).
|
void |
release(int keyCode)
Releases the specified key code.
|
void |
type(char ch)
Types the specified character.
|
public Keyboard()
public Keyboard(boolean startAtEnd)
startAtEnd
- whether typing should start at the text end or notpublic void type(char ch)
ch
- the characterpublic void press(int keyCode)
An example of predefined values is
KeyboardEvent.DOM_VK_PAGE_DOWN
.
keyCode
- the key codepublic void release(int keyCode)
An example of predefined values is
KeyboardEvent.DOM_VK_PAGE_DOWN
.
keyCode
- the key code.public void clear()
public boolean isStartAtEnd()
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.