dijit/main.typematic (version 1.10)

Summary

These functions are used to repetitively call a user specified callback method when a specific key or mouse click over a specific DOM node is held down for a specific amount of time. Only 1 such event is allowed to occur on the browser page at 1 time.

Method Summary

  • _fireEventAndReload()
  • addKeyListener(node,keyObject,_this,callback,subsequentDelay,initialDelay,minDelay) Start listening for a specific typematic key.
  • addListener(mouseNode,keyNode,keyObject,_this,callback,subsequentDelay,initialDelay,minDelay) Start listening for a specific typematic key and mouseclick.
  • addMouseListener(node,_this,callback,subsequentDelay,initialDelay,minDelay) Start listening for a typematic mouse click.
  • stop() Stop an ongoing timed, repeating callback sequence.
  • trigger(evt,_this,node,callback,obj,subsequentDelay,initialDelay,minDelay) Start a timed, repeating callback sequence.

Methods

_fireEventAndReload()
Defined by dijit/typematic
addKeyListener(node,keyObject,_this,callback,subsequentDelay,initialDelay,minDelay)
Defined by dijit/typematic

Start listening for a specific typematic key. See also the trigger method for other parameters.

Parameter Type Description
node DOMNode
keyObject Object

an object defining the key to listen for:

  • keyCode: the keyCode (number) to listen for, used for non-printable keys
  • charCode: the charCode (number) to listen for, used for printable keys
  • charOrCode: deprecated, use keyCode or charCode
  • ctrlKey: desired ctrl key state to initiate the callback sequence:
    • pressed (true)
    • released (false)
    • either (unspecified)
  • altKey: same as ctrlKey but for the alt key
  • shiftKey: same as ctrlKey but for the shift key
_this Object
callback Function
subsequentDelay Number
initialDelay Number
minDelay Number
Optional
Returns:any | object

a connection handle

addListener(mouseNode,keyNode,keyObject,_this,callback,subsequentDelay,initialDelay,minDelay)
Defined by dijit/typematic

Start listening for a specific typematic key and mouseclick. This is a thin wrapper to addKeyListener and addMouseListener. See the addMouseListener and addKeyListener methods for other parameters.

Parameter Type Description
mouseNode Node

the DOM node object to listen on for mouse events.

keyNode Node

the DOM node object to listen on for key events.

keyObject Object
_this Object
callback Function
subsequentDelay Number
initialDelay Number
minDelay Number
Optional
Returns:any | object

a connection handle

addMouseListener(node,_this,callback,subsequentDelay,initialDelay,minDelay)
Defined by dijit/typematic

Start listening for a typematic mouse click. See the trigger method for other parameters.

Parameter Type Description
node DOMNode
_this Object
callback Function
subsequentDelay Number
initialDelay Number
minDelay Number
Optional
Returns:any | object

a connection handle

stop()
Defined by dijit/typematic

Stop an ongoing timed, repeating callback sequence.

trigger(evt,_this,node,callback,obj,subsequentDelay,initialDelay,minDelay)
Defined by dijit/typematic

Start a timed, repeating callback sequence. If already started, the function call is ignored. This method is not normally called by the user but can be when the normal listener code is insufficient.

Parameter Type Description
evt Event

key or mouse event object

_this Object

pointer to the user's widget space.

node DOMNode

the DOM node object passed in

callback Function

function to call until the sequence is stopped called with 3 parameters:

obj Object

user space object used to uniquely identify each typematic sequence

subsequentDelay Number
Optional

if > 1, the number of milliseconds until the 3->n events occur or else the fractional time multiplier for the next event's delay, default=0.9

initialDelay Number
Optional

the number of milliseconds until the 2nd event occurs, default=500ms

minDelay Number
Optional

the maximum delay in milliseconds for event to fire, default=10ms

Error in the documentation? Can’t find what you are looking for? Let us know!