Use pressed classname for pressed keys.

This commit is contained in:
Michael Jumper
2012-01-23 10:04:27 -08:00
parent c210444fac
commit aa5b07761e

View File

@@ -241,7 +241,10 @@ Guacamole.OnScreenKeyboard = function(url) {
row.appendChild(key_container_element);
// Set up click handler for key
key_element.onclick = function() {
key_element.onmousedown =
key_element.ontouchstart = function() {
key_element.classList.add("guac-keyboard-pressed");
// Get current cap based on modifier state
var cap = key.getCap(on_screen_keyboard.modifiers);
@@ -270,6 +273,11 @@ Guacamole.OnScreenKeyboard = function(url) {
};
key_element.onmouseup =
key_element.ontouchend = function() {
key_element.classList.remove("guac-keyboard-pressed");
};
}
});