Skip to content

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

Keyboard event parameters (KeyPressed, KeyReleased)

Direct known subclasses

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

Class methods#

.new #

View source

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

#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