Documentation
¶
Overview ¶
Package InputEventKey provides methods for working with InputEventKey object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsInputEvent() InputEvent.Instance
- func (self *Extension[T]) AsInputEventFromWindow() InputEventFromWindow.Instance
- func (self *Extension[T]) AsInputEventKey() Instance
- func (self *Extension[T]) AsInputEventWithModifiers() InputEventWithModifiers.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- type ID
- type Instance
- func (self Instance) AsInputEvent() InputEvent.Instance
- func (self Instance) AsInputEventFromWindow() InputEventFromWindow.Instance
- func (self Instance) AsInputEventKey() Instance
- func (self Instance) AsInputEventWithModifiers() InputEventWithModifiers.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsTextKeyLabel() string
- func (self Instance) AsTextKeycode() string
- func (self Instance) AsTextLocation() string
- func (self Instance) AsTextPhysicalKeycode() string
- func (self Instance) GetKeyLabelWithModifiers() Input.Key
- func (self Instance) GetKeycodeWithModifiers() Input.Key
- func (self Instance) GetPhysicalKeycodeWithModifiers() Input.Key
- func (self Instance) ID() ID
- func (self Instance) KeyLabel() Input.Key
- func (self Instance) Keycode() Input.Key
- func (self Instance) Location() Input.KeyLocation
- func (self Instance) PhysicalKeycode() Input.Key
- func (self Instance) SetEcho(value bool)
- func (self Instance) SetKeyLabel(value Input.Key)
- func (self Instance) SetKeycode(value Input.Key)
- func (self Instance) SetLocation(value Input.KeyLocation)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetPhysicalKeycode(value Input.Key)
- func (self Instance) SetPressed(value bool)
- func (self Instance) SetUnicode(value int)
- func (self Instance) Unicode() int
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsInputEvent ¶
func (self *Extension[T]) AsInputEvent() InputEvent.Instance
func (*Extension[T]) AsInputEventFromWindow ¶
func (self *Extension[T]) AsInputEventFromWindow() InputEventFromWindow.Instance
func (*Extension[T]) AsInputEventKey ¶
func (*Extension[T]) AsInputEventWithModifiers ¶
func (self *Extension[T]) AsInputEventWithModifiers() InputEventWithModifiers.Instance
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.InputEventKey
An input event for keys on a keyboard. Supports key presses, key releases and [member echo] events. It can also be received in [method Node._unhandled_key_input]. [b]Note:[/b] Events received from the keyboard usually have all properties set. Event mappings should have only one of the [member keycode], [member physical_keycode] or [member unicode] set. When events are compared, properties are checked in the following priority - [member keycode], [member physical_keycode] and [member unicode]. Events with the first matching value will be considered equal.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsInputEvent ¶
func (self Instance) AsInputEvent() InputEvent.Instance
func (Instance) AsInputEventFromWindow ¶
func (self Instance) AsInputEventFromWindow() InputEventFromWindow.Instance
func (Instance) AsInputEventKey ¶
func (Instance) AsInputEventWithModifiers ¶
func (self Instance) AsInputEventWithModifiers() InputEventWithModifiers.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsTextKeyLabel ¶
Returns a [String] representation of the event's [member key_label] and modifiers.
func (Instance) AsTextKeycode ¶
Returns a [String] representation of the event's [member keycode] and modifiers.
func (Instance) AsTextLocation ¶
Returns a [String] representation of the event's [member location]. This will be a blank string if the event is not specific to a location.
func (Instance) AsTextPhysicalKeycode ¶
Returns a [String] representation of the event's [member physical_keycode] and modifiers.
func (Instance) GetKeyLabelWithModifiers ¶
Returns the localized key label combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_key_label_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
func (Instance) GetKeycodeWithModifiers ¶
Returns the Latin keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
func (Instance) GetPhysicalKeycodeWithModifiers ¶
Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
func (Instance) Location ¶
func (self Instance) Location() Input.KeyLocation
func (Instance) PhysicalKeycode ¶
func (Instance) SetKeyLabel ¶
func (Instance) SetKeycode ¶
func (Instance) SetLocation ¶
func (self Instance) SetLocation(value Input.KeyLocation)