GUAC-862: Remove dependency on timing.

This commit is contained in:
Michael Jumper
2014-09-28 19:12:48 -07:00
parent 532dcf6431
commit a9f5bedfe6

View File

@@ -763,21 +763,6 @@ Guacamole.Keyboard = function(element) {
}
/**
* The reinterpretation timeout handle returned via window.setTimeout() when
* future evaluation is needed, but the necessary event may not actually be
* generated.
*/
var reinterpret_timeout;
/**
* Schedules future reinterpretation of logged key events.
*/
function schedule_reinterpret() {
window.clearTimeout(reinterpret_timeout);
reinterpret_timeout = window.setTimeout(interpret_events, 100);
}
/**
* Reads through the event log, removing events from the head of the log
* when the corresponding true key presses are known (or as known as they
@@ -890,16 +875,6 @@ Guacamole.Keyboard = function(element) {
return eventLog.shift();
}
// Drop event if completely old and uninterpretable
else if (first.getAge() > 100) {
console.log("Warning: Key press was dropped as ambiguous.", first);
return eventLog.shift();
}
// Lacking further information, pray for a future keypress event
else
schedule_reinterpret();
}
// Keyup event