Commit Graph

719 Commits

Author SHA1 Message Date
jalfd 0a087e3d3b Merge 31c02f5fa0 into 75d69b9f62 2013-11-27 02:30:23 -08:00
Joel Martin 75d69b9f62 Fix to relfect new github.io page base URL. 2013-10-29 14:38:24 -05:00
Joel Martin f0d30a90f3 Merge pull request #317 from dosaboy/bugs/add_secure_property_to_token_cookie
Adds 'secure' property to 'token' cookie
2013-10-29 07:19:23 -07:00
Takashi Natsume ad941fadde Adds support for secure attribute on token cookie
This patch adds support for the secure attribute on token
cookies (sent by nova-novncproxy). If the https is used
to transfer the cookie, the secure attribute is set thus
restricting server requestes to secure conections only.
This should prevent man-in-the-middle attacks.
2013-10-29 10:41:51 +00:00
Joel Martin f901d9c9b8 README: add core team and other cleanup.
- Make the ProjectsCompanies-using-noVNC the canonical source for
  companies/project using noVNC and only give a brief summary here.

- Drop the personal Amazon donate/thanks link. Keep the charities and
  ask for a tweet if so.
2013-10-28 16:01:40 -05:00
Jesper Dam 31c02f5fa0 copy actual keyboard code into input.js
Pretty hackish, just copy/pasting everything verbatim from keybard.js and
helper.js into input.js
2013-10-24 11:13:51 +02:00
Jesper Dam 27157e4b84 insert unicode->keysym table into input.js 2013-10-24 11:13:41 +02:00
Jesper Dam f962085bb2 Prepare input.js for new keyboard code
- delete old keyboard handling
- set up calls to the new keyboard code (which is not yet included in the
  file)
2013-10-24 11:13:30 +02:00
Jesper Dam 24a6d8bbf6 Standalone implementation of new keyboard handling
To run unit tests:
$ cd noVNC/tests
$ npm install mocha
$ npm install chai
<open keyboard-tests.html in a browser>

To manually test:
<open keytest.html in a browser>

Design overview:

The big complex browser-dependent keyboard input events are replaced by custom
objects containing only the data we put there. These objects always have a
'keyId' property, which is mainly used to compare events, to determine if
they represent the same key (in order to match keydown/keypress/keyup
events for the same key together), and do not have a 'keysym' property
until we know that the specified keysym should be sent to the VNC server.
(In other words, even if we know which keysym a keypress represents, a
'keysym' property is not added to the object until we also know that the
keysym should be sent as-is to the VNC server.

Modifiers are divided into two groups: char modifiers and shortcut
modifiers. The latter never have an effect in themselves, but an
application may react to them to implement keyboard shortcuts (CTRL-C for
example). The former *may* be used to transform the character they are
combined with, and in those cases, the modifier press itself should not be
sent to the VNC server. For example, AltGr on European keyboards can be
combined with many, but not all, keys, to produce different characters.

The new keyboard handling is effectively a pipeline where each stage
performs a single well-defined transformation to clean up the input and
eliminate browser quirks. It can easily be extended with new stages, but
currently consists of the following:

1. KeyEventDecoder: takes the raw keydown/keyup/keypress event sent by the
browser, and converts it to our custom event wrapper, adding some hints
for later stages. If we get a keydown event, and we can't rely on getting
a subsequent keypress with more accurate information, we also try to
determine the keysym here. Also uses a ModifierSync object to keep track
of the state of modifier keys, and insert fake events to compensate when
the browser forgets to generate modifier key events.

2. VerifyCharModifier: When a char modifier is combined with another key,
we need to know if this creates a new keypress (for example AltGr + 2 on a
DK keyboard yields @), or if it has no effect. This stage handles this by
"stalling" the pipeline in cases where this is uncertain, giving us time
to see if a keypress event is coming.

3. TrackKeyState: since some browsers forget to send keyup events, we need
to keep track of which keys are currently down. This also means we need to
"collapse" keydown and keypress events into one: only one of them should
result in an event sent to the VNC server.

4. EscapeModifiers: when a char modifier is used to generate a character
(say, AltGr creating a @), we need to "undo" the modifier itself while
sending the character - the VNC server should see the sequence
keyup(AltGr), keydown(@), keydown(AltGr), keyup(@).

the commenting!
2013-10-24 11:13:14 +02:00
Joel Martin be09828537 Merge branch 'master' of github.com:kanaka/noVNC 2013-10-11 14:27:12 -05:00
Samuel 142aa4583c Merge pull request #284 from samhed/ctrlalttabesc
Support for extra keys such as Ctrl, Alt, Tab and Esc on mobile devices
2013-10-11 08:21:59 -07:00
samhed f4f72e9db9 Merge branch 'master' of https://github.com/kanaka/noVNC into ctrlalttabesc
Conflicts:
	include/ui.js
	vnc.html
2013-10-11 17:20:49 +02:00
Samuel 69127447ac Merge pull request #282 from samhed/framebufferupdate
Allow higher frame rates by using a new approach for framebufferUpdate requests
2013-10-10 02:45:08 -07:00
samhed 3346f9229b Fix so that parentheses can be written from iOS devices.
* changed the type of the input field (which is used for bringing up the
      on-screen keyboards on touch devices) from email to text
    * when typing in an input field of type email the user is not allowed to
      write parentheses on iOS devices, the keys are disabled.
    * tested on iOS 6, iOS 7 and Android 4.3.
2013-10-09 11:35:43 +02:00
Samuel 270ae2f9f5 Merge pull request #304 from samhed/localcursor
Enables local cursor by default
2013-10-09 01:44:41 -07:00
Samuel 5eed5a4e17 Merge pull request #303 from retr0h/https-first
The https check should come first.
2013-10-09 01:38:55 -07:00
Joel Martin 7c76fd32a1 Merge pull request #308 from samhed/autoconnect
Autoconnect option as URL query
2013-10-04 13:29:24 -07:00
Joel Martin 4c0b680a0b Merge pull request #301 from samhed/chromkeyboard
Fixes the onscreen keyboard in Chrome on Android
2013-10-04 13:17:47 -07:00
samhed f8ddfc732d Autoconnect option as URL query 2013-10-04 17:59:03 +02:00
samhed 9b9e741b8c On touch devices the default should be to use a remote cursor. 2013-09-24 11:19:17 +02:00
samhed 97aefe5f83 Enables local cursor by default. 2013-09-23 11:48:16 +02:00
John Dewey 82744aa8ee Removed trailing white space terds 2013-09-21 12:19:59 -07:00
John Dewey eb955f8c20 The https check should come first
A similar change was made to ui.js in #252.
2013-09-21 12:19:09 -07:00
samhed 968431dd46 Catch input events to make the onscreen keyboard work in chrome on android. 2013-09-17 15:01:52 +02:00
samhed b4a979a07e Added a new file for the key symbols, using the well recognized names for the constants from X11:
* The list is found in /usr/include/X11/keysymdef.h
* I did only include the most common symbols for now..
2013-08-30 15:41:46 +02:00
samhed 04d6a8347f Added variables for the keysums to make the code easier to read. 2013-08-29 17:35:22 +02:00
samhed 76e262134e * Removed fbu-requests from the places I missed earlier.
* Added a few clarifying comments.
2013-08-29 13:38:12 +02:00
Joel Martin 3cb89f5a14 Merge pull request #285 from glance-/rfb_js_fixes
Rfb js fixes
2013-08-26 12:15:55 -07:00
Anton Lundin c39df031d8 clearTimeout instead of clearInterval for timers
We create timeouts, not intervals. Then we need to clear them with
clearTimeout.
2013-08-02 09:58:15 +02:00
Joel Martin 292f6a5da7 Merge pull request #269 from phildriscoll/master
Fix to onMouseDisable
2013-07-31 08:35:02 -07:00
samhed bd88b94393 Switched from using a list to absolute positions to achieve more
consistant behavior across different browsers.
2013-07-25 15:34:16 +02:00
samhed 9d04096e58 Tweaked the media sizing rules to match the new buttons to the left. 2013-07-25 14:05:52 +02:00
samhed 53c01a2353 Added the extra keys Ctrl, Alt, Tab and Esc to the control bar. 2013-07-25 12:49:37 +02:00
samhed 41c66fbfcd Added new images for the extra keys 2013-07-25 12:48:44 +02:00
samhed 7e24f50b66 Merge branch 'master' of https://github.com/kanaka/noVNC into framebufferupdate 2013-07-24 10:55:21 +02:00
Joel Martin f3ff971db9 Merge pull request #272 from samhed/doubleclick
Allow for double taps to trigger double clicks even if the second touch is a slight bit off
2013-07-23 08:45:47 -07:00
Joel Martin 31164434b2 Merge pull request #283 from samhed/nomousedrag
Fixed so that viewportDrag works even if no mouse button is selected.
2013-07-23 08:43:31 -07:00
samhed fb4394b10b Fixed so that viewportDrag works even if no mouse button is selected. 2013-07-23 14:26:11 +02:00
samhed dfcedffc16 Make noVNC follow the RFB protocol and keep only one outstanding
framebufferUpdate request at a time.
2013-07-22 15:46:59 +02:00
samhed df4d6dde30 Merge branch 'master' of https://github.com/kanaka/noVNC into doubleclick 2013-07-19 09:47:47 +02:00
Joel Martin 0e3d505e54 Merge pull request #276 from samhed/screenrealestate
Improved use of screen real estate
2013-07-18 09:58:02 -07:00
Joel Martin df9d3d9cf2 Merge pull request #280 from samhed/documenttitle
Display the desktop name in the document title
2013-07-18 09:52:36 -07:00
samhed 406a8b4e96 Display the desktop name in the document title 2013-07-18 15:51:23 +02:00
samhed 0019d3b055 Added Copyright information to all modified files. 2013-07-17 16:44:13 +02:00
samhed 35b29c98ea * On low resolution devices the status text is now justified to the left
button group instead of centered.
* On low resolution devices the padding towards the edges of the screen of
  the left and right button groups are now removed.
* Since the status_bar was merged into the control-bar the actual status_bar
  element became redundant and was therefor removed.
* Improved the style of the control-bar when there is an error or a warning.
* Implemented a fix so that vnc_auto.html works as intended with the improved
  screen real estate patch.
2013-07-17 16:11:19 +02:00
samhed 6ca8a2c05c Moved the popup_status_panel to the front. 2013-07-12 14:41:57 +02:00
samhed 7ab02c7fc7 Changed the color and weight of the status text to white and bold. 2013-07-12 11:47:41 +02:00
samhed c6ad20992d Improved comments 2013-07-11 12:37:01 +02:00
samhed cf19ad3798 * Changed the trigger distance between touches from 50 to 20.
* The trigger distance now takes devicePixelRatio into account.
2013-07-08 17:14:50 +02:00
samhed a4ec2f5c7d Limited the double click fix to touch devices. 2013-07-03 14:41:09 +02:00