Sha256: eb20881046133164606b9717afa6924b3ae6ace3ecb14302667e9392411cc576

Contents?: true

Size: 562 Bytes

Versions: 23

Compression:

Stored size: 562 Bytes

Contents

require 'xot/const_symbol_accessor'
require 'reflex/ext'


module Reflex


  class KeyEvent < Event

    alias get_action action

    const_symbol_reader :action, **{
      none: ACTION_NONE,
      down: DOWN,
      up:   UP
    }

    def down?()
      get_action == DOWN
    end

    def up?()
      get_action == UP
    end

    def repeat?()
      repeat >= 1
    end

    def inspect()
      "#<Reflex::KeyEvent action:#{action} chars:'#{chars}' code:#{code} mod:#{modifiers} repeat:#{repeat} captured?:#{captured?}>"
    end

  end# KeyEvent


end# Reflex

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
reflexion-0.2 lib/reflex/key_event.rb
reflexion-0.1.57 lib/reflex/key_event.rb
reflexion-0.1.56 lib/reflex/key_event.rb
reflexion-0.1.55 lib/reflex/key_event.rb
reflexion-0.1.54 lib/reflex/key_event.rb
reflexion-0.1.53 lib/reflex/key_event.rb
reflexion-0.1.52 lib/reflex/key_event.rb
reflexion-0.1.51 lib/reflex/key_event.rb
reflexion-0.1.50 lib/reflex/key_event.rb
reflexion-0.1.49 lib/reflex/key_event.rb
reflexion-0.1.48 lib/reflex/key_event.rb
reflexion-0.1.47 lib/reflex/key_event.rb
reflexion-0.1.46 lib/reflex/key_event.rb
reflexion-0.1.45 lib/reflex/key_event.rb
reflexion-0.1.44 lib/reflex/key_event.rb
reflexion-0.1.43 lib/reflex/key_event.rb
reflexion-0.1.42 lib/reflex/key_event.rb
reflexion-0.1.41 lib/reflex/key_event.rb
reflexion-0.1.40 lib/reflex/key_event.rb
reflexion-0.1.39 lib/reflex/key_event.rb