lib/karabiner/dsl/item.rb in karabiner-0.1.2 vs lib/karabiner/dsl/item.rb in karabiner-0.2.0

- old
+ new

@@ -1,16 +1,17 @@ +require "karabiner/history" require "karabiner/namespace" require "karabiner/property" require "karabiner/remap" -require "karabiner/invoke_history" +require "karabiner/vkopenurldef" module Karabiner::DSL::Item - AVAILABLE_PROPERTIES = %i( + AVAILABLE_PROPERTIES = %i[ name identifier autogen - ).freeze + ].freeze def remap(target, options = {}) remap = Karabiner::Remap.new(target, options[:to]) add_child(remap) end @@ -19,11 +20,16 @@ property = Karabiner::Property.new("autogen", "__ShowStatusMessage__ #{message}") add_child(property) end def invoke(application) - Karabiner::InvokeHistory.register(application) - "VK_OPEN_URL_APP_#{application.gsub(/ /, '_')}" + Karabiner::History.register_application(application) + Karabiner::Vkopenurldef.application_keycode(application) + end + + def execute(script) + Karabiner::History.register_script(script) + Karabiner::Vkopenurldef.script_keycode(script) end private def method_missing(property, value = '', options = {})