You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/10/03 17:30:46 UTC
guacamole-website git commit: Deploy updated keyboard test (uses
Guacamole.InputSink when possible).
Repository: guacamole-website
Updated Branches:
refs/heads/asf-site f5235113f -> f298e6cfc
Deploy updated keyboard test (uses Guacamole.InputSink when possible).
Project: http://git-wip-us.apache.org/repos/asf/guacamole-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-website/commit/f298e6cf
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-website/tree/f298e6cf
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-website/diff/f298e6cf
Branch: refs/heads/asf-site
Commit: f298e6cfc1ae395c12f5bdc2c630a371958a9008
Parents: f523511
Author: Michael Jumper <mj...@apache.org>
Authored: Wed Oct 3 10:30:26 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Oct 3 10:30:26 2018 -0700
----------------------------------------------------------------------
content/pub/tests/guac/keyboard-test.html | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-website/blob/f298e6cf/content/pub/tests/guac/keyboard-test.html
----------------------------------------------------------------------
diff --git a/content/pub/tests/guac/keyboard-test.html b/content/pub/tests/guac/keyboard-test.html
index 6a10a56..71849f1 100644
--- a/content/pub/tests/guac/keyboard-test.html
+++ b/content/pub/tests/guac/keyboard-test.html
@@ -27,7 +27,7 @@
<body>
- <textarea></textarea>
+ <textarea id="field"></textarea>
<div id="log"></div>
@@ -38,6 +38,7 @@
<!-- Load required guacamole-common-js modules from git -->
<script type="text/javascript">
+ GIT_GUAC.loadModule('InputSink.js');
GIT_GUAC.loadModule('Keyboard.js');
GIT_GUAC.loadModule('Version.js');
</script>
@@ -57,6 +58,22 @@
var keyboard = new Guacamole.Keyboard(document);
+ // Listen to additional elements if version of API being
+ // tested defines listenTo()
+ if (keyboard.listenTo) {
+
+ keyboard.listenTo(document.getElementById('field'));
+
+ // Use Guacamole.InputSink if available in version of API
+ // being tested
+ if (Guacamole.InputSink) {
+ var sink = new Guacamole.InputSink();
+ document.body.appendChild(sink.getElement());
+ keyboard.listenTo(sink.getElement());
+ }
+
+ }
+
keyboard.onkeydown = function(keysym) {
log.log("guacamole", "keydown",
"0x" + keysym.toString(16), X11_KEYSYM[keysym]);