Class Index | File Index

Classes


Class Guacamole.Keyboard


Defined in: Keyboard.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Provides cross-browser and cross-keyboard keyboard for a specific element.
Field Summary
Field Attributes Field Name and Description
 
All modifiers and their states.
 
The state of every key, indexed by keysym.
Method Summary
Method Attributes Method Name and Description
<inner>  
get_keysym(keysyms, location)
Given an array of keysyms indexed by location, returns the keysym for the given location, or the keysym for the standard location if undefined.
<inner>  
Given a keyboard event, updates the local modifier state and remote key state based on the modifier flags within the event.
Event Summary
Event Attributes Event Name and Description
 
onkeydown(keysym)
Fired whenever the user presses a key with the element associated with this Guacamole.Keyboard in focus.
 
onkeyup(keysym)
Fired whenever the user releases a key with the element associated with this Guacamole.Keyboard in focus.
Class Detail
Guacamole.Keyboard(element)
Provides cross-browser and cross-keyboard keyboard for a specific element. Browser and keyboard layout variation is abstracted away, providing events which represent keys as their corresponding X11 keysym.
Parameters:
{Element} element
The Element to use to provide keyboard events.
Field Detail
modifiers
All modifiers and their states.

pressed
The state of every key, indexed by keysym. If a particular key is pressed, the value of pressed for that keysym will be true. If a key is not currently pressed, it will not be defined.
Method Detail
<inner> get_keysym(keysyms, location)
Given an array of keysyms indexed by location, returns the keysym for the given location, or the keysym for the standard location if undefined.
Parameters:
{Array} keysyms
An array of keysyms, where the index of the keysym in the array is the location value.
{Number} location
The location on the keyboard corresponding to the key pressed, as defined at: http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent

<inner> update_modifier_state(e)
Given a keyboard event, updates the local modifier state and remote key state based on the modifier flags within the event. This function pays no attention to keycodes.
Parameters:
{KeyboardEvent} e
The keyboard event containing the flags to update.
Event Detail
{Boolean} onkeydown(keysym)
Fired whenever the user presses a key with the element associated with this Guacamole.Keyboard in focus.
Parameters:
{Number} keysym
The keysym of the key being pressed.
Returns:
{Boolean} true if the key event should be allowed through to the browser, false otherwise.

onkeyup(keysym)
Fired whenever the user releases a key with the element associated with this Guacamole.Keyboard in focus.
Parameters:
{Number} keysym
The keysym of the key being released.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 28 2014 20:51:45 GMT-0700 (PDT)