diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index 21a60089d..3bc5da721 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -1891,6 +1891,12 @@ GuacUI.Client.attach = function(guac) { } + /** + * Presses and releases the key corresponding to the given keysym, as if + * typed by the user. + * + * @param {Number} keysym The keysym of the key to send. + */ function send_keysym(keysym) { var guac = GuacUI.Client.attachedClient; @@ -1902,6 +1908,12 @@ GuacUI.Client.attach = function(guac) { } + /** + * Presses and releases the key having the keysym corresponding to the + * Unicode codepoint given, as if typed by the user. + * + * @param {Number} codepoint The Unicode codepoint of the key to send. + */ function send_codepoint(codepoint) { if (codepoint === 10) { @@ -1915,6 +1927,22 @@ GuacUI.Client.attach = function(guac) { } + /** + * Translates each character within the given string to keysyms and sends + * each, in order, as if typed by the user. + * + * @param {String} content The string to send. + */ + function send_string(content) { + + for (var i=0; i