Commit Graph

14 Commits

Author SHA1 Message Date
Pierre Ossman 0a865e15ff Remove character substitution
We can handle any Unicode codepoint now, so stop replacing symbols.
2017-03-24 11:35:36 +01:00
Pierre Ossman 278a5e7fbd Simplify keysymdef.js
Some Unicode to Keysym mappings can be computed and can therefore
be left out of the huge lookup table.
2017-03-24 11:31:38 +01:00
Pierre Ossman 524d67f283 Remove keysym names from keysymdef.js
They were incomplete and turned off in most cases so they served
little use besides adding complexity.
2017-03-24 11:16:53 +01:00
Solly Ross dfae3209eb Update tests to work with new structure
This updates the tests to work with the new structure, and removes the
old `utils/run_from_console.js` files in favor of just using Karma
directly.  The Karma debug page now displays the normal mocha HTML, so
we can use that instead of the HTML generation functionality of the old
test runner.

Note that PhantomJS does not work at the moment (PhantomJS 1.5 should
make it possible to test on PhantomJS again).
2017-03-21 17:39:07 -04:00
Samuel Mannehed 80b7dde665 Comment out skipped test
Forgot to comment out the code in commit
331ae15317
2016-11-10 14:28:40 +01:00
Samuel Mannehed 331ae15317 Skip keysyms.fromUnicode UCS-4 test
The browser requirements are too high for codePointAt at the moment
2016-11-10 14:02:22 +01:00
Samuel Mannehed e9ddbec5b1 Fix keysyms.fromUnicode() tests
Node.js doesn't handle characters high up in the unicode range
properly with charCodeAt(). Adding a new test for UCS-4 codepoints
using codePointAt() to cover this.
2016-11-10 11:57:45 +01:00
Pierre Ossman 115eedf69c Use Unicode keysym range as fallback
Not all Unicode codepoints have an equivalent named Keysym. But
there is a range in the Keysym namespace that can be used to map
any codepoint to.
2016-10-15 14:58:55 +02:00
Solly Ross bd5340c7ee Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00
Solly Ross 31f169e86f Cleanup: Keyboard code
File: keyboard.js
Tests Added: False (already present)
Changes:
- Fixed JSHint Errors
- Moved functions outside loops
- Added proper include directives to tests
2014-09-15 16:46:02 -04:00
Jesper Dam f6a1d98a3a Fix issue #326: correct handling of shift key
When shortcut modifiers (modifier keys such as CTRL, which do not participate in
composing character input) are pressed, we try to suppress the keypress
event, as browsers do not reliably generate it. This means that
subsequent key events are decoded only based on the keydown event.

Due to a type error (comparing a string to a number), shift was
mistakenly treated as a shortcut modifier, preventing text input which
relied on shift, such as _ and %, from being generated.
2014-01-06 13:59:25 +01:00
jalf 466a09f0f3 Keyboard Handling [8/8]: Introduce substituteCodepoint() to replace code points which don't have a keysym with ones that do
For now, the only code points this is done for are {s, S, t, T} with comma below (used in Romanian),
 which are replaced by {s, S, t, T} Cedilla.
2013-12-05 12:31:50 -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