Introducing the Keystroker gem
Usage
require 'keystroker'
s = '{tab} this is a test {enter} {ctrl+a}'
ks = Keystroker.new
ks.parse_hg0(s)
puts ks.to_kbml pretty: true
Output:
<?xml version='1.0' encoding='UTF-8'?> <kbml> <tab/> <type>this is a test</type> <enter/> <ctrl key='a'/> </kbml>
Resources
- keystroker https://rubygems.org/gems/keystroker
keystroker sendkeys hidg0 gem