class
Eagle::KeyEvent
- Eagle::KeyEvent
- Eagle::Event
- Reference
- Object
Overview
A keyboard key went down or up. Key repeat sends more presses with #repeat? set.
For typed text, use TextEvent, which handles keyboard layouts and dead keys.
Defined in:
eagle/core/events.crConstructors
-
.new(key : Eagle::Key, pressed : Bool, repeat : Bool = false, mods : Eagle::KeyMod = KeyMod::None)
Creates a key event, for
Eagle.injectand tests.
Instance Method Summary
-
#key : Key
The key, by physical position.
-
#mods : KeyMod
Modifier keys held at the time.
-
#pressed? : Bool
True for a press, false for a release.
-
#released? : Bool
True when the key was released.
-
#repeat? : Bool
True for presses generated by holding the key down.
Instance methods inherited from class Eagle::Event
handled=(handled : Bool)
handled=,
handled? : Bool
handled?
Constructor Detail
def self.new(key : Eagle::Key, pressed : Bool, repeat : Bool = false, mods : Eagle::KeyMod = KeyMod::None)
#
Creates a key event, for Eagle.inject and tests.