From 121875621d72188d5ab5535fdcd901baba28ea05 Mon Sep 17 00:00:00 2001 From: jalf Date: Wed, 27 Nov 2013 15:20:08 +0100 Subject: [PATCH] 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 --- include/rfb.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/rfb.js b/include/rfb.js index d9137370..57a42d6f 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -223,7 +223,8 @@ function constructor() { 'onKeyPress': keyPress}); mouse = new Mouse({'target': conf.target, 'onMouseButton': mouseButton, - 'onMouseMove': mouseMove}); + 'onMouseMove': mouseMove, + 'notify': keyboard.sync}); rmode = display.get_render_mode();