Class Rubygame::KeyUpEvent
In: lib/rubygame/event.rb
Parent: Rubygame::Event

Indicates that a keyboard key was released.

See KeyDownEvent.

Methods

new  

Attributes

key  [RW] 
mods  [RW] 
string  [RW] 

Public Class methods

[Source]

# File lib/rubygame/event.rb, line 227
                def initialize(key,mods)
                        if key.kind_of? Integer
                                @key = key
                                @string = Rubygame.key2str(key, mods) #a string or nil
                        elsif key.kind_of? String
                                @key = Rubygame::Key::ASCII2KEY[key]
                                if @key != nil
                                        @string = key
                                else
                                        raise(ArgumentError,"First argument of KeyUpEvent.new() must be an Integer KeySym (like K_A) or a ASCII-like String (like \"a\" or \"A\"). Got %s (%s)"%[key,key.class])
                                end
                        end
                        @mods = mods
                end

[Validate]