Commit Graph

4 Commits

Author SHA1 Message Date
Pierre Ossman 3d7bb02036 Change some attributes to arguments
Some attributes are better suited as arguments, primarily because they
are associated with a specific method and cannot be changed later.
2017-11-09 12:52:05 +01: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 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