Scripting Keyboard Input

It seems that it’s already implemented. See here