1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
6 <meta name=
"generator" content=
"JsDoc Toolkit" />
8 <title>JsDoc Reference - pwlib.extensions.mousekeys
</title>
10 <style type=
"text/css">
14 font: 12px "Lucida Grande", Tahoma
, Arial
, Helvetica
, sans-serif
;
21 background-color: #ccc;
36 border-top: 1px solid
#7F8FB1;
44 border: 1px dashed
#ccc;
54 background-color: #F3F3F3;
66 list-style-type: none
;
69 font-family: arial
, sans-serif
;
80 .summaryTable { width: 100%; }
88 h2
{ font-size: 110%; }
89 caption
, div
.sectionTitle
91 background-color: #7F8FB1;
95 padding: 2px 6px 2px 6px;
96 border: 1px #7F8FB1 solid
;
99 div
.sectionTitle
{ margin-bottom: 8px; }
100 .summaryTable thead { display: none
; }
106 border-bottom: 1px #7F8FB1 solid
;
107 border-right: 1px #7F8FB1 solid
;
110 /*col#summaryAttributes {}*/
111 .summaryTable td
.attributes
113 border-left: 1px #7F8FB1 solid
;
118 td
.attributes
, .fixedFont
122 font-family: "Courier New",Courier
,monospace
;
126 .summaryTable td
.nameDescription
133 .summaryTable td
.nameDescription
, .description
140 .summaryTable { margin-bottom: 8px; }
153 .detailList dt { margin-left: 20px; }
162 .light
, td
.attributes
, .light
a:link
, .light
a:visited
177 <!-- ============================== header ================================= -->
178 <!-- begin static/header.html -->
181 <!-- end static/header.html -->
183 <!-- ============================== classes index ============================ -->
185 <!-- begin publish.classesIndex -->
186 <div align=
"center"><a href=
"../index.html">Class Index
</a>
187 |
<a href=
"../files.html">File Index
</a></div>
190 <ul class=
"classList">
192 <li><i><a href=
"../symbols/_global_.html">_global_
</a></i></li>
194 <li><a href=
"../symbols/PaintWeb.html">PaintWeb
</a></li>
196 <li><a href=
"../symbols/pwlib.html">pwlib
</a></li>
198 <li><a href=
"../symbols/pwlib.appEvent.html">pwlib.appEvent
</a></li>
200 <li><a href=
"../symbols/pwlib.appEvent.appDestroy.html">pwlib.appEvent.appDestroy
</a></li>
202 <li><a href=
"../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit
</a></li>
204 <li><a href=
"../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange
</a></li>
206 <li><a href=
"../symbols/pwlib.appEvent.clipboardUpdate.html">pwlib.appEvent.clipboardUpdate
</a></li>
208 <li><a href=
"../symbols/pwlib.appEvent.commandRegister.html">pwlib.appEvent.commandRegister
</a></li>
210 <li><a href=
"../symbols/pwlib.appEvent.commandUnregister.html">pwlib.appEvent.commandUnregister
</a></li>
212 <li><a href=
"../symbols/pwlib.appEvent.configChange.html">pwlib.appEvent.configChange
</a></li>
214 <li><a href=
"../symbols/pwlib.appEvent.extensionRegister.html">pwlib.appEvent.extensionRegister
</a></li>
216 <li><a href=
"../symbols/pwlib.appEvent.extensionUnregister.html">pwlib.appEvent.extensionUnregister
</a></li>
218 <li><a href=
"../symbols/pwlib.appEvent.guiFloatingPanelStateChange.html">pwlib.appEvent.guiFloatingPanelStateChange
</a></li>
220 <li><a href=
"../symbols/pwlib.appEvent.guiHide.html">pwlib.appEvent.guiHide
</a></li>
222 <li><a href=
"../symbols/pwlib.appEvent.guiResizeEnd.html">pwlib.appEvent.guiResizeEnd
</a></li>
224 <li><a href=
"../symbols/pwlib.appEvent.guiResizeStart.html">pwlib.appEvent.guiResizeStart
</a></li>
226 <li><a href=
"../symbols/pwlib.appEvent.guiShow.html">pwlib.appEvent.guiShow
</a></li>
228 <li><a href=
"../symbols/pwlib.appEvent.guiTabActivate.html">pwlib.appEvent.guiTabActivate
</a></li>
230 <li><a href=
"../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate
</a></li>
232 <li><a href=
"../symbols/pwlib.appEvent.imageCrop.html">pwlib.appEvent.imageCrop
</a></li>
234 <li><a href=
"../symbols/pwlib.appEvent.imageSave.html">pwlib.appEvent.imageSave
</a></li>
236 <li><a href=
"../symbols/pwlib.appEvent.imageSaveResult.html">pwlib.appEvent.imageSaveResult
</a></li>
238 <li><a href=
"../symbols/pwlib.appEvent.imageSizeChange.html">pwlib.appEvent.imageSizeChange
</a></li>
240 <li><a href=
"../symbols/pwlib.appEvent.imageZoom.html">pwlib.appEvent.imageZoom
</a></li>
242 <li><a href=
"../symbols/pwlib.appEvent.selectionChange.html">pwlib.appEvent.selectionChange
</a></li>
244 <li><a href=
"../symbols/pwlib.appEvent.shadowAllow.html">pwlib.appEvent.shadowAllow
</a></li>
246 <li><a href=
"../symbols/pwlib.appEvent.toolActivate.html">pwlib.appEvent.toolActivate
</a></li>
248 <li><a href=
"../symbols/pwlib.appEvent.toolPreactivate.html">pwlib.appEvent.toolPreactivate
</a></li>
250 <li><a href=
"../symbols/pwlib.appEvent.toolRegister.html">pwlib.appEvent.toolRegister
</a></li>
252 <li><a href=
"../symbols/pwlib.appEvent.toolUnregister.html">pwlib.appEvent.toolUnregister
</a></li>
254 <li><a href=
"../symbols/pwlib.appEvents.html">pwlib.appEvents
</a></li>
256 <li><a href=
"../symbols/pwlib.browser.html">pwlib.browser
</a></li>
258 <li><a href=
"../symbols/pwlib.dom.html">pwlib.dom
</a></li>
260 <li><a href=
"../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener
</a></li>
262 <li><a href=
"../symbols/pwlib.dom.keyCodes.html">pwlib.dom.keyCodes
</a></li>
264 <li><a href=
"../symbols/pwlib.dom.keyCodes_fixes.html">pwlib.dom.keyCodes_fixes
</a></li>
266 <li><a href=
"../symbols/pwlib.dom.keyCodes_Safari2.html">pwlib.dom.keyCodes_Safari2
</a></li>
268 <li><a href=
"../symbols/pwlib.dom.keyNames.html">pwlib.dom.keyNames
</a></li>
270 <li><a href=
"../symbols/pwlib.extensions.html">pwlib.extensions
</a></li>
272 <li><a href=
"../symbols/pwlib.extensions.colormixer.html">pwlib.extensions.colormixer
</a></li>
274 <li><a href=
"../symbols/pwlib.extensions.moodle.html">pwlib.extensions.moodle
</a></li>
276 <li><a href=
"../symbols/pwlib.extensions.mousekeys.html">pwlib.extensions.mousekeys
</a></li>
278 <li><a href=
"../symbols/pwlib.fileCache.html">pwlib.fileCache
</a></li>
280 <li><a href=
"../symbols/pwlib.gui.html">pwlib.gui
</a></li>
282 <li><a href=
"../symbols/pwlib.guiColorInput.html">pwlib.guiColorInput
</a></li>
284 <li><a href=
"../symbols/pwlib.guiFloatingPanel.html">pwlib.guiFloatingPanel
</a></li>
286 <li><a href=
"../symbols/pwlib.guiResizer.html">pwlib.guiResizer
</a></li>
288 <li><a href=
"../symbols/pwlib.guiTabPanel.html">pwlib.guiTabPanel
</a></li>
290 <li><a href=
"../symbols/pwlib.tools.html">pwlib.tools
</a></li>
292 <li><a href=
"../symbols/pwlib.tools.bcurve.html">pwlib.tools.bcurve
</a></li>
294 <li><a href=
"../symbols/pwlib.tools.cpicker.html">pwlib.tools.cpicker
</a></li>
296 <li><a href=
"../symbols/pwlib.tools.ellipse.html">pwlib.tools.ellipse
</a></li>
298 <li><a href=
"../symbols/pwlib.tools.eraser.html">pwlib.tools.eraser
</a></li>
300 <li><a href=
"../symbols/pwlib.tools.hand.html">pwlib.tools.hand
</a></li>
302 <li><a href=
"../symbols/pwlib.tools.insertimg.html">pwlib.tools.insertimg
</a></li>
304 <li><a href=
"../symbols/pwlib.tools.line.html">pwlib.tools.line
</a></li>
306 <li><a href=
"../symbols/pwlib.tools.pencil.html">pwlib.tools.pencil
</a></li>
308 <li><a href=
"../symbols/pwlib.tools.polygon.html">pwlib.tools.polygon
</a></li>
310 <li><a href=
"../symbols/pwlib.tools.rectangle.html">pwlib.tools.rectangle
</a></li>
312 <li><a href=
"../symbols/pwlib.tools.selection.html">pwlib.tools.selection
</a></li>
314 <li><a href=
"../symbols/pwlib.tools.text.html">pwlib.tools.text
</a></li>
318 <!-- end publish.classesIndex -->
322 <!-- ============================== class title ============================ -->
323 <h1 class=
"classTitle">
325 Class pwlib.extensions.mousekeys
328 <!-- ============================== class summary ========================== -->
329 <p class=
"description">
332 The MouseKeys extension.
335 <br /><i>Defined in:
</i> <a href=
"../symbols/src/src_extensions_mousekeys.js.html">mousekeys.js
</a>.
339 <!-- ============================== constructor summary ==================== -->
341 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the constructor documented in the class pwlib.extensions.mousekeys.">
342 <caption>Class Summary
</caption>
345 <th scope=
"col">Constructor Attributes
</th>
346 <th scope=
"col">Constructor Name and Description
</th>
351 <td class=
"attributes"> </td>
352 <td class=
"nameDescription" >
353 <div class=
"fixedFont">
354 <b><a href=
"../symbols/pwlib.extensions.mousekeys.html#constructor">pwlib.extensions.mousekeys
</a></b>(app)
356 <div class=
"description"></div>
363 <!-- ============================== properties summary ===================== -->
367 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the fields documented in the class pwlib.extensions.mousekeys.">
368 <caption>Field Summary
</caption>
371 <th scope=
"col">Field Attributes
</th>
372 <th scope=
"col">Field Name and Description
</th>
378 <td class=
"attributes"><private
> <inner
> </td>
379 <td class=
"nameDescription">
380 <div class=
"fixedFont">
381 <b><a href=
"../symbols/pwlib.extensions.mousekeys.html#-accel">accel
</a></b>
383 <div class=
"description">Holds the current mouse movement acceleration, taken from the
389 <td class=
"attributes"><private
> <inner
> </td>
390 <td class=
"nameDescription">
391 <div class=
"fixedFont">
392 <b><a href=
"../symbols/pwlib.extensions.mousekeys.html#-pointer">pointer
</a></b>
394 <div class=
"description">Holds a reference to the DOM element representing the pointer on top of the
395 canvas element.
</div>
400 <td class=
"attributes"><private
> <inner
> </td>
401 <td class=
"nameDescription">
402 <div class=
"fixedFont">
403 <b><a href=
"../symbols/pwlib.extensions.mousekeys.html#-speed">speed
</a></b>
405 <div class=
"description">Holds the current mouse movement speed in pixels.
</div>
416 <!-- ============================== methods summary ======================== -->
420 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the methods documented in the class pwlib.extensions.mousekeys.">
421 <caption>Method Summary
</caption>
424 <th scope=
"col">Method Attributes
</th>
425 <th scope=
"col">Method Name and Description
</th>
431 <td class=
"attributes"> </td>
432 <td class=
"nameDescription">
433 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#extensionRegister">extensionRegister
</a></b>()
435 <div class=
"description">The
<code>extensionRegister
</code> event handler.
</div>
440 <td class=
"attributes"> </td>
441 <td class=
"nameDescription">
442 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#extensionUnregister">extensionUnregister
</a></b>()
444 <div class=
"description">The
<code>extensionUnregister
</code> event handler.
</div>
449 <td class=
"attributes"> </td>
450 <td class=
"nameDescription">
451 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#keydown">keydown
</a></b>(ev)
453 <div class=
"description">The
<code>keydown
</code> event handler.
</div>
458 <td class=
"attributes"> </td>
459 <td class=
"nameDescription">
460 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#keypress">keypress
</a></b>(ev)
462 <div class=
"description">The
<code>keypress
</code> event handler.
</div>
467 <td class=
"attributes"> </td>
468 <td class=
"nameDescription">
469 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#keyup">keyup
</a></b>(ev)
471 <div class=
"description">The
<code>keyup
</code> event handler.
</div>
476 <td class=
"attributes"><inner
> </td>
477 <td class=
"nameDescription">
478 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.extensions.mousekeys.html#-pointerMousemove">pointerMousemove
</a></b>(ev)
480 <div class=
"description">Track the virtual pointer coordinates, by updating the position of the
481 <var>pointer
</var> element.
</div>
491 <!-- ============================== events summary ======================== -->
494 <!-- ============================== constructor details ==================== -->
496 <div class=
"details"><a name=
"constructor"> </a>
497 <div class=
"sectionTitle">
501 <div class=
"fixedFont">
502 <b>pwlib.extensions.mousekeys
</b>(app)
505 <div class=
"description">
514 <dl class=
"detailList">
515 <dt class=
"heading">Parameters:
</dt>
518 <span class=
"light fixedFont">{
<a href=
"../symbols/PaintWeb.html">PaintWeb
</a>}
</span> <b>app
</b>
521 <dd>Reference to the main paint application object.
</dd>
535 <!-- ============================== field details ========================== -->
537 <div class=
"sectionTitle">
541 <a name=
"-accel"> </a>
542 <div class=
"fixedFont"><private
> <inner
>
544 <span class=
"light">{Number}
</span>
548 <div class=
"description">
549 Holds the current mouse movement acceleration, taken from the
560 <dl class=
"detailList">
561 <dt class=
"heading">See:
</dt>
563 <dd>PaintWeb.config.mousekeys.accel The mouse keys acceleration setting.
</dd>
571 <a name=
"-pointer"> </a>
572 <div class=
"fixedFont"><private
> <inner
>
574 <span class=
"light">{Element}
</span>
578 <div class=
"description">
579 Holds a reference to the DOM element representing the pointer on top of the
594 <a name=
"-speed"> </a>
595 <div class=
"fixedFont"><private
> <inner
>
597 <span class=
"light">{Number}
</span>
601 <div class=
"description">
602 Holds the current mouse movement speed in pixels.
618 <!-- ============================== method details ========================= -->
620 <div class=
"sectionTitle">
624 <a name=
"extensionRegister"> </a>
625 <div class=
"fixedFont">
627 <span class=
"light">{Boolean}
</span>
628 <b>extensionRegister
</b>()
631 <div class=
"description">
632 The
<code>extensionRegister
</code> event handler. This initializes the
633 extension by adding the pointer DOM element and by setting up the keyboard
646 <dl class=
"detailList">
647 <dt class=
"heading">Returns:
</dt>
649 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the extension initialized successfully, or false
659 <a name=
"extensionUnregister"> </a>
660 <div class=
"fixedFont">
663 <b>extensionUnregister
</b>()
666 <div class=
"description">
667 The
<code>extensionUnregister
</code> event handler. This will remove the
668 pointer DOM element and the canvas event listener.
685 <a name=
"keydown"> </a>
686 <div class=
"fixedFont">
688 <span class=
"light">{Boolean}
</span>
692 <div class=
"description">
693 The
<code>keydown
</code> event handler.
695 <p>This method requires a DOM Event object which has the
696 <var>ev.kobj_
</var> object reference from the keyboard shortcuts
697 configuration. The
<var>kobj_
</var> object must have the
<var>action
</var>
698 property. Support for the
"ButtonToggle" and the
"ButtonClick" actions is
701 <p>The
"ButtonToggle" action essentially means that a mouse event will be
702 generated, either
<code>mousedown
</code> or
<code>mouseup
</code>. By
703 alternating these two events, this method allows the user to start and stop
704 the drawing operation at any moment using the keyboard shortcut they have
707 <p>Under typical usage, the
"ButtonClick" action translates the
708 <code>keydown
</code> event to
<code>mousedown
</code>. The
709 <code>keyup
</code> event handler will also fire the
<code>mouseup
</code>
710 event. This allows the user to simulate holding down the mouse button,
711 while he/she holds down a key.
713 <p>A
<code>click
</code> event is always fired after the firing of
714 a
<code>mouseup
</code> event.
716 <p>Irrespective of the key the user pressed, this method does always reset
717 the speed and acceleration of the pointer movement.
725 <dl class=
"detailList">
726 <dt class=
"heading">Parameters:
</dt>
729 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
732 <dd>The DOM Event object.
</dd>
740 <dl class=
"detailList">
741 <dt class=
"heading">Returns:
</dt>
743 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the keyboard shortcut was recognized, or false
750 <dl class=
"detailList">
751 <dt class=
"heading">See:
</dt>
753 <dd>PaintWeb.config.mousekeys.actions The keyboard shortcuts configuration
761 <a name=
"keypress"> </a>
762 <div class=
"fixedFont">
764 <span class=
"light">{Boolean}
</span>
768 <div class=
"description">
769 The
<code>keypress
</code> event handler.
771 <p>This method requires a DOM Event object with a
<var>ev.kobj_
</var>
772 object reference to the keyboard shortcut configuration. The keyboard
773 shortcut configuration object must have the
<var>action
</var> property.
775 <p>This event handler implements support for the following
<var>param
</var>
776 values:
"SouthWest",
"South",
"SouthEast",
"West",
"East",
"NorthWest",
777 "North" and
"NorthEast", All of these values indicate the movement
778 direction. This method generates synthetic
<var>movemove
</var> events based
779 on the direction desired, effectively emulating the use of a real pointing
788 <dl class=
"detailList">
789 <dt class=
"heading">Parameters:
</dt>
792 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
795 <dd>The DOM Event object.
</dd>
803 <dl class=
"detailList">
804 <dt class=
"heading">Returns:
</dt>
806 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the keyboard shortcut was recognized, or false
813 <dl class=
"detailList">
814 <dt class=
"heading">See:
</dt>
816 <dd>PaintWeb.config.mousekeys.actions The keyboard shortcuts configuration
824 <a name=
"keyup"> </a>
825 <div class=
"fixedFont">
827 <span class=
"light">{Boolean}
</span>
831 <div class=
"description">
832 The
<code>keyup
</code> event handler.
834 <p>This method requires a DOM Event object which has the
835 <var>ev.kobj_
</var> object reference from the keyboard shortcuts
836 configuration. The
<var>kobj_
</var> object must have the
<var>action
</var>
837 property. Support for the
"ButtonClick" action is implemented.
839 <p>Under typical usage, the
"ButtonClick" action translates the
840 <code>keydown
</code> event to
<code>mousedown
</code>. This event handler
841 fires the
<code>mouseup
</code> event. This allows the user to simulate
842 holding down the mouse button, while he/she holds down a key.
844 <p>A
<code>click
</code> event is always fired after the firing of the
845 <code>mouseup
</code> event.
853 <dl class=
"detailList">
854 <dt class=
"heading">Parameters:
</dt>
857 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
860 <dd>The DOM Event object.
</dd>
868 <dl class=
"detailList">
869 <dt class=
"heading">Returns:
</dt>
871 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the keyboard shortcut was recognized, or false
878 <dl class=
"detailList">
879 <dt class=
"heading">See:
</dt>
881 <dd>PaintWeb.config.mousekeys.actions The keyboard shortcuts configuration
889 <a name=
"-pointerMousemove"> </a>
890 <div class=
"fixedFont"><inner
>
893 <b>pointerMousemove
</b>(ev)
896 <div class=
"description">
897 Track the virtual pointer coordinates, by updating the position of the
898 <var>pointer
</var> element. This allows the keyboard users to see where
899 they moved the virtual pointer.
907 <dl class=
"detailList">
908 <dt class=
"heading">Parameters:
</dt>
911 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
914 <dd>The DOM Event object.
</dd>
929 <!-- ============================== event details ========================= -->
936 <!-- ============================== footer ================================= -->
937 <div class=
"fineprint" style=
"clear:both">
939 Documentation generated by
<a href=
"http://code.google.com/p/jsdoc-toolkit/" target=
"_blank">JsDoc Toolkit
</a> 2.3.0 on Fri Jul
31 2009 20:
23:
22 GMT+
0300 (EEST)