module CrystGLFW::Event::Modifiers
Overview
The Modifiers module encapsulates the instance variables and interfaces for Events that support modifier keys.
Direct including types
Defined in:
crystglfw/events/modifiers.crInstance Method Summary
-
#alt?
Returns true if the alt key was held down as a modifier.
-
#control?
Returns true if the control key was held down as a modifier.
-
#shift?
Returns true if the shift key was held down as a modifier.
-
#super?
Returns true if the super key was held down as a modifier.
Instance Method Detail
def alt?
#
Returns true if the alt key was held down as a modifier. False otherwise.
window.on_key do |key_event|
puts "The alt key was held down as a modifier." if key_event.alt?
end
def control?
#
Returns true if the control key was held down as a modifier. False otherwise.
window.on_key do |key_event|
puts "The control key was held down as a modifier." if key_event.control?
end
def shift?
#
Returns true if the shift key was held down as a modifier. False otherwise.
window.on_key do |key_event|
puts "The shift key was held down as a modifier." if key_event.shift?
end
def super?
#
Returns true if the super key was held down as a modifier. False otherwise.
window.on_key do |key_event|
puts "The super key was held down as a modifier." if key_event.super?
end