Commit Graph

1775 Commits

Author SHA1 Message Date
jalf bf47095944 Keyboard Handling [7/8]: Replace keysym table with optimized version
Regenerate the keysymdef table without -d.

This eliminates keysym names, which are only used for debugging, and shaves ~40kb off the file size
2013-12-05 12:31:50 -05:00
jalf 2ea40fdf9a Keyboard Handling [6/8]: Update everything to include the new keyboard handling scripts 2013-12-05 12:31:48 -05:00
jalf fa30469cda Keyboard Handling [5/8]: Update rfb.js to connect mouse events to keyboard handler
This allows the keyboard handler to check modifier key state much more frequently

Since some browsers never send keyup events for modifier keys, we have to
synchronize modifier state whenever we get a mouse or keyboard event
2013-12-05 12:25:31 -05:00
jalf 9ceef041c6 Keyboard Handling [4/8]: Update input.html to work with new keyboard handling
Plug new keyboard handling into input.js (which breaks everything else), and update input.html to work with this
2013-12-05 12:25:30 -05:00
jalf f00b6fb69a Keyboard Handling [3/8]: Add unit tests for new keyboard handling
Relies on the libraries chai and mocha (available via npm from Node.JS).

Add anything installed via npm to the .gitignore file.
2013-12-05 12:25:30 -05:00
jalf 4ef7566b10 Keyboard Handling [2/8]: Core implementation of new keyboard handling
Add keyboard.js, containing the actual keyboard event parsing code.
2013-12-05 12:25:15 -05:00
jalf ae52883b93 Keyboard Handling [1/8]: Parse keysymdef.h to produce Unicode -> keysym mappings table
Add a node.js-based tool (utils/parse.js) to read keysymdef.h and produce a JavaScript file
mapping Unicode code points to keysyms.

Also add the generated table (include/keysymdef.js).
2013-12-05 12:24:20 -05:00
Solly Ross 1e570156f9 Add support for Outputting Autogenerated Test HTML
This commit introduces two flags, '-g' and '-o' to
the `run_from_console.js`.  Both flags do not run
the tests.  Instead, deal with the autogenerated
HTML.  The former outputs the paths to the autogenerated
HTML temp files, and then pauses the program until Ctrl-C
is pressed (or SIGINT is sent).  The latter outputs the
generated HTML for each files to STDIN with the names
of the tests to which they belong.
2013-12-04 15:44:55 -05:00
Solly e0dc102e5b Merge pull request #322 from DirectXMan12/master
Support Running Mocha Tests from the Console
2013-12-04 11:09:54 -08:00
Solly Ross 2af865923c Support Running Mocha Tests from the Console
Previously, the only way to run the Mocha tests
(in 'test.*.js') is to write a web page to wrap
them (or use a provided one), and then load that
file in a browser.

This commit introduces a series of files to allow
you to run the Mocha tests from the command line
instead.

Normally, Mocha tests can be run from
the command line anyway.  However, since this
project was designed to work in web browsers
and not node, the code doesn't contain the
proper `require` calls, nor does it contain the
proper `module.exports` declarations.  Additionally,
some of the code is dependent on having a browser
environment.

To overcome these issues, a headless browser environment
is used.  The command file introduced in the commit,
`run_from_console.js`, can use one of two environments:
ZombieJS, a pure-javascript headless browser simulator, or
SpookyJS/CasperJS/PhantomJS, an actually WebKit-based
environment.

Because the environment-dependent code is separated
out in to different files ('run_from_console.zombie.js'
and 'run_from_console.casper.js'), the program can be
safely used if only one of the supported environments
is installed.

Additionally, the command will automatically generate
HTML and inject the required tests if there is no
pre-existing HTML file (although you can still use
pre-existing HTML files if you want to).

The required NPM modules for the base program are:

- commander
- ansi
- mocha (must be installed locally for the HTML files to use)
- chai (must be installed locally for the HTML files to use)
- temp

For Zombie, you need:

- zombie
- q

For Casper, you need:

- casperjs (must be installed locally in order to work properly)
- phantomjs
- phantom
- spooky

The command itself can be invoked as

   $ node run_from_console.js -t html_files

or

   $ node run_from_console.js -t js_test_files -i js_required_files

In both cases, the 'files' options should be a comma-separated list of
files.  The first case runs pre-existing HTML files.  The second case
generates HTML files to run the specified Mocha tests, and injects
the requirements specified as well.

Additionally, there are extra arguments that apply to both forms:
'-a' can be used to print all test results, not just the failures,
'-c' may be used to force color to be enabled (when outputting to
a pipe, such as when `less -R` is in use), and '-e' is used to
set the environment.  Use the '-h' or '--help' options to see
a detailed description of all options, and their long-form versions.
2013-12-04 01:08:44 -05: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
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