Lines Matching refs:keyEvent
55 import android.view.KeyEvent;
187 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_TV_INPUT);
188 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MENU);
189 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_UP);
190 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_DOWN);
191 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_UP);
192 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_DOWN);
193 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_MUTE);
194 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MUTE);
195 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_SEARCH);
196 BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_WINDOW);
471 if (event instanceof KeyEvent) {
472 KeyEvent keyEvent = (KeyEvent) event;
473 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN && keyEvent.isLongPress()) {
474 if (onKeyLongPress(keyEvent.getKeyCode(), keyEvent)) {
478 if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
479 return onKeyUp(keyEvent.getKeyCode(), keyEvent);
480 } else if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
481 return onKeyDown(keyEvent.getKeyCode(), keyEvent);
1289 public boolean dispatchKeyEvent(KeyEvent event) {
1294 if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
1295 if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
1301 if (event.getAction() == KeyEvent.ACTION_UP) {
1313 || KeyEvent.isGamepadButton(event.getKeyCode())) {
1885 public boolean onKeyDown(int keyCode, KeyEvent event) {
1908 case KeyEvent.KEYCODE_CHANNEL_UP:
1909 case KeyEvent.KEYCODE_DPAD_UP:
1920 case KeyEvent.KEYCODE_CHANNEL_DOWN:
1921 case KeyEvent.KEYCODE_DPAD_DOWN:
1938 public boolean onKeyUp(int keyCode, KeyEvent event) {
1958 if (event.getKeyCode() == KeyEvent.KEYCODE_SEARCH) {
1975 if (keyCode == KeyEvent.KEYCODE_BACK) {
1981 if (keyCode == KeyEvent.KEYCODE_BACK) {
1992 case KeyEvent.KEYCODE_CHANNEL_UP:
1993 case KeyEvent.KEYCODE_DPAD_UP:
1994 case KeyEvent.KEYCODE_CHANNEL_DOWN:
1995 case KeyEvent.KEYCODE_DPAD_DOWN:
1996 case KeyEvent.KEYCODE_NUMPAD_ENTER:
1997 case KeyEvent.KEYCODE_DPAD_CENTER:
1998 case KeyEvent.KEYCODE_E:
1999 case KeyEvent.KEYCODE_MENU:
2009 case KeyEvent.KEYCODE_DPAD_RIGHT:
2034 case KeyEvent.KEYCODE_WINDOW:
2037 case KeyEvent.KEYCODE_ENTER:
2038 case KeyEvent.KEYCODE_NUMPAD_ENTER:
2039 case KeyEvent.KEYCODE_E:
2040 case KeyEvent.KEYCODE_DPAD_CENTER:
2041 case KeyEvent.KEYCODE_MENU:
2049 if (keyCode != KeyEvent.KEYCODE_MENU) {
2053 if (keyCode != KeyEvent.KEYCODE_E) {
2057 case KeyEvent.KEYCODE_CHANNEL_UP:
2058 case KeyEvent.KEYCODE_DPAD_UP:
2059 case KeyEvent.KEYCODE_CHANNEL_DOWN:
2060 case KeyEvent.KEYCODE_DPAD_DOWN:
2063 case KeyEvent.KEYCODE_S:
2068 case KeyEvent.KEYCODE_CAPTIONS: {
2072 case KeyEvent.KEYCODE_A:
2077 case KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK: {
2081 case KeyEvent.KEYCODE_INFO: {
2085 case KeyEvent.KEYCODE_MEDIA_RECORD:
2086 case KeyEvent.KEYCODE_V: {
2130 if (keyCode == KeyEvent.KEYCODE_WINDOW) {
2137 case KeyEvent.KEYCODE_W:
2155 case KeyEvent.KEYCODE_CTRL_LEFT:
2156 case KeyEvent.KEYCODE_CTRL_RIGHT:
2159 case KeyEvent.KEYCODE_O:
2162 case KeyEvent.KEYCODE_D:
2171 public boolean onKeyLongPress(int keyCode, KeyEvent event) {
2176 if (keyCode == KeyEvent.KEYCODE_BACK) {
2241 private boolean dispatchKeyEventToSession(final KeyEvent event) {
2250 if ((event.getKeyCode() == KeyEvent.KEYCODE_BACK
2251 || event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_B) && mNeedShowBackKeyGuide) {
2252 // KeyEvent.KEYCODE_BUTTON_B is also used like the back button.