Sha256: ff53eb4c38bfdac54cf2ad5289acd87febb17421441937641bdb8b46f35fe9f6

Contents?: true

Size: 480 Bytes

Versions: 8

Compression:

Stored size: 480 Bytes

Contents

module Fusuma
  # manage actions
  class GestureInfo
    def initialize(finger, direction, action_type)
      @finger      = finger.to_i
      @direction   = direction
      @action_type = action_type
    end
    attr_reader :finger, :direction, :action_type

    def trigger_keyevent
      exec_xdotool(shortcut)
    end

    private

    def exec_xdotool(keys)
      `xdotool key #{keys}` unless keys.nil?
    end

    def shortcut
      Config.shortcut(self)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fusuma-0.3.2 lib/fusuma/gesture_info.rb
fusuma-0.3.1 lib/fusuma/gesture_info.rb
fusuma-0.3.0 lib/fusuma/gesture_info.rb
fusuma-0.2.7 lib/fusuma/gesture_info.rb
fusuma-0.2.6 lib/fusuma/gesture_info.rb
fusuma-0.2.5 lib/fusuma/gesture_info.rb
fusuma-0.2.3 lib/fusuma/gesture_info.rb
fusuma-0.2.2 lib/fusuma/gesture_info.rb