Lines Matching refs:key
239 * Sends a series of key events through instrumentation and waits for idle. The sequence
240 * of keys is a string containing the key names as specified in KeyEvent, without the
241 * KEYCODE_ prefix. For instance: sendKeys("DPAD_LEFT A B C DPAD_CENTER"). Each key can
254 String key = keys[i];
255 int repeater = key.indexOf('*');
259 keyCount = repeater == -1 ? 1 : Integer.parseInt(key.substring(0, repeater));
261 Log.w("ActivityTestCase", "Invalid repeat count: " + key);
266 key = key.substring(repeater + 1);
271 final Field keyCodeField = KeyEvent.class.getField("KEYCODE_" + key);
281 Log.w("ActivityTestCase", "Unknown keycode: KEYCODE_" + key);
284 Log.w("ActivityTestCase", "Unknown keycode: KEYCODE_" + key);
294 * Sends a series of key events through instrumentation and waits for idle. For instance:
297 * @param keys The series of key codes to send through instrumentation.
317 * Sends a series of key events through instrumentation and waits for idle. Each key code
318 * must be preceded by the number of times the key code must be sent. For instance:
321 * @param keys The series of key repeats and codes to send through instrumentation.