Commit Graph

110 Commits

Author SHA1 Message Date
Miroslav Šedivý 1971823a4f auto release keys while meta is held down. 2022-10-15 14:48:39 +02:00
Quentin Dreyer 6784bb312f
chore: sync with W3C documentation
https://www.w3.org/TR/uievents-key/
2020-12-22 10:50:23 +01:00
Pierre Ossman 0cdf2962c0 Fake key releases for some Japanese IM keys
Windows behaves very oddly for some Japanese IM keys in that it won't
send a key release event when the key is released. In some keys it never
sends the event, and in some cases it sends the release as the key is
pressed the subsequent time.
2020-12-10 10:21:21 +01:00
Pierre Ossman 146258291a Send combination keysyms for some Japanese keys
Windows doesn't give us stable symbols for a bunch of Japanese IM keys,
instead alternating between two symbols. This state is not synchronised
with the IM running on the remote server so to have stable behaviour we
have to collapse these multiple symbols in to a single keysym.
2020-12-10 10:00:44 +01:00
Pierre Ossman 3e55d5d71a Fix typo for ZenkakuHankaku key 2020-12-10 09:43:08 +01:00
Pierre Ossman bd1bb2ed75 Use toggle keysym for Eisu key
This matches how the key behaves on a Linux system.
2020-12-10 09:42:19 +01:00
Pierre Ossman dc9da4a042 Merge branch 'noie' of https://github.com/CendioOssman/noVNC 2020-12-07 14:30:05 +01:00
Pierre Ossman 5b5b747494 Remove many small, obsolete, old browser hacks
These are for browsers no longer supported anyway.
2020-12-07 10:10:53 +01:00
Pierre Ossman 60c7518f8c Update keycode mappings to latest version
This update fixes Korean layouts.
2020-11-16 13:44:27 +01:00
Pierre Ossman 1f7e1c7572 Remove keypress handling
We no longer support any browser that requires this legacy handling.
2020-10-15 18:53:51 +02:00
Pierre Ossman dccf6facdc Drop support for legacy Edge 2020-10-15 18:53:51 +02:00
Pierre Ossman c01eb5e74d Drop support for Internet Explorer 2020-10-15 18:53:51 +02:00
Pierre Ossman 20e4f1b3f8 Remove Firefox Alt workaround
The bug got fixed way back in Firefox 63, and it is also misbehaving
with modern Firefox as they no longer consider AltGr an Alt-key.
2020-09-28 11:12:16 +02:00
Pierre Ossman 50cde2faab Move mouse event handling to RFB class
Move the last remaining bits to the RFB class to keep things simple, as
the Mouse class no longer provides any real value.
2020-06-12 14:36:10 +02:00
Pierre Ossman f84bc57bda Move wheel event handling to RFB class
The Mouse class does very little now so it mostly just obfuscate things.
Move everything directly in to the RFB class instead.
2020-06-12 09:18:46 +02:00
Pierre Ossman 4a87038080 Remove very legacy mouse event handling
This is only needed on such ancient versions of Internet Explorer that
it wouldn't satisfy our other requirements anyway.
2020-06-12 09:18:46 +02:00
Pierre Ossman 77c32d164d Remove delayed wheel timer
This isn't really expected behaviour from a user, i.e. that an extremely
small wheel movement still gives a large scroll event in the remote application.
2020-06-12 09:18:46 +02:00
Pierre Ossman 8be924c9d9 Add touch gestures for mouse emulation
Add several single and multitouch gestures to simulate various mouse
actions that would otherwise be impossible to perform.

This replaces the old system where you could select which mouse button
a single touch would generate.
2020-06-12 09:18:46 +02:00
Samuel Mannehed 150596be83 Properly limit mouse moves to once every 17 ms
Previous attempt in c958269 had a number of issues, this is a full
rewrite, complete with improved unit tests.

Fixes github issue #1402
2020-05-31 00:53:15 +02:00
Samuel Mannehed 0f81407c64 Shorten rows to max 80 chars in mouse.js 2020-05-01 20:37:48 +02:00
Samuel Mannehed f477469fb5 Fix wording in comment 2020-05-01 20:37:48 +02:00
Uwe Klatt 44eb1fe59b Limit mouse move events to one every 17 ms 2020-05-01 20:28:33 +02:00
Alex Tanskanen a6304f91d0 Fix missing caps lock events on iOS
Caps Lock on iOS only trigged key release or key press events.
When it's clicked it would only send keydown, and next time
it would only send keyup and so on. It should send both a key press
and a key release.

