2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
23 // Introduced in DOM Level 3:
26 ] KeyboardEvent
: UIEvent
{
28 #if
!defined
(LANGUAGE_JAVASCRIPT
)
30 const unsigned long KEY_LOCATION_STANDARD
= 0x00;
31 const unsigned long KEY_LOCATION_LEFT
= 0x01;
32 const unsigned long KEY_LOCATION_RIGHT
= 0x02;
33 const unsigned long KEY_LOCATION_NUMPAD
= 0x03;
36 readonly attribute DOMString keyIdentifier
;
37 readonly attribute
unsigned long keyLocation
;
38 readonly attribute
boolean ctrlKey
;
39 readonly attribute
boolean shiftKey
;
40 readonly attribute
boolean altKey
;
41 readonly attribute
boolean metaKey
;
42 readonly attribute
boolean altGraphKey
;
44 #if
!defined
(LANGUAGE_JAVASCRIPT
)
45 boolean getModifierState
(in DOMString keyIdentifierArg
);
48 // FIXME: this does not match the version in the DOM spec.
49 void initKeyboardEvent
(in DOMString type
,
51 in boolean cancelable
,
53 in DOMString keyIdentifier
,
54 in unsigned long keyLocation
,
59 in boolean altGraphKey
);
62 #if
!defined
(LANGUAGE_JAVASCRIPT
)
63 readonly attribute
long keyCode
;
64 readonly attribute
long charCode
;
66 void initKeyboardEvent
(in DOMString type
,
68 in boolean cancelable
,
70 in DOMString keyIdentifier
,
71 in unsigned long keyLocation
,