If the window manager does not support _NET_ACTIVE_WINDOW, fall back to XGetInputFocus
[mono.git] / mcs / class / WindowsBase / System.Windows.Input / Key.cs
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 // 
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 // 
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
21 //
22 // Authors:
23 //      Chris Toshok (toshok@ximian.com)
24 //
25
26 using System;
27 using System.ComponentModel;
28 using System.Windows.Markup;
29
30 namespace System.Windows.Input {
31
32         [ValueSerializer (typeof (KeyValueSerializer))]
33         [TypeConverter (typeof (KeyConverter))]
34         public enum Key
35         {
36                 None,
37                 Cancel,
38                 Back,
39                 Tab,
40                 LineFeed,
41                 Clear,
42                 Return,
43                 Enter = Return,
44                 Pause,
45                 CapsLock,
46                 Capital = CapsLock,
47                 HangulMode,
48                 KanaMode = HangulMode,
49                 JunjaMode,
50                 FinalMode,
51                 KanjiMode,
52                 HanjaMode = KanjiMode,
53                 Escape,
54                 ImeConvert,
55                 ImeNonConvert,
56                 ImeAccept,
57                 ImeModeChange,
58                 Space,
59                 PageUp,
60                 Prior = PageUp,
61                 PageDown,
62                 Next = PageDown,
63                 End,
64                 Home,
65                 Left,
66                 Up,
67                 Right,
68                 Down,
69                 Select,
70                 Print,
71                 Execute,
72                 PrintScreen,
73                 Snapshot = PrintScreen,
74                 Insert,
75                 Delete,
76                 Help,
77                 D0,
78                 D1,
79                 D2,
80                 D3,
81                 D4,
82                 D5,
83                 D6,
84                 D7,
85                 D8,
86                 D9,
87                 A,
88                 B,
89                 C,
90                 D,
91                 E,
92                 F,
93                 G,
94                 H,
95                 I,
96                 J,
97                 K,
98                 L,
99                 M,
100                 N,
101                 O,
102                 P,
103                 Q,
104                 R,
105                 S,
106                 T,
107                 U,
108                 V,
109                 W,
110                 X,
111                 Y,
112                 Z,
113                 LWin,
114                 RWin,
115                 Apps,
116                 Sleep,
117                 NumPad0,
118                 NumPad1,
119                 NumPad2,
120                 NumPad3,
121                 NumPad4,
122                 NumPad5,
123                 NumPad6,
124                 NumPad7,
125                 NumPad8,
126                 NumPad9,
127                 Multiply,
128                 Add,
129                 Separator,
130                 Subtract,
131                 Decimal,
132                 Divide,
133                 F1,
134                 F2,
135                 F3,
136                 F4,
137                 F5,
138                 F6,
139                 F7,
140                 F8,
141                 F9,
142                 F10,
143                 F11,
144                 F12,
145                 F13,
146                 F14,
147                 F15,
148                 F16,
149                 F17,
150                 F18,
151                 F19,
152                 F20,
153                 F21,
154                 F22,
155                 F23,
156                 F24,
157                 NumLock,
158                 Scroll,
159                 LeftShift,
160                 RightShift,
161                 LeftCtrl,
162                 RightCtrl,
163                 LeftAlt,
164                 RightAlt,
165                 BrowserBack,
166                 BrowserForward,
167                 BrowserRefresh,
168                 BrowserStop,
169                 BrowserSearch,
170                 BrowserFavorites,
171                 BrowserHome,
172                 VolumeMute,
173                 VolumeDown,
174                 VolumeUp,
175                 MediaNextTrack,
176                 MediaPreviousTrack,
177                 MediaStop,
178                 MediaPlayPause,
179                 LaunchMail,
180                 SelectMedia,
181                 LaunchApplication1,
182                 LaunchApplication2,
183                 Oem1,
184                 OemSemicolon = Oem1,
185                 OemPlus,
186                 OemComma,
187                 OemMinus,
188                 OemPeriod,
189                 Oem2,
190                 OemQuestion = Oem2,
191                 Oem3,
192                 OemTilde = Oem3,
193                 AbntC1,
194                 AbntC2,
195                 Oem4,
196                 OemOpenBrackets = Oem4,
197                 Oem5,
198                 OemPipe = Oem5,
199                 Oem6,
200                 OemCloseBrackets = Oem6,
201                 Oem7,
202                 OemQuotes = Oem7,
203                 Oem8,
204                 Oem102,
205                 OemBackslash = Oem102,
206                 ImeProcessed,
207                 System,
208                 OemAttn,
209                 DbeAlphanumeric = OemAttn,
210                 OemFinish,
211                 DbeKatakana = OemFinish,
212                 OemCopy,
213                 DbeHiragana = OemCopy,
214                 OemAuto,
215                 DbeSbcsChar = OemAuto,
216                 OemEnlw,
217                 DbeDbcsChar = OemEnlw,
218                 OemBackTab,
219                 DbeRoman = OemBackTab,
220                 Attn,
221                 DbeNoRoman = Attn,
222                 CrSel,
223                 DbeEnterWordRegisterMode = CrSel,
224                 ExSel,
225                 DbeEnterImeConfigureMode = ExSel,
226                 EraseEof,
227                 DbeFlushString = EraseEof,
228                 Play,
229                 DbeCodeInput = Play,
230                 Zoom,
231                 DbeNoCodeInput = Zoom,
232                 NoName,
233                 DbeDetermineString = NoName,
234                 Pa1,
235                 DbeEnterDialogConversionMode = Pa1,
236                 OemClear
237         }
238 }