Class: Rubygame::Events::KeyReleased

Inherits:
Object
  • Object
show all
Includes:
KeyboardEvent
Defined in:
lib/rubygame/events/keyboard_events.rb

Overview

KeyReleased is an event class which occurs when a key on the keyboard is released (no longer being pressed).

This class gains #key and #modifiers readers from the KeyboardEvent mixin module.

Instance Attribute Summary

Attributes included from KeyboardEvent

#key, #modifiers

Instance Method Summary collapse

Constructor Details

#initialize(key, modifiers = []) ⇒ KeyReleased

Create a new KeyReleased instance.

key

a key symbol for the key that was pressed or released. (Symbol, required)

modifiers

an Array of key symbols for the modifier keys that were active when the event occured. (Array, optional)



125
126
127
# File 'lib/rubygame/events/keyboard_events.rb', line 125

def initialize( key, modifiers=[] )
  super
end