diff options
| author | Michael Wright <michaelwr@google.com> | 2015-11-26 16:04:54 +0000 |
|---|---|---|
| committer | Michael Wright <michaelwr@google.com> | 2015-12-14 17:30:25 -0500 |
| commit | aa1a94daaa59e98303fdeb1c3066b60a58755dff (patch) | |
| tree | 6a6bd2afca5e179dbc9776b9cc106ce204a8ced7 /core/java/android/view/KeyEvent.java | |
| parent | 8d19ad443face8b862ac0a3cac095070a5ac9ad0 (diff) | |
Make KEYCODE_SPACE a confirm key.
By default space should "click" the focused item. This behavior also
applies to GridView and ListView if the items are clickable, but will
continue the previous behavior of scrolling if it's just a list of
items you can't really interact with.
Change-Id: Ic3a0334614d1dc68ff98bc4b1fb1ae2f961f71af
Diffstat (limited to 'core/java/android/view/KeyEvent.java')
| -rw-r--r-- | core/java/android/view/KeyEvent.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java index 55cf56ff7c9f..f037958f5cfc 100644 --- a/core/java/android/view/KeyEvent.java +++ b/core/java/android/view/KeyEvent.java @@ -1779,6 +1779,7 @@ public class KeyEvent extends InputEvent implements Parcelable { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: + case KeyEvent.KEYCODE_SPACE: return true; default: return false; |