Also added the unit tests for macOS since those were missing.

Co-Authored-By: Alex Tanskanen <aleta@cendio.se>
2019-11-07 16:44:26 +01:00
Alex Tanskanen 175b843b66 Add "macOS shuffle" to iOS as well
Since iOS functions like macOS with regards to Alt behaving like AltGr,
we need the same workaround on iOS as well.
2019-11-04 14:22:46 +01:00
Pierre Ossman ccb511a527 Handle missing Shift events on Windows
This is a bug in the OS that leaks through to the browsers. We need
to fake a Shift release here to avoid Shift getting stuck in the remote
session.
2019-11-04 10:17:45 +01:00
Pierre Ossman 3388c92c7f Send NumLock on macOS, even though the key is Clear
There is no obvious choice what works best here, but this is what
TigerVNC has been doing for years without complaints. Let's follow
them until we get reports that this doesn't work well.
2019-11-01 13:13:35 +01:00
Pierre Ossman 1096555414 Fix typo for MailSend key 2019-11-01 10:49:19 +01:00
Pierre Ossman ebee9cddbf Update to latest UI Events key specification 2019-11-01 10:25:23 +01:00
Pierre Ossman 5736ea0bd5 Fix AltGr for a few more keys in IE and Edge
Some keys apparently send 'Unidentified' rather than an unshifted value.
Make sure those are also handled. Examples are \ and | on a Swedish
keyboard.
2019-11-01 09:59:02 +01:00
Pierre Ossman 8c51e9a8a2 Revert iOS keyup workaround
It seems Apple has fixed their buggy keyup events, so remove the
workaround and allow keys to be kept pressed again.

This is a revert of 9e99ce126c.
2019-10-31 15:36:40 +01:00
Pierre Ossman 9d956e9198 Handle broken numpad delete key in Chrome 2019-10-31 14:51:36 +01:00
Pierre Ossman dd4341fe67 Explain why Clear maps to KP_Begin 2019-10-31 14:12:58 +01:00
Pierre Ossman 758399050d Try to handle Meta key properly
The standards have unfortunatly caused some confusion between the Windows
key and the original Meta key. Try to handle the common case sanely at least.
2019-10-31 14:12:58 +01:00
Samuel Mannehed 412d93060d Update copyright to 2019 for modified files 2019-09-30 15:35:33 +02:00
Samuel Mannehed d39e0d1244 Clarify comments for broken alt in FF on Windows 2019-09-24 16:00:05 +02:00
Jesper Alf Dam e9f489a629 Avoid recursion in Alt check on Firefox
The Firefox workaround which checks for missing Alt key events may
synthesise new KeyboardEvents. On these events, checkAlt should not be
recursively triggered. Otherwise, we get "too much recursion" errors
whenever the Alt key is pressed.
2019-08-16 16:20:41 +02:00
Juanjo Diaz 9255e0fb47 Remove intermediate variable from mouse 2019-02-16 23:31:58 +02:00
Juanjo Diaz 84a5a2d827 Throw Error instead of String 2018-11-24 19:47:57 +02:00
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Pierre Ossman 3f1cda2e37 Enforce space before code block 2018-09-06 17:29:26 +02:00
Pierre Ossman 426a8c927b Enforce curly braces for control statements 2018-09-06 17:22:40 +02:00
Pierre Ossman 942a312779 Enforce object key spacing 2018-09-06 17:07:11 +02:00
Pierre Ossman 7b536961b2 Enforce indentation 2018-09-06 16:37:38 +02:00
Pierre Ossman a98881151f Enforce brace style 2018-09-06 15:39:26 +02:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Juanjo Diaz 0e4808bf6f Use ES6 classes
Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
2018-07-12 19:06:57 +02:00
Pierre Ossman 1073b60155 Sort vkeys table 2018-07-04 15:53:41 +02:00
Pierre Ossman 8acadd9e97 Merge branch 'fix/ie11-numpad5-compatibility' of https://github.com/vlastoun/noVNC 2018-07-04 15:53:30 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00