Package net.storm.api.input
Interface IKeyboard
public interface IKeyboard
Provides keyboard input simulation functionality.
This interface allows sending keyboard input to the game client, including typing characters, strings, numbers, and special keys. Input is dispatched as AWT KeyEvents to the game canvas.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidSends the Enter key press.default voidSends the Space key press.voidtype(char c) Types a single character.default voidtype(int number) Types a number as a string.default voidTypes a string of text without pressing Enter.default voidTypes a string of text with optional Enter key at the end.
-
Method Details
-
type
void type(char c) Types a single character.This dispatches KEY_PRESSED, KEY_TYPED, and KEY_RELEASED events to simulate a complete key press cycle.
- Parameters:
c- the character to type
-
type
Types a string of text with optional Enter key at the end.- Parameters:
text- the text to typesendEnter- true to press Enter after typing the text
-
type
default void type(int number) Types a number as a string.The number is converted to a string and each digit is typed individually.
- Parameters:
number- the number to type
-
type
Types a string of text without pressing Enter.- Parameters:
text- the text to type
-
sendEnter
default void sendEnter()Sends the Enter key press.Useful for confirming dialog inputs or chat messages.
-
sendSpace
default void sendSpace()Sends the Space key press.Useful for continuing dialogues or other space-activated actions.
-