InputEventKey

Input event type for keyboard events.

Stores key presses on the keyboard. Supports key presses, key releases and echo events.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getScancode
long getScancode()
getScancodeWithModifiers
long getScancodeWithModifiers()

Returns the scancode combined with modifier keys such as Shift or Alt. See also InputEventWithModifiers. To get a human-readable representation of the InputEventKey with modifiers, use OS.get_scancode_string(event.get_scancode_with_modifiers()) where event is the InputEventKey.

getUnicode
long getUnicode()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(InputEventKey other)
opEquals
bool opEquals(typeof(null) n)
setEcho
void setEcho(bool echo)
setPressed
void setPressed(bool pressed)
setScancode
void setScancode(long scancode)
setUnicode
void setUnicode(long unicode)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

echo
bool echo [@property getter]
bool echo [@property setter]

If true, the key was already pressed before this event. It means the user is holding the key down.

pressed
bool pressed [@property getter]
bool pressed [@property setter]

If true, the key's state is pressed. If false, the key's state is released.

scancode
long scancode [@property getter]
long scancode [@property setter]

The key scancode, which corresponds to one of the keylist constants. To get a human-readable representation of the InputEventKey, use OS.get_scancode_string(event.scancode) where event is the InputEventKey.

unicode
long unicode [@property getter]
long unicode [@property setter]

The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See OS.setImeActive for more information.

Static functions

_new
InputEventKey _new()

Construct a new instance of InputEventKey. Note: use memnew!InputEventKey instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta