[MacRuby] #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky
#1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- {{{ framework 'Foundation' framework 'ScriptingBridge' system = SBApplication.applicationWithBundleIdentifier("com.apple.SystemEvents") system.send(:"keystroke:using:", "t", 0) # `t` is typed as keystroke # system.send(:"keyCode:using:", 17, 0) # `t` is typed as keyCode # unicode for t is 0074, ascii for t is 116 system.performSelector(:'keyCode:using:', keyCode:17, using:0) # Completely random! }}} What's going on here guys? -- Ticket URL: <http://www.macruby.org/trac/ticket/1315> MacRuby <http://macruby.org/>
#1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- Comment(by mrada@…): Simulated keyboard events use the virtual keycodes that Apple has defined; the listing is in /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h This is not a MacRuby issue; though I think it would be a good idea to log a bug with Apple about the virtual keycode system. :) -- Ticket URL: <http://www.macruby.org/trac/ticket/1315#comment:1> MacRuby <http://macruby.org/>
#1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- Comment(by rob@…): @mrada: Sir, you are awesome. Thanks! This issue should be closed. -- Ticket URL: <http://www.macruby.org/trac/ticket/1315#comment:2> MacRuby <http://macruby.org/>
#1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky ---------------------------------------+------------------------------------ Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: Component: MacRuby | Resolution: invalid Keywords: ScriptingBridge, keycodes | ---------------------------------------+------------------------------------ Changes (by eloy.de.enige@…): * status: new => closed * resolution: => invalid -- Ticket URL: <http://www.macruby.org/trac/ticket/1315#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby