lib/fusuma/plugin/sendkey/keyboard.rb in fusuma-plugin-sendkey-0.11.1 vs lib/fusuma/plugin/sendkey/keyboard.rb in fusuma-plugin-sendkey-0.12.0

- old
+ new

@@ -32,10 +32,15 @@ d.name.match(/#{name_pattern}/) } end def initialize(name_pattern: nil) - device = Keyboard.find_device(name_pattern: name_pattern) + device = nil + + Array(name_pattern).each do |pattern| + device = Keyboard.find_device(name_pattern: pattern) + break if device + end if device.nil? warn "sendkey: Keyboard: /#{name_pattern}/ is not found" exit(1) end