STools

Class SKeyShortcut

Object
   |
   +--SKeyShortcut

class SKeyShortcut

Defined in SKeyShortcut.js

Version: 1.0

Author: deltapositive (deltapositive@yahoo.fr)


Field Summary
<static>  string ALT_KEY_MODIFIER
          This constant defines the ALT key prefix in a key sequence.
<static>  string CTRL_KEY_MODIFIER
          This constant defines the CTRL key prefix in a key sequence.
<static>  string ESCAPE_KEY
          This constant defines the ESCAPE key code in a key sequence.
<static>  string FUNCTION_PREFIX_KEY
          This constant defines the prefix of the functions key (F1 to F12) code in a key sequence.
<static>  string RETURN_KEY
          This constant defines the RETURN key code in a key sequence.
<static>  string SHIFT_KEY_MODIFIER
          This constant defines the SHIFT key prefix in a key sequence.
 
Constructor Summary
SKeyShortcut ()
            SKeyShortcut is part of the STools.

Copyright 2005 STools

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


SKeyShortcut is a class that creates an association between a key (or an association of key) and a javascript function.

Basic usage :
This class is usefull to get the user pressed 'Return' to close a dialog box.
This class is used in a menu to associate a shortcut to an item.
 
Method Summary
 Object getParameter(<string> name)
           Get a parameter's value
 void setEventListener(<string> event, <function> listener)
           Set a listener for an event.
 void setKeySequence(<string> sequence)
           Set the key sequence for the shortcut
For example: SKeyShortcut.FUNCTION_PREFIX_KEY + '3' assign a shortcut for the F3 key
A sequence is defined by zero, one or more modifier (from Ctrl, Alt and Shift) and a key.
 void setParameter(<string> name, <Object> value)
           Set a parameter

Field Detail

ALT_KEY_MODIFIER

<static> string ALT_KEY_MODIFIER

CTRL_KEY_MODIFIER

<static> string CTRL_KEY_MODIFIER

ESCAPE_KEY

<static> string ESCAPE_KEY

FUNCTION_PREFIX_KEY

<static> string FUNCTION_PREFIX_KEY

RETURN_KEY

<static> string RETURN_KEY

SHIFT_KEY_MODIFIER

<static> string SHIFT_KEY_MODIFIER

Constructor Detail

SKeyShortcut

SKeyShortcut()

Method Detail

getParameter

Object getParameter(<string> name)

setEventListener

void setEventListener(<string> event, <function> listener)

setKeySequence

void setKeySequence(<string> sequence)

setParameter

void setParameter(<string> name, <Object> value)

STools

- STools Copyright 2005 -




Documentation generated by JSDoc on Tue Jan 24 21:43:37 2006