Sha256: 76ce591c0ce604675ed550579cfc799334dae1df614647b1a3371c6c60ec487b

Contents?: true

Size: 324 Bytes

Versions: 8

Compression:

Stored size: 324 Bytes

Contents

require "karabiner/key"
require "karabiner/property"

class Karabiner::Remap < Karabiner::Property
  def initialize(from, to)
    tos = [to].flatten

    super(
      "autogen",
      [
        "__KeyToKey__ #{Karabiner::Key.new(from)}",
        *tos.map { |to| Karabiner::Key.new(to) },
      ].join(", "),
    )
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
karabiner-0.4.0 lib/karabiner/remap.rb
karabiner-0.3.1 lib/karabiner/remap.rb
karabiner-0.3.0 lib/karabiner/remap.rb
karabiner-0.2.1 lib/karabiner/remap.rb
karabiner-0.2.0 lib/karabiner/remap.rb
karabiner-0.1.2 lib/karabiner/remap.rb
karabiner-0.1.1 lib/karabiner/remap.rb
karabiner-0.1.0 lib/karabiner/remap.rb