GUAC-810: Send "synthetic" key events for non-physical input options. Allow components to prevent production/handling of guacKeyup/guacKeydown via guacBeforeKeyup/guacBeforeKeydown.

This commit is contained in:
Michael Jumper
2014-12-20 14:05:54 -08:00
parent b33333da3f
commit eaed778f91
5 changed files with 85 additions and 11 deletions

View File

@@ -88,12 +88,12 @@ angular.module('osk').directive('guacOsk', [function guacOsk() {
// Broadcast keydown for each key pressed
keyboard.onkeydown = function(keysym) {
$rootScope.$broadcast('guacKeydown', keysym);
$rootScope.$broadcast('guacSyntheticKeydown', keysym);
};
// Broadcast keydown for each key released
keyboard.onkeyup = function(keysym) {
$rootScope.$broadcast('guacKeyup', keysym);
$rootScope.$broadcast('guacSyntheticKeyup', keysym);
};
// Resize keyboard whenever window changes size