I am able to produce the JS keydown and keyup events associated with a
left arrow keystroke (there is no 'keypress' event for this keystroke)
in two ways:
https://skitch.com/itod/rb1bm/left-arrow-key-events
or
https://skitch.com/itod/rb1bt/autotype-a-left-arrow-key
The first should be self-explanatory. the second utilizes an
under-publicized feature of Fake.app where you can produce control key
keystrokes by doing things like:
{{opt}} or {{back}} {{up}}
in a "Set Value of HTML Element" Action
The good news is that both techniques produce the correct JS
keydown/keyup event sequence. the bad news is that neither actually
causes the cursor to move to the left.
Does anyone know if it is possible to actually move the cursor in JS?
window.selection object? maybe?
not sure.... but that's a general JS question, not a fake question. If
it can be done, it should be possible with a "Do JavaScript" Action.
hope that helps.
TD
tell application "System Events"tell application "Fake" to activatekeystroke (key code 123)end tell
This applescript worked for me, but YYMV: