Lines Matching refs:keyCode
78 public boolean onKeyDown(int keyCode, KeyEvent event) {
79 if (!weWantThisKeyCode(keyCode)) {
80 return super.onKeyDown(keyCode, event);
82 switch (keyCode) {
93 keyCodeToQuakeCode(keyCode));
98 public boolean onKeyUp(int keyCode, KeyEvent event) {
99 if (!weWantThisKeyCode(keyCode)) {
100 return super.onKeyUp(keyCode, event);
102 switch (keyCode) {
112 keyCodeToQuakeCode(keyCode));
125 private boolean weWantThisKeyCode(int keyCode) {
126 return (keyCode != KeyEvent.KEYCODE_VOLUME_UP) &&
127 (keyCode != KeyEvent.KEYCODE_VOLUME_DOWN) &&
128 (keyCode != KeyEvent.KEYCODE_SEARCH);
137 private int keyCodeToQuakeCode(int keyCode) {
143 key = sKeyCodeToQuakeCodeAlt[keyCode];
145 key = sKeyCodeToQuakeCodeShift[keyCode];
147 key = sKeyCodeToQuakeCode[keyCode];
151 key = sKeyCodeToQuakeCodeShift[keyCode];
153 key = sKeyCodeToQuakeCode[keyCode];
156 key = sKeyCodeToQuakeCode[keyCode];
164 public void queueKeyEvent(final int type, final int keyCode) {
168 mQuakeLib.event(type, keyCode);