Class: Reflex::KeyEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/reflex/key_event.rb

Instance Method Summary collapse

Instance Method Details

#down?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/reflex/key_event.rb', line 32

def down?()
  get_action == DOWN
end

#inspectObject



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/reflex/key_event.rb', line 44

def inspect()
  "#<Reflex::KeyEvent action:%s chars:%s key:%s code:0x%X mod:%s repeat:%d captured?:%s>" % [
    action,
    chars ? "'#{chars}'" : :nil,
    key ? key : :nil,
    code,
    modifiers.join(','),
    repeat,
    captured?
  ]
end

#repeat?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/reflex/key_event.rb', line 40

def repeat?()
  repeat >= 1
end

#up?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/reflex/key_event.rb', line 36

def up?()
  get_action == UP
end