InputPlumberEvent
Inherits: Resource
Properties
| Type | Name | Default |
|---|---|---|
| String | keyboard | |
| InputPlumberMouseEvent | mouse | |
| String | dbus | |
| InputPlumberGamepadEvent | gamepad | |
| InputPlumberTouchpadEvent | touchpad |
Methods
| Returns | Signature |
|---|---|
| InputPlumberEvent | from_capability(capability: String) |
| InputPlumberEvent | from_event(godot_event: InputEvent) |
| InputPlumberEvent | from_dict(dict: Dictionary) |
| Dictionary | to_dict() |
| String | to_joypad_path() |
| String | to_capability() |
| int | set_capability(capability: String) |
| bool | matches(event: InputPlumberEvent) |
| String | get_direction() |
| String | get_joypad_path(cap: String) |
| PackedStringArray | sort_capabilities(caps: PackedStringArray) |
| String | capability_from_keycode(scancode: int) |
| String | virtual_key_from_keycode(scancode: int) |
Property Descriptions
keyboard
String keyboard
Note
There is currently no description for this property. Please help us by contributing one!
mouse
InputPlumberMouseEvent mouse
Note
There is currently no description for this property. Please help us by contributing one!
dbus
String dbus
Note
There is currently no description for this property. Please help us by contributing one!
gamepad
InputPlumberGamepadEvent gamepad
Note
There is currently no description for this property. Please help us by contributing one!
touchpad
InputPlumberTouchpadEvent touchpad
Note
There is currently no description for this property. Please help us by contributing one!
Method Descriptions
from_capability()
InputPlumberEvent from_capability(capability: String)
Create a new InputPlumberEvent from the given capability string
from_event()
InputPlumberEvent from_event(godot_event: InputEvent)
Create a new InputPlumberEvent from the given Godot event
from_dict()
InputPlumberEvent from_dict(dict: Dictionary)
Create a new InputPlumberEvent from the given JSON dictionary
to_dict()
Dictionary to_dict()
Convert the event into a JSON-serializable dictionary
to_joypad_path()
String to_joypad_path()
Returns the controller icon path from the given event
to_capability()
String to_capability()
Returns the capability string of the event. E.g. "Gamepad:Button:South"
set_capability()
int set_capability(capability: String)
Set the event based on the given capability string (e.g. "Gamepad:Button:South") TODO: FINISH THIS!
matches()
bool matches(event: InputPlumberEvent)
Returns true if the given event matches this event capability
get_direction()
String get_direction()
Certain events can have a "direction" specified, such as for joysticks and gyro. This will return the direction if one exists and is supported.
get_joypad_path()
String get_joypad_path(cap: String)
Returns the controller icon path from the given event
sort_capabilities()
PackedStringArray sort_capabilities(caps: PackedStringArray)
Sorts the given string capabilities and returns them sorted
capability_from_keycode()
String capability_from_keycode(scancode: int)
Convert the given key scancode into a capability string
virtual_key_from_keycode()
String virtual_key_from_keycode(scancode: int)
Convert the given key scancode into a target keyboard event string