Sha256: e2b2ef536bbb4a7215f3b31ff9ab6f5ca476088ae580a2c21f09107e1d15bc13
Contents?: true
Size: 839 Bytes
Versions: 3
Compression:
Stored size: 839 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require_relative '../lib/fusuma/plugin/sendkey/keyboard.rb' require_relative '../lib/fusuma/plugin/sendkey/version.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(name_pattern: nil).search_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 keyboard = Fusuma::Plugin::Sendkey::Keyboard.new keyboard.valid?(param: param) && keyboard.type(param: param)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fusuma-plugin-sendkey-0.5.1 | exe/fusuma-sendkey |
fusuma-plugin-sendkey-0.5.0 | exe/fusuma-sendkey |
fusuma-plugin-sendkey-0.4.0 | exe/fusuma-sendkey |