Pierre Ossman
b9854a5ca5
Hide display object from RFB callers
2017-10-27 13:58:11 +02:00
Pierre Ossman
458086177c
Let RFB object make sure canvas can have focus
...
Let's set up things properly ourselves instead of forcing everyone
to create their canvas element just like we want it.
2017-10-18 17:01:34 +02:00
Pierre Ossman
4c11755ce7
Merge branch 'focus' of https://github.com/CendioOssman/noVNC
2017-10-18 15:12:46 +02:00
Pierre Ossman
2afda54456
Only grab key events on canvas
...
Give the canvas proper focus handling. This avoids messy logic that
needs to disable and enable event handling when we want to interact
with other UI elements.
It also makes sure we can properly inhibit the browser from triggering
local actions on key presses.
2017-10-18 15:07:17 +02:00
Samuel Mannehed
abfe5b7a37
Wait for challenge before asking for password
...
Fixes #928 .
2017-10-16 15:39:10 +02:00
Samuel Mannehed
cd23036314
Fix missing semicolons
...
Was missing in commit 49a8183757
2017-10-12 12:42:16 +02:00
Samuel Mannehed
4a818a7ddd
Merge pull request #893 from CendioOssman/amt
...
Basic support for Intel AMT
2017-10-05 16:59:53 +02:00
Pierre Ossman
8290d3f271
Merge branch 'optional-port' of https://github.com/bkylerussell/noVNC
2017-09-29 16:26:02 +02:00
Pierre Ossman
5a5f5ada58
Basic support for Intel AMT
...
This restores basic support for Intel AMT servers. They refuse clients
that request more than 16 bits per pixels, so implement a fallback
in just the "Raw" encoding.
2017-09-22 15:17:56 +02:00
Pierre Ossman
cd74793b44
Always hide local cursor initally
...
We don't know if the server will support a client side cursor, so
we have to assume a server side one to start with.
2017-09-22 15:17:56 +02:00
Pierre Ossman
c7c6cb196d
Remove rect arguments onFBUComplete callback
...
This callback is for an entire FBU, so it's not really relevant
to include info about just a single of the included rects.
2017-09-22 15:17:56 +02:00
Pierre Ossman
49a8183757
Clean up encoding handling
...
Allow things to be more explicit and dynamic. Makes it easier to read
and allows us to have more flexible selection of encodings in the future.
2017-09-22 15:17:56 +02:00
Samuel Mannehed
28b004fd70
Combine small mouse wheel events
...
The VNC protocol can't handle different deltas or speeds for a mouse
wheel event. When using a device that sends a lot of small mouse wheel
events, instead of fewer larger steps, the effect was that mouse wheel
scrolling was way to sensitive.
This patch looks at the delta of wheel events and doesn't send events
until the combined delta has passed a threshold. Single events that
doesn't pass the threshold get sent after a timeout in order to not
loose any events.
Fixes #577 .
2017-09-17 18:23:57 +02:00
Samuel Mannehed
c1e2785fb6
Split devices.js into keyboard.js and mouse.js
2017-09-17 18:23:57 +02:00
Pierre Ossman
c338622719
Build encoding stats array dynamically
...
Avoids having to hard code which encodings we might see.
2017-09-07 17:18:25 +02:00
Pierre Ossman
f8ec2df2bb
Add helper for encoding enumeration and names
2017-09-07 17:18:25 +02:00
Pierre Ossman
3e8b26ab58
Remove unused encoding handlers
...
These should never be sent by a server, so we don't need handlers
for them.
2017-09-07 17:18:25 +02:00
Pierre Ossman
bc86b63c24
Remove unused helper for Tight encoding
...
It's already been inlined where used.
2017-09-07 17:18:25 +02:00
Pierre Ossman
910fd3afc9
Fix handling of ExtendedDesktopSize errors
2017-09-07 17:18:25 +02:00
Pierre Ossman
91d5c62589
Merge resize handling to single method
...
It also fits better in the core RFB object rather than as a helper
for the encoding handlers.
2017-09-07 17:18:25 +02:00
Pierre Ossman
1678bf860f
Stop hiding exceptions in WebSock class
...
Let them application decide how to deal with such things and do not
enforce this particular model, which easily hides bugs.
2017-09-07 17:18:25 +02:00
shaneharris
b5c982ea42
fix typscript error - the only one. ( #837 )
...
* fix typscript error TypeScript error: novnc/core/rfb.js(1012,17): Error TS7027: Unreachable code detected.
* Update rfb.js
2017-08-05 02:29:50 +02:00
Pierre Ossman
be70fe0a3d
Only send QEMU Extended Key Event if we have a scan code
...
Servers will assume that a scan code is present if this message type
is used, so fall back to the standard key event message if we don't
know the scan code.
2017-07-07 15:06:13 +02:00
Pierre Ossman
4093c37f28
Ignore compositing key
...
keyCode 229 is commonly used with virtual keyboards when the
system cannot map things to a specific key. As such we should
treat it as 'Unidentified'.
2017-07-07 15:04:44 +02:00
Pierre Ossman
8f8c1803ff
Merge branch 'qemufix' of https://github.com/CendioOssman/noVNC
2017-07-06 13:07:19 +02:00
Pierre Ossman
2bf4cf5a20
try/catch guard for QEMU keyboard test
...
Safari on older iOS doesn't support creating KeyboardEvent objects,
so put a guard in to avoid crashes.
2017-07-06 13:00:00 +02:00
Pierre Ossman
7cac5c8e9f
Fallback for missing keypress events
...
IE and Edge have some corner cases (e.g. Ctrl+key) where we get
insufficient information in the keydown event, and we never get
a keypress event. Try to make a guess of the key in those cases.
2017-07-06 13:00:00 +02:00
Pierre Ossman
7e79dfe425
Track keys using keyIdentifier
...
This is necessary on older iOS where code isn't provided.
2017-07-06 13:00:00 +02:00
Pierre Ossman
e7c4d669f0
Handle iOS special keys
2017-06-21 14:02:24 +02:00
Pierre Ossman
9e99ce126c
Fake key release for iOS hardware keyboards
...
iOS sends decent key down events, but junk key up events when a
hardware keyboard is used. This confuses the key tracking as a
corresponding release is then never detected. To work around this
we'll treat the hardware keyboard like the virtual ones and send
the key release right away.
2017-06-21 13:58:53 +02:00
Pierre Ossman
858ea4a774
Avoid use of 'let' and 'const'
...
They are not supported on older browsers, e.g. iOS 9.
2017-06-02 15:41:37 +02:00
Pierre Ossman
844e983916
Limit use of keypress fallback
...
It was preventing key events for dead keys, so try to reduce it to
only cases where we must use it.
2017-06-02 14:38:16 +02:00
Pierre Ossman
459ed0083f
Allow key events without symbols
...
They can still be useful if the server makes use of the keycode instead.
2017-06-02 14:37:36 +02:00
Pierre Ossman
dfa7826d72
Get XT scan code mappings from the keycodemapdb project
...
This way we can work together with other projects that need this kind
of mapping.
2017-05-31 16:20:24 +02:00
Samuel Mannehed
afb621d577
Add missing semicolon
2017-05-13 01:56:35 +02:00
Samuel Mannehed
333ad45c70
Don't capture touch events
...
They are implicitly captured anyway, and we get problems if we try
to explicitly capture them.
2017-05-11 13:34:43 +02:00
Samuel Mannehed
4f1c81dca9
Stop tracking mouse capture state
...
Was a workaround for other bugs which are now fixed.
2017-05-11 13:30:40 +02:00
Samuel Mannehed
cb568ece8b
Stop grabbing mouse events globally
...
Not necessary anymore since we have proper capture.
2017-05-11 13:27:10 +02:00
Pierre Ossman
26586b9ddf
Remove colour map support
...
It was broken and unused. Remove it so we can simplify the code.
2017-05-04 15:13:33 +02:00
Pierre Ossman
fb7e99e84b
Remove browser engine detection
...
It is out of date and not used anyway.
2017-05-04 14:52:05 +02:00
Pierre Ossman
38170d2442
Merge branch 'png_cursor' of https://github.com/CendioOssman/noVNC
2017-05-04 13:13:02 +02:00
Pierre Ossman
545442afc3
Merge branch 'keyboard' of https://github.com/CendioOssman/noVNC
2017-05-04 12:18:55 +02:00
Pierre Ossman
9782d4a324
Use KeyboardEvent.key too look up keysyms
...
And emulate it on browsers where it is missing or incorrect. This
makes the code more future oriented as it primarily uses the standardised
fields.
2017-05-04 12:13:48 +02:00
Pierre Ossman
634cc1ba46
Handle CapsLock on macOS
...
Modifiers behave a bit oddly on macOS, causing weird CapsLock events
to be sent by the browsers.
2017-05-04 12:13:48 +02:00
Pierre Ossman
bf43c26319
Clean up AltGraph handling
...
It doesn't need to be this general as the issue is mostly about
Windows. Also use the same modifier shuffle that RealVNC and
TigerVNC uses to get macOS working well.
2017-05-04 12:13:48 +02:00
Pierre Ossman
ae82053366
Simplify pressed key handling
...
Prefer avoid having the server simulate multiple key presses by
refusing to use multiple keysyms for the same physical key.
2017-05-04 12:13:47 +02:00
Pierre Ossman
9fce233d51
Simplify handling of keypress
...
Use a dedicated variable to track a two stage key rather than
piggy-backing on the key state array.
2017-05-04 12:13:47 +02:00
Pierre Ossman
f7363fd26d
Move keyboard handling in to Keyboard class
...
Replace the multi stage pipeline system with something simpler.
That level of abstraction is not needed.
2017-05-04 12:13:47 +02:00
Pierre Ossman
9e6f71cb75
Remove modifier synchronisation
...
The fields provided cannot tell us if it is the left or right
version of the key that's pressed, so they are inherently unreliable.
It is also not a huge problem in practice as we'll get in sync on
the next press or release of the modifier.
2017-05-04 12:13:47 +02:00
Pierre Ossman
a784a9cabc
Remove QEMU key event handler
...
The normal event handler provides all the necessary information
now, so it is no longer needed.
2017-05-04 12:13:47 +02:00