Documentation
¶
Overview ¶
Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as Shift or Alt. See Node.Input.
Note: Modifier keys are considered modifiers only when used in combination with another key. As a result, their corresponding member variables, such as CtrlPressed, will return false if the key is pressed on its own.
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]) AsInputEventWithModifiers() 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) AltPressed() bool
- func (self Instance) AsInputEvent() InputEvent.Instance
- func (self Instance) AsInputEventFromWindow() InputEventFromWindow.Instance
- func (self Instance) AsInputEventWithModifiers() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) CommandOrControlAutoremap() bool
- func (self Instance) CtrlPressed() bool
- func (self Instance) GetModifiersMask() Input.KeyModifierMask
- func (self Instance) ID() ID
- func (self Instance) IsCommandOrControlPressed() bool
- func (self Instance) MetaPressed() bool
- func (self Instance) SetAltPressed(value bool)
- func (self Instance) SetCommandOrControlAutoremap(value bool)
- func (self Instance) SetCtrlPressed(value bool)
- func (self Instance) SetMetaPressed(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetShiftPressed(value bool)
- func (self Instance) ShiftPressed() bool
- 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]) AsInputEventWithModifiers ¶
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.InputEventWithModifiers
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AltPressed ¶
func (Instance) AsInputEvent ¶
func (self Instance) AsInputEvent() InputEvent.Instance
func (Instance) AsInputEventFromWindow ¶
func (self Instance) AsInputEventFromWindow() InputEventFromWindow.Instance
func (Instance) AsInputEventWithModifiers ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CommandOrControlAutoremap ¶
func (Instance) CtrlPressed ¶
func (Instance) GetModifiersMask ¶
func (self Instance) GetModifiersMask() Input.KeyModifierMask
Returns the keycode combination of modifier keys.
func (Instance) IsCommandOrControlPressed ¶
On macOS, returns true if Meta (Cmd) is pressed.
On other platforms, returns true if Ctrl is pressed.