Class: Pixo::Rpc::OnKey

Inherits:
Object
  • Object
show all
Defined in:
lib/pixo/rpc/request_types.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, scancode, action, mods) ⇒ OnKey

Returns a new instance of OnKey.



4
5
6
7
8
9
# File 'lib/pixo/rpc/request_types.rb', line 4

def initialize(key, scancode, action, mods)
  @key = key
  @scancode = scancode
  @action = action
  @mods = mods
end

Instance Method Details

#call(service) ⇒ Object



11
12
13
14
# File 'lib/pixo/rpc/request_types.rb', line 11

def call(service)
  Thread.new { service.on_key(@key, @scancode, @action, @mods) }
  self
end