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
This commit is contained in:
jalf 2013-11-27 15:20:08 +01:00 committed by Solly Ross
parent 9ceef041c6
commit fa30469cda
1 changed files with 2 additions and 1 deletions

View File

@ -222,7 +222,8 @@ function constructor() {
'onKeyPress': keyPress}); 'onKeyPress': keyPress});
mouse = new Mouse({'target': conf.target, mouse = new Mouse({'target': conf.target,
'onMouseButton': mouseButton, 'onMouseButton': mouseButton,
'onMouseMove': mouseMove}); 'onMouseMove': mouseMove,
'notify': keyboard.sync});
rmode = display.get_render_mode(); rmode = display.get_render_mode();