Class: Rbindkeys::KeyBind

Inherits:
Object
  • Object
show all
Defined in:
lib/rbindkeys/key_bind.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input, output, opt = {}) ⇒ KeyBind

Returns a new instance of KeyBind.



15
16
17
18
19
# File 'lib/rbindkeys/key_bind.rb', line 15

def initialize input, output, opt = {}
  @input = input
  @output = output
  @input_recovery = opt[:input_recovery]
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



6
7
8
# File 'lib/rbindkeys/key_bind.rb', line 6

def input
  @input
end

#input_recoveryObject (readonly)

when a signal of any input release event was accepted, if @inputs_recovery is true, outputs are released and other inputs are pressed, if @inputs_recovery is false or nil, outputs are released.



13
14
15
# File 'lib/rbindkeys/key_bind.rb', line 13

def input_recovery
  @input_recovery
end

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/rbindkeys/key_bind.rb', line 8

def output
  @output
end