[iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content...
[WebKit-https.git] / Source / WebCore / platform / ios / KeyEventCodesIOS.h
1 /*
2  * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #pragma once
27
28 #if TARGET_OS_IPHONE
29
30 // Unicodes we reserve for function keys on the keyboard,
31 // OpenStep reserves the range 0xF700-0xF8FF for this purpose.
32 // The availability of various keys will be system dependent.
33
34 enum {
35     NSUpArrowFunctionKey      = 0xF700,
36     NSDownArrowFunctionKey    = 0xF701,
37     NSLeftArrowFunctionKey    = 0xF702,
38     NSRightArrowFunctionKey   = 0xF703,
39     NSF1FunctionKey           = 0xF704,
40     NSF2FunctionKey           = 0xF705,
41     NSF3FunctionKey           = 0xF706,
42     NSF4FunctionKey           = 0xF707,
43     NSF5FunctionKey           = 0xF708,
44     NSF6FunctionKey           = 0xF709,
45     NSF7FunctionKey           = 0xF70A,
46     NSF8FunctionKey           = 0xF70B,
47     NSF9FunctionKey           = 0xF70C,
48     NSF10FunctionKey          = 0xF70D,
49     NSF11FunctionKey          = 0xF70E,
50     NSF12FunctionKey          = 0xF70F,
51     NSF13FunctionKey          = 0xF710,
52     NSF14FunctionKey          = 0xF711,
53     NSF15FunctionKey          = 0xF712,
54     NSF16FunctionKey          = 0xF713,
55     NSF17FunctionKey          = 0xF714,
56     NSF18FunctionKey          = 0xF715,
57     NSF19FunctionKey          = 0xF716,
58     NSF20FunctionKey          = 0xF717,
59     NSF21FunctionKey          = 0xF718,
60     NSF22FunctionKey          = 0xF719,
61     NSF23FunctionKey          = 0xF71A,
62     NSF24FunctionKey          = 0xF71B,
63     NSF25FunctionKey          = 0xF71C,
64     NSF26FunctionKey          = 0xF71D,
65     NSF27FunctionKey          = 0xF71E,
66     NSF28FunctionKey          = 0xF71F,
67     NSF29FunctionKey          = 0xF720,
68     NSF30FunctionKey          = 0xF721,
69     NSF31FunctionKey          = 0xF722,
70     NSF32FunctionKey          = 0xF723,
71     NSF33FunctionKey          = 0xF724,
72     NSF34FunctionKey          = 0xF725,
73     NSF35FunctionKey          = 0xF726,
74     NSInsertFunctionKey       = 0xF727,
75     NSDeleteFunctionKey       = 0xF728,
76     NSHomeFunctionKey         = 0xF729,
77     NSBeginFunctionKey        = 0xF72A,
78     NSEndFunctionKey          = 0xF72B,
79     NSPageUpFunctionKey       = 0xF72C,
80     NSPageDownFunctionKey     = 0xF72D,
81     NSPrintScreenFunctionKey  = 0xF72E,
82     NSScrollLockFunctionKey   = 0xF72F,
83     NSPauseFunctionKey        = 0xF730,
84     NSSysReqFunctionKey       = 0xF731,
85     NSBreakFunctionKey        = 0xF732,
86     NSResetFunctionKey        = 0xF733,
87     NSStopFunctionKey         = 0xF734,
88     NSMenuFunctionKey         = 0xF735,
89     NSUserFunctionKey         = 0xF736,
90     NSSystemFunctionKey       = 0xF737,
91     NSPrintFunctionKey        = 0xF738,
92     NSClearLineFunctionKey    = 0xF739,
93     NSClearDisplayFunctionKey = 0xF73A,
94     NSInsertLineFunctionKey   = 0xF73B,
95     NSDeleteLineFunctionKey   = 0xF73C,
96     NSInsertCharFunctionKey   = 0xF73D,
97     NSDeleteCharFunctionKey   = 0xF73E,
98     NSPrevFunctionKey         = 0xF73F,
99     NSNextFunctionKey         = 0xF740,
100     NSSelectFunctionKey       = 0xF741,
101     NSExecuteFunctionKey      = 0xF742,
102     NSUndoFunctionKey         = 0xF743,
103     NSRedoFunctionKey         = 0xF744,
104     NSFindFunctionKey         = 0xF745,
105     NSHelpFunctionKey         = 0xF746,
106     NSModeSwitchFunctionKey   = 0xF747
107 };
108
109 enum {
110     NSParagraphSeparatorCharacter = 0x2029,
111     NSLineSeparatorCharacter = 0x2028,
112     NSTabCharacter = 0x0009,
113     NSFormFeedCharacter = 0x000c,
114     NSNewlineCharacter = 0x000a,
115     NSCarriageReturnCharacter = 0x000d,
116     NSEnterCharacter = 0x0003,
117     NSBackspaceCharacter = 0x0008,
118     NSBackTabCharacter = 0x0019,
119     NSDeleteCharacter = 0x007f
120 };
121
122 #endif // TARGET_OS_IPHONE