Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Do pasting properly? #17

Closed
jbarber opened this issue Feb 22, 2016 · 0 comments
Closed

Do pasting properly? #17

jbarber opened this issue Feb 22, 2016 · 0 comments

Comments

@jbarber
Copy link
Member

jbarber commented Feb 22, 2016

The RFB protocol has a ClientCutText verb, which looks like it's a way of sending pasted data.

Unfortunately, it looks like our version of qemu doesn't support ClientCutText(), so it's no use implementing it in the client.

Further wrinkle, the client uses a TextField as the basis of the VNC display, which according to TFM for the PASTE event :

TextField objects do not dispatch clear, copy, cut, paste, or selectAll events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate clear, copy, cut, paste, or selectAll events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus

You can only access the system clipboard via the Paste event:

In Flash Player 10, a paste operation from the clipboard first requires a user event (such as a keyboard shortcut for the Paste command or a mouse click on the Paste command in a context menu). Clipboard.getData() will return the contents of the clipboard only if the InteractiveObject has received and is acting on a paste event. Calling Clipboard.getData() under any other circumstances will be unsuccessful. The same restriction applies in AIR for content outside the application sandbox.

I did try to remove the TextField, and move the event handlers for keyup/down to work, but couldn't then get the app to send key presses or the clipboard.

@jbarber jbarber closed this as completed Mar 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant