class Fusuma::Plugin::Sendkey::Device
handle Evdev device
Public Class Methods
new(path:)
click to toggle source
# File lib/fusuma/plugin/sendkey/device.rb, line 8 def initialize(path:) @evdev = Revdev::EventDevice.new(path) end
Public Instance Methods
path()
click to toggle source
# File lib/fusuma/plugin/sendkey/device.rb, line 12 def path raise 'Device path is not found' if @evdev.nil? @path ||= @evdev.file.path end
write_event(event)
click to toggle source
# File lib/fusuma/plugin/sendkey/device.rb, line 18 def write_event(event) @evdev.write_input_event(event) end