summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/UIEvents/KeyboardEvent.idl
blob: e6685ca795c37c2e5c463fc4bed929b6bd7ed6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#import <UIEvents/EventModifier.idl>

[Exposed=Window]
interface KeyboardEvent : UIEvent {

    constructor(DOMString type, optional KeyboardEventInit eventInitDict = {});

    // KeyLocationCode
    const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
    const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
    const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
    const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;

    readonly attribute DOMString key;
    readonly attribute DOMString code;
    readonly attribute unsigned long location;

    readonly attribute boolean ctrlKey;
    readonly attribute boolean shiftKey;
    readonly attribute boolean altKey;
    readonly attribute boolean metaKey;

    readonly attribute boolean repeat;
    readonly attribute boolean isComposing;

    readonly attribute unsigned long charCode;
    readonly attribute unsigned long keyCode;

    boolean getModifierState(DOMString keyArg);

};

dictionary KeyboardEventInit : EventModifierInit {
    DOMString key = "";
    DOMString code = "";
    unsigned long location = 0;
    boolean repeat = false;
    boolean isComposing = false;
    unsigned long charCode = 0;
    unsigned long keyCode = 0;
};