Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Sending keystrokes or keyboard shortcuts #28

Open
jlecour opened this issue Sep 28, 2010 · 1 comment
Open

Sending keystrokes or keyboard shortcuts #28

jlecour opened this issue Sep 28, 2010 · 1 comment

Comments

@jlecour
Copy link

jlecour commented Sep 28, 2010

It could be useful to send some keystrokes to the system (not just the Terminal window). This way one could ask SizeUp to resize/move the windows, …

@devn
Copy link

devn commented Oct 8, 2010

Exactly. I tried doing this myself but am getting errors using appscript.

require 'appscript'
t = Appscript.app('System Events')

window do

key_code 123 is left arrow -- this is a sizeup command I setup

t.key_code( 123, :using => [:option_down, :control_down, :shift_down] )
end

$ terminitor start
=> /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:10:in initialize': undefined method<<' for {}:Hash (NoMethodError)
from (eval):10:in initialize' from /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:33:ininstance_eval'
from /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:33:in `window'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants