Keystroke Escape + x, Is it possible??

I am needing to get System Events to effectively

keystroke “x” using escape down

This appears, however to be impossible, as escape can only be “key coded” as # 53

Can multiple key codes be entered simotaneously, or is there another way to keystroke escape?

Thanks SO much for any help!

That’s right – the esc key is not a modifier, but a key in it’s own right. It’s a bit like trying to press the x and y keys at the same time.

But remapping the key is something entirely different, surely?

Hello.

Good news. I actually managed to simulate an Esc-t keypress with System Events. When Esc is pressed, then the Cocoa Text system, waits a while for the next key, at least in TextInput mode.

This worked for transliting two words, which is bound to Esc-t in my key bindings file:

tell application "TextEdit" to activate
tell application id "sevs"
	key code 53
	keystroke "t"
end tell

Edit

It is an advantage to have a copy of Peter Maurers free Key Codes app.

That did it!!! Thanks so much. I spent nearly two hours yesterday on this and it was starting to feel hopeless.