Back to index

lightning-sunbird  0.9+nobinonly
nsIDOMKeyEvent.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Tom Pixley <joki@netscape.com> (original author)
00024  *   Johnny Stenback <jst@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "nsIDOMUIEvent.idl"
00041 
00042 [scriptable, uuid(028e0e6e-8b01-11d3-aae7-0010838a3123)]
00043 interface nsIDOMKeyEvent : nsIDOMUIEvent
00044 {
00045   const unsigned long DOM_VK_CANCEL         = 0x03;
00046   const unsigned long DOM_VK_HELP           = 0x06;
00047   const unsigned long DOM_VK_BACK_SPACE     = 0x08;
00048   const unsigned long DOM_VK_TAB            = 0x09;
00049   const unsigned long DOM_VK_CLEAR          = 0x0C;
00050   const unsigned long DOM_VK_RETURN         = 0x0D;
00051   const unsigned long DOM_VK_ENTER          = 0x0E;
00052   const unsigned long DOM_VK_SHIFT          = 0x10;
00053   const unsigned long DOM_VK_CONTROL        = 0x11;
00054   const unsigned long DOM_VK_ALT            = 0x12;
00055   const unsigned long DOM_VK_PAUSE          = 0x13;
00056   const unsigned long DOM_VK_CAPS_LOCK      = 0x14;
00057   const unsigned long DOM_VK_ESCAPE         = 0x1B;
00058   const unsigned long DOM_VK_SPACE          = 0x20;
00059   const unsigned long DOM_VK_PAGE_UP        = 0x21;
00060   const unsigned long DOM_VK_PAGE_DOWN      = 0x22;
00061   const unsigned long DOM_VK_END            = 0x23;
00062   const unsigned long DOM_VK_HOME           = 0x24;
00063   const unsigned long DOM_VK_LEFT           = 0x25;
00064   const unsigned long DOM_VK_UP             = 0x26;
00065   const unsigned long DOM_VK_RIGHT          = 0x27;
00066   const unsigned long DOM_VK_DOWN           = 0x28;
00067   const unsigned long DOM_VK_PRINTSCREEN    = 0x2C;
00068   const unsigned long DOM_VK_INSERT         = 0x2D;
00069   const unsigned long DOM_VK_DELETE         = 0x2E;
00070 
00071   // DOM_VK_0 - DOM_VK_9 match their ascii values
00072   const unsigned long DOM_VK_0              = 0x30;
00073   const unsigned long DOM_VK_1              = 0x31;
00074   const unsigned long DOM_VK_2              = 0x32;
00075   const unsigned long DOM_VK_3              = 0x33;
00076   const unsigned long DOM_VK_4              = 0x34;
00077   const unsigned long DOM_VK_5              = 0x35;
00078   const unsigned long DOM_VK_6              = 0x36;
00079   const unsigned long DOM_VK_7              = 0x37;
00080   const unsigned long DOM_VK_8              = 0x38;
00081   const unsigned long DOM_VK_9              = 0x39;
00082 
00083   const unsigned long DOM_VK_SEMICOLON      = 0x3B;
00084   const unsigned long DOM_VK_EQUALS         = 0x3D;
00085 
00086   // DOM_VK_A - DOM_VK_Z match their ascii values
00087   const unsigned long DOM_VK_A              = 0x41;
00088   const unsigned long DOM_VK_B              = 0x42;
00089   const unsigned long DOM_VK_C              = 0x43;
00090   const unsigned long DOM_VK_D              = 0x44;
00091   const unsigned long DOM_VK_E              = 0x45;
00092   const unsigned long DOM_VK_F              = 0x46;
00093   const unsigned long DOM_VK_G              = 0x47;
00094   const unsigned long DOM_VK_H              = 0x48;
00095   const unsigned long DOM_VK_I              = 0x49;
00096   const unsigned long DOM_VK_J              = 0x4A;
00097   const unsigned long DOM_VK_K              = 0x4B;
00098   const unsigned long DOM_VK_L              = 0x4C;
00099   const unsigned long DOM_VK_M              = 0x4D;
00100   const unsigned long DOM_VK_N              = 0x4E;
00101   const unsigned long DOM_VK_O              = 0x4F;
00102   const unsigned long DOM_VK_P              = 0x50;
00103   const unsigned long DOM_VK_Q              = 0x51;
00104   const unsigned long DOM_VK_R              = 0x52;
00105   const unsigned long DOM_VK_S              = 0x53;
00106   const unsigned long DOM_VK_T              = 0x54;
00107   const unsigned long DOM_VK_U              = 0x55;
00108   const unsigned long DOM_VK_V              = 0x56;
00109   const unsigned long DOM_VK_W              = 0x57;
00110   const unsigned long DOM_VK_X              = 0x58;
00111   const unsigned long DOM_VK_Y              = 0x59;
00112   const unsigned long DOM_VK_Z              = 0x5A;
00113 
00114   const unsigned long DOM_VK_CONTEXT_MENU   = 0x5D;
00115 
00116   const unsigned long DOM_VK_NUMPAD0        = 0x60;
00117   const unsigned long DOM_VK_NUMPAD1        = 0x61;
00118   const unsigned long DOM_VK_NUMPAD2        = 0x62;
00119   const unsigned long DOM_VK_NUMPAD3        = 0x63;
00120   const unsigned long DOM_VK_NUMPAD4        = 0x64;
00121   const unsigned long DOM_VK_NUMPAD5        = 0x65;
00122   const unsigned long DOM_VK_NUMPAD6        = 0x66;
00123   const unsigned long DOM_VK_NUMPAD7        = 0x67;
00124   const unsigned long DOM_VK_NUMPAD8        = 0x68;
00125   const unsigned long DOM_VK_NUMPAD9        = 0x69;
00126   const unsigned long DOM_VK_MULTIPLY       = 0x6A;
00127   const unsigned long DOM_VK_ADD            = 0x6B;
00128   const unsigned long DOM_VK_SEPARATOR      = 0x6C;
00129   const unsigned long DOM_VK_SUBTRACT       = 0x6D;
00130   const unsigned long DOM_VK_DECIMAL        = 0x6E;
00131   const unsigned long DOM_VK_DIVIDE         = 0x6F;
00132   const unsigned long DOM_VK_F1             = 0x70;
00133   const unsigned long DOM_VK_F2             = 0x71;
00134   const unsigned long DOM_VK_F3             = 0x72;
00135   const unsigned long DOM_VK_F4             = 0x73;
00136   const unsigned long DOM_VK_F5             = 0x74;
00137   const unsigned long DOM_VK_F6             = 0x75;
00138   const unsigned long DOM_VK_F7             = 0x76;
00139   const unsigned long DOM_VK_F8             = 0x77;
00140   const unsigned long DOM_VK_F9             = 0x78;
00141   const unsigned long DOM_VK_F10            = 0x79;
00142   const unsigned long DOM_VK_F11            = 0x7A;
00143   const unsigned long DOM_VK_F12            = 0x7B;
00144   const unsigned long DOM_VK_F13            = 0x7C;
00145   const unsigned long DOM_VK_F14            = 0x7D;
00146   const unsigned long DOM_VK_F15            = 0x7E;
00147   const unsigned long DOM_VK_F16            = 0x7F;
00148   const unsigned long DOM_VK_F17            = 0x80;
00149   const unsigned long DOM_VK_F18            = 0x81;
00150   const unsigned long DOM_VK_F19            = 0x82;
00151   const unsigned long DOM_VK_F20            = 0x83;
00152   const unsigned long DOM_VK_F21            = 0x84;
00153   const unsigned long DOM_VK_F22            = 0x85;
00154   const unsigned long DOM_VK_F23            = 0x86;
00155   const unsigned long DOM_VK_F24            = 0x87;
00156 
00157   const unsigned long DOM_VK_NUM_LOCK       = 0x90;
00158   const unsigned long DOM_VK_SCROLL_LOCK    = 0x91;
00159 
00160   const unsigned long DOM_VK_COMMA          = 0xBC;
00161   const unsigned long DOM_VK_PERIOD         = 0xBE;
00162   const unsigned long DOM_VK_SLASH          = 0xBF;
00163   const unsigned long DOM_VK_BACK_QUOTE     = 0xC0;
00164   const unsigned long DOM_VK_OPEN_BRACKET   = 0xDB;
00165   const unsigned long DOM_VK_BACK_SLASH     = 0xDC;
00166   const unsigned long DOM_VK_CLOSE_BRACKET  = 0xDD;
00167   const unsigned long DOM_VK_QUOTE          = 0xDE;
00168 
00169   const unsigned long DOM_VK_META           = 0xE0;
00170 
00171   readonly attribute unsigned long    charCode;
00172   readonly attribute unsigned long    keyCode;
00173 
00174   readonly attribute boolean          altKey;
00175   readonly attribute boolean          ctrlKey;
00176   readonly attribute boolean          shiftKey;
00177   readonly attribute boolean          metaKey;
00178 
00179   void                      initKeyEvent(in DOMString typeArg,
00180                                          in boolean canBubbleArg,
00181                                          in boolean cancelableArg,
00182                                          in nsIDOMAbstractView viewArg,
00183                                          in boolean ctrlKeyArg,
00184                                          in boolean altKeyArg,
00185                                          in boolean shiftKeyArg,
00186                                          in boolean metaKeyArg,
00187                                          in unsigned long keyCodeArg,
00188                                          in unsigned long charCodeArg);
00189 };