Class: EventTap

Inherits:
Object
  • Object
show all
Defined in:
lib/rum/mac/keyboard_hook.rb

Instance Method Summary collapse

Instance Method Details

#handleKeyEvent(event) ⇒ Object



23
24
25
# File 'lib/rum/mac/keyboard_hook.rb', line 23

def handleKeyEvent(event)
  event if @proc.call(event)
end

#on_event(&proc) ⇒ Object



27
28
29
# File 'lib/rum/mac/keyboard_hook.rb', line 27

def on_event(&proc)
  @proc = proc
end