Performing a keystroke for the user


I am trying to script a button that performs a keystroke for the user. For instance, when the user hits the button, I want to do a “ctrl+a” “ctrl+c” action to automatically copy all of the text on a view. Is there any way to do this?

I suspect that browser security will interfere with this.

There is a javascript API for manipulating the clipboard in the browser, so there’s hope for a future ability to do what you are asking. But it isn’t exposed in Perspective anywhere. Presumably it would be extra methods on the text field and text area components. Something to post on the ideas site.

Actually generating keystrokes would probably never be supported by browsers.