1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 package com.nokia.mj.impl.uitestutils; |
|
19 |
|
20 public class KeyFactory |
|
21 { |
|
22 |
|
23 public static Key RIGHT_ARROW = new Key(Key.RightArrow); |
|
24 public static Key LEFT_ARROW = new Key(Key.LeftArrow); |
|
25 public static Key UP_ARROW = new Key(Key.UpArrow); |
|
26 public static Key DOWN_ARROW = new Key(Key.DownArrow); |
|
27 public static Key LEFTUP_ARROW = new Key(Key.EStdKeyDevice10); |
|
28 public static Key RIGHTUP_ARROW = new Key(Key.EStdKeyDevice11); |
|
29 public static Key RIGHTDOWN_ARROW = new Key(Key.EStdKeyDevice12); |
|
30 public static Key LEFTDOWN_ARROW = new Key(Key.EStdKeyDevice13); |
|
31 |
|
32 public static Key SELECT_KEY = new Key(Key.Select); |
|
33 public static Key SK1 = new Key(Key.CBA1); |
|
34 public static Key SK2 = new Key(Key.CBA2); |
|
35 |
|
36 public static Key KEYPAD_0 = new Key(Key.EStdKeyNkp0); |
|
37 public static Key KEYPAD_1 = new Key(Key.EStdKeyNkp1); |
|
38 public static Key KEYPAD_2 = new Key(Key.EStdKeyNkp2); |
|
39 public static Key KEYPAD_3 = new Key(Key.EStdKeyNkp3); |
|
40 public static Key KEYPAD_4 = new Key(Key.EStdKeyNkp4); |
|
41 public static Key KEYPAD_5 = new Key(Key.EStdKeyNkp5); |
|
42 public static Key KEYPAD_6 = new Key(Key.EStdKeyNkp6); |
|
43 public static Key KEYPAD_7 = new Key(Key.EStdKeyNkp7); |
|
44 public static Key KEYPAD_8 = new Key(Key.EStdKeyNkp8); |
|
45 public static Key KEYPAD_9 = new Key(Key.EStdKeyNkp9); |
|
46 |
|
47 public static Key F1 = new Key(Key.EKeyF1); |
|
48 public static Key F2 = new Key(Key.EKeyF2); |
|
49 public static Key F3 = new Key(Key.EKeyF3); |
|
50 public static Key F4 = new Key(Key.EKeyF4); |
|
51 public static Key F5 = new Key(Key.EKeyF5); |
|
52 public static Key F6 = new Key(Key.EKeyF6); |
|
53 public static Key F7 = new Key(Key.EKeyF7); |
|
54 public static Key F8 = new Key(Key.EKeyF8); |
|
55 public static Key F9 = new Key(Key.EKeyF9); |
|
56 public static Key F10 = new Key(Key.EKeyF10); |
|
57 public static Key F11 = new Key(Key.EKeyF11); |
|
58 public static Key F12 = new Key(Key.EKeyF12); |
|
59 public static Key F13 = new Key(Key.EKeyF13); |
|
60 public static Key F14 = new Key(Key.EKeyF14); |
|
61 public static Key F15 = new Key(Key.EKeyF15); |
|
62 |
|
63 public static Key BACKSPACE = new Key(Key.Backspace); |
|
64 public static Key ENTER = new Key(Key.EKeyEnter); |
|
65 public static Key ESCAPE = new Key(Key.EKeyEscape); |
|
66 public static Key TAB = new Key(Key.EKeyTab); |
|
67 public static Key CTRL_RIGHT = new Key(Key.EStdKeyRightCtrl); |
|
68 public static Key CTRL_LEFT = new Key(Key.EStdKeyLeftCtrl); |
|
69 public static Key SHIFT_RIGHT = new Key(Key.EStdKeyRightShift); |
|
70 public static Key SHIFT_LEFT = new Key(Key.EStdKeyLeftShift); |
|
71 public static Key SPACE = new Key(Key.EStdKeySpace); |
|
72 public static Key DEL = new Key(Key.EKeyDelete); |
|
73 |
|
74 public static Key STAR = new Key('*'); |
|
75 public static Key DIVIDE = new Key(Key.EStdKeyNkpForwardSlash); |
|
76 public static Key ADD = new Key(Key.EStdKeyNkpPlus); |
|
77 public static Key SUBTRACT = new Key(Key.EStdKeyNkpMinus); |
|
78 public static Key HASH = new Key('#'); |
|
79 public static Key CLEAR = new Key(Key.EStdKeyBackspace); |
|
80 public static Key EDIT = new Key(Key.EStdKeyRightShift); |
|
81 public static Key SEND = new Key(Key.EStdKeyYes); |
|
82 public static Key END = new Key(Key.EStdKeyNo); |
|
83 public static Key APPLICATIONS = new Key(Key.EStdKeyApplication0); |
|
84 public static Key VOICE = new Key(Key.EStdKeyDevice6); |
|
85 public static Key SOFTKEY_1 = new Key(Key.EStdKeyDevice0); |
|
86 public static Key SOFTKEY_2 = new Key(Key.EStdKeyDevice1); |
|
87 |
|
88 public static Key key(int keyCode) |
|
89 { |
|
90 return new Key(keyCode); |
|
91 } |
|
92 } |
|