Sha256: 574bed3d441498e68528ca2b0b35e89ccabb82572964bfed276e4e74b225a701
Contents?: true
Size: 756 Bytes
Versions: 1
Compression:
Stored size: 756 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require_relative '../lib/fusuma/plugin/sendkey/keyboard.rb' option = {} opt = OptionParser.new opt.on('-l', '--list-keycodes', 'List available keycodes') do |v| option[:list] = v end opt.on('--version', 'Show version') do |v| option[:version] = v end opt.parse!(ARGV) if option[:list] puts Fusuma::Plugin::Sendkey::Keyboard.new.available_codes return end if option[:version] puts Fusuma::Plugin::Sendkey::VERSION return end param = ARGV.first if param.nil? warn 'fusuma-sendkey require 1 arugument' warn 'e.g. fusuma-sendkey LEFTALT+LEFT' exit 1 end Fusuma::Plugin::Sendkey::Keyboard.new.type_command(param: param).tap do |command| exec(command) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fusuma-plugin-sendkey-0.2.0 | exe/fusuma-sendkey |