rainforestapp / flashlight-vnc Goto Github PK
View Code? Open in Web Editor NEWRainforest's fork of Flashlight-vnc
Home Page: https://www.rainforestqa.com/
Rainforest's fork of Flashlight-vnc
Home Page: https://www.rainforestqa.com/
Using the following program:
http://delphiforfun.org/programs/utilities/KeyCodes.htm
we can see that a single press of the 'a' key results in the following key events:
OnKeyDown, Key code=255, Control keys=, Key name
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyDown, Key code=65, Control keys=, Key name a
OnkeyPress a
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyup, Key code=64, Control keys=, Key name CTRL
OnKeyup, Key code=255, Control keys=, Key name
'A' results in:
OnKeyDown, Key code=16, Control keys=Shift{Left}, Key name SHIFT
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=65, Control keys=Shift{Left}, Key name A
OnKeyPress A
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=65, Control keys=Shift{Left}, Key name A
OnKeyup, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=16, Control keys=, Key name SHIFT
'3' results in:
OnKeyDown, Key code=255, Control keys=, Key name
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyDown, Key code=51, Control keys=, Key name 3
OnkeyPress 3
OnKeyup, Key code=51, Control keys=, Key name 3
OnKeyup, Key code=17, Control keys=, Key name CTRL
OnKeyup, Key code=255, Control keys=, Key name
'#' results in:
OnKeyDown, Key code=16, Control keys=Shift{Left}, Key name SHIFT
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=51, Control keys=Shift{Left}, Key name 3
OnKeyPress #
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=51, Control keys=Shift{Left}, Key name A
OnKeyup, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=16, Control keys=, Key name SHIFT
With a VM-inside-a-VM, 'a' gives:
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=255, Control keys=Shift{Left}, Key name
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=64, Control keys=Shift{Left}, Key name A
OnKeyPress a
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=65, Control keys=Shift{Left}, Key name A
'3' gives:
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=255, Control keys=Shift{Left}, Key name
OnKeyUp, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyDown, Key code=51, Control keys=Shift{Left}, Key name 3
OnKeyPress 3
OnKeyup, Key code=17, Control keys=Shift{Left}, Key name CTRL
OnKeyup, Key code=65, Control keys=Shift{Left}, Key name 3
Customer: MindBodyGreen
Customer ID: 4939
Expected Behavior: Copy/Pasting values generated by social variables captures values completely when copying and enters value correctly when pasting into VM.
Actual Behavior: Copy/pasting failing to properly capture/enter values in IE9HD; doesn't seem to occur in other IE VMs.
Job Group:
https://admin.rainforestqa.com/job_groups/2542104
I've seen this bug in chrome on OS X. Might affect other browsers as well.
Steps to repro:
from asana
So the problem is isolated to HTML text input in safari, pasting to native text widgets works fine.
Pasting works by sending the keypresses required to type the string, and the solution appears to be to send each character in the string with a greater gap inbetween them. Ghetto.
One of the users used | (symbol from above \ not capital i) in their password and it's not getting sent to VM properly.
Example: http://sharing.rainforestqa.com/3w351J3q3M2X/o
I don't have r/w access here so it's on you @jbarber
The error message when failing to connect to the security policy is not very useful:
An security error occurred (Error #2048). Check your policy-policy server configuration or disable security for this domain
We should change this to tell the user what they should do.
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.
The ctrl key does not work on the client machine. While fixing, this be very careful to not break to copy/pasting feature as this is related to this.
Ctrl-V should still paste the content of the server's clipboard, but other use of the ctrl-key should be sent directly to the client.
Flashlight is sending spurious keypress/key release events. Analysing the protocol using Wireshark we see that typing a word like "dog", which should be six commands:
key press "d" / key release "d" / key press "o" / "key release "o" / key press "g" / key release "g"
is instead rendered as:
key press NULL / key release NULL / key press "d" / key release "d" / key press NULL / key release NULL / key press "o" / key release "o" ... and so on
The NULL is literally a 0x00 byte.
Our main suspicion is that the onTextinput is generating writeKeyEvents for the character 0x00 for some reason.
If fixed, the "Massive ugly hack" a few lines may also (probably) be removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.