Package com.rs.seagull.emulator.api
Interface Keyboard
public interface Keyboard
A Keyboard provides methods for sending keystrokes to a host.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendBytes
(byte[] bytes) Sends "raw" bytes to the host at the current cursor position.void
Sends a key to the host at the current cursor position.void
Sends text to the host at the current cursor position.void
setDebugDelaySendKey
(int delay, TimeUnit units) Set the amount of time to pause before every sendKey call, to assist with simple debugging.void
setDebugDelaySendText
(int delay, TimeUnit units) Set the amount of time to pause before every sendText call, to assist with simple debugging.
-
Method Details
-
sendText
Sends text to the host at the current cursor position.- Parameters:
string
- the text to send to the host.
-
sendKey
Sends a key to the host at the current cursor position. The list of possible keys is inKeys
, specificallyKeys.Ibm5250
,Keys.Ibm3270
, andKeys.AnsiVT
.- Parameters:
key
- the key to send to the host. SeeKeys
.
-
setDebugDelaySendKey
Set the amount of time to pause before every sendKey call, to assist with simple debugging. The delay might be less than requested if the thread is interrupted viaThread.interrupt()
.- Parameters:
delay
- the delayunits
- the unit of the delay
-
setDebugDelaySendText
Set the amount of time to pause before every sendText call, to assist with simple debugging. The delay might be less than requested if the thread is interrupted viaThread.interrupt()
.- Parameters:
delay
- the delayunits
- the unit of the delay
-
sendBytes
void sendBytes(byte[] bytes) Sends "raw" bytes to the host at the current cursor position. Same as getScreen().getKeyboard().sendBytes(bytes). Typically used with VT to send "non standard" byte sequences.- Parameters:
bytes
- the bytes to send to the host.
-