struct CrystGLFW::Event::WindowChar
- CrystGLFW::Event::WindowChar
- CrystGLFW::Event::Any
- Struct
- Value
- Object
Overview
A WindowCharEvent represents a user-input unicode character along with the modifier keys that were held during its input.
window = CrystGLFW::Window.new
window.on_char do |char_event|
puts char_event.char if char_event.shift? # Prints the char if the shift key is held down.
end
WindowCharEvents are generated by Window#on_char
and are not intended to be
created in any other context. As such, CharEvents should be used when
generated by the callback, but should never be created.