Class: Karabiner::Remap
Instance Attribute Summary
Attributes inherited from Property
Instance Method Summary collapse
-
#initialize(from, to) ⇒ Remap
constructor
A new instance of Remap.
Methods inherited from Property
Methods included from XmlTree
#add_child, #search_childs, #to_xml
Constructor Details
#initialize(from, to) ⇒ Remap
Returns a new instance of Remap.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/karabiner/remap.rb', line 5 def initialize(from, to) tos = [to].flatten super( "autogen", [ "__KeyToKey__ #{Karabiner::Key.new(from)}", *tos.map { |to| Karabiner::Key.new(to) }, ].join(", "), ) end |