Keyboard shortcut icon snippet

On Windows platform you can use the Windows Scripting Host’s SendKeys method using Ruby’s WIN32OLE class.

See my example of sending the ESC key to exit editing contexts:

REF: