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.cr

Instance Method Summary

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

[View source]
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

[View source]
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

[View source]
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

[View source]