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)


21
22
23
# File 'lib/reflex/key_event.rb', line 21

def down? ()
  get_type == TYPE_DOWN
end

#inspectObject



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

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

#repeat?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/reflex/key_event.rb', line 29

def repeat? ()
  repeat >= 1
end

#up?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/reflex/key_event.rb', line 25

def up? ()
  get_type == TYPE_UP
end