GUACAMOLE-113: Style and comment cleanup.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/cd4fcabe Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/cd4fcabe Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/cd4fcabe Branch: refs/heads/master Commit: cd4fcabe3a71db28e6a5804f7ee399295414e3ae Parents: f358cf2 Author: Nick Couchman <[email protected]> Authored: Sun Jan 14 19:48:41 2018 -0500 Committer: Nick Couchman <[email protected]> Committed: Sun Jan 14 19:48:41 2018 -0500 ---------------------------------------------------------------------- .../app/client/controllers/clientController.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cd4fcabe/guacamole/src/main/webapp/app/client/controllers/clientController.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index bf692bc..a21c0a2 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -551,10 +551,19 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams !_.isEmpty(_.pick(ALT_KEYS, currentKeysPressedKeys)) && !_.isEmpty(_.pick(CTRL_KEYS, currentKeysPressedKeys)) ) { - event.preventDefault(); - delete keysCurrentlyPressed[keysym]; - substituteKeysPressed[keysym] = DEL_KEY; - $scope.$broadcast('guacSyntheticKeydown', DEL_KEY); + + // Don't send this event through to the client. + event.preventDefault(); + + // Remove the original key press + delete keysCurrentlyPressed[keysym]; + + // Record the substituted key press so that it can be + // properly dealt with later. + substituteKeysPressed[keysym] = DEL_KEY; + + // Send through the delete key. + $scope.$broadcast('guacSyntheticKeydown', DEL_KEY); } });
