lib/fusuma/plugin/sendkey/keyboard.rb in fusuma-plugin-sendkey-0.5.0 vs lib/fusuma/plugin/sendkey/keyboard.rb in fusuma-plugin-sendkey-0.5.1
- old
+ new
@@ -8,10 +8,11 @@
module Fusuma
module Plugin
module Sendkey
# Emulate Keyboard
class Keyboard
- def initialize(name_pattern: 'keyboard|Keyboard|KEYBOARD')
+ def initialize(name_pattern: nil)
+ name_pattern ||= 'keyboard|Keyboard|KEYBOARD'
device = find_device(name_pattern: name_pattern)
if device.nil?
warn "sendkey: Keyboard: /#{name_pattern}/ is not found"
exit(1)