skrypton-api / com.waicool20.skrypton.jni.objects / SKryptonKeyEvent / <init>

<init>

SKryptonKeyEvent(type: KeyEventType, key: Key, modifiers: KeyboardModifiers = KeyboardModifiers.NoModifier, autoRepeat: Boolean = false, count: Int = 1)

This constructor takes a Key and other parameters and constructs a SKryptonKeyEvent.

Parameters

type - Type of key event.

key - Key that was pressed in the event.

modifiers - Modifiers that were involved in the event.

autoRepeat - Whether the event was auto repeating (Long press of the key).

count - Number of times the event repeated.

SKryptonKeyEvent(type: KeyEventType, char: Char, modifiers: KeyboardModifiers = KeyboardModifiers.NoModifier, autoRepeat: Boolean = false, count: Int = 1)

This constructor takes a Char and other parameters and constructs a SKryptonKeyEvent.

Parameters

type - Type of key event.

char - Character that was typed in the event.

modifiers - Modifiers that were involved in the event.

autoRepeat - Whether the event was auto repeating (Long press of the key).

count - Number of times the event repeated.

SKryptonKeyEvent(type: KeyEventType, char: String, modifiers: KeyboardModifiers = KeyboardModifiers.NoModifier, autoRepeat: Boolean = false, count: Int = 1)

Same as Char constructor except that it accepts a single character String.

Parameters

type - Type of key event.

char - String that was typed in the event.

modifiers - Modifiers that were involved in the event.

autoRepeat - Whether the event was auto repeating (Long press of the key).

count - Number of times the event repeated.

Exceptions

IllegalArgumentException - If char is not a single character.