abstract struct SF::Event::KeyEvent

Overview

Keyboard event parameters (see KeyPressed, KeyReleased)

Direct Known Subclasses

Defined in:

window/obj.cr

Constructors

Instance Method Summary

Instance methods inherited from struct SF::Event

initialize initialize

Constructor methods inherited from struct SF::Event

new new

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def alt : Bool #

Is the Alt key pressed?


[View source]
def alt=(alt : Bool) #

[View source]
def code : Keyboard::Key #

Code of the key that has been pressed


[View source]
def code=(code : Keyboard::Key) #

[View source]
def control : Bool #

Is the Control key pressed?


[View source]
def control=(control : Bool) #

[View source]
def dup : KeyEvent #
Description copied from struct Value

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]
def shift : Bool #

Is the Shift key pressed?


[View source]
def shift=(shift : Bool) #

[View source]
def system : Bool #

Is the System key pressed?


[View source]
def system=(system : Bool) #

[View source]