Skip to content

abstract struct SF::Event::KeyEvent
inherits SF::Event #

Keyboard event parameters (see KeyPressed, KeyReleased)

Direct known subclasses

SF::Event::KeyPressed SF::Event::KeyReleased

Constructors#

Methods#

#alt : Bool#

Is the Alt key pressed?

View source

#alt=(alt : Bool)#

View source

#code : Keyboard::Key#

Code of the key that has been pressed

View source

#code=(code : Keyboard::Key)#

View source

#control : Bool#

Is the Control key pressed?

View source

#control=(control : Bool)#

View source

#dup : KeyEvent#

Returns a shallow copy of this object.

Because Value is a value type, this method returns self, which already involves a shallow copy of this object because value types are passed by value.

View source

#scancode : Keyboard::Scan::Scancode#

Physical code of the key that has been pressed

View source

#scancode=(scancode : Keyboard::Scan::Scancode)#

View source

#shift : Bool#

Is the Shift key pressed?

View source

#shift=(shift : Bool)#

View source

#system : Bool#

Is the System key pressed?

View source

#system=(system : Bool)#

View source