Available Methods
- KEYCODE_BACK
- getAction ( )
- ACTION_DOWN
- getKeyCode ( )
- KEYCODE_MENU
- KEYCODE_VOLUME_DOWN
- KEYCODE_VOLUME_UP
- ACTION_UP
- KEYCODE_DPAD_LEFT
- KEYCODE_DPAD_RIGHT
- KEYCODE_ENTER
- getRepeatCount ( )
- KEYCODE_DPAD_DOWN
- KEYCODE_DPAD_UP
- KEYCODE_MEDIA_PLAY_PAUSE
- KEYCODE_DPAD_CENTER
- KEYCODE_DEL
- KEYCODE_HEADSETHOOK
- KEYCODE_TAB
- KEYCODE_MEDIA_PLAY
- KEYCODE_MEDIA_PAUSE
- KEYCODE_MEDIA_STOP
- KEYCODE_MEDIA_NEXT
- KEYCODE_ENDCALL
- KEYCODE_SPACE
- KEYCODE_SEARCH
- KEYCODE_MEDIA_PREVIOUS
- KEYCODE_VOLUME_MUTE
- startTracking ( )
- KEYCODE_CALL
- KEYCODE_6 ( )
- isTracking ( )
- isCanceled ( )
- getEventTime ( )
- KEYCODE_3 ( )
- hasNoModifiers ( )
- KEYCODE_PAGE_DOWN
- KEYCODE_HOME
- KEYCODE_4 ( )
- KEYCODE_CAMERA
- KEYCODE_1 ( )
- KEYCODE_9 ( )
- isAltPressed ( )
- KEYCODE_8 ( )
- KEYCODE_2 ( )
- dispatch ( )
- isCtrlPressed ( )
- KEYCODE_FOCUS
- KEYCODE_ESCAPE
- META_ALT_ON
- META_SHIFT_ON
- KEYCODE_MEDIA_REWIND
- KEYCODE_0 ( )
- KEYCODE_MEDIA_FAST_FORWARD
- Callback ( )
- getUnicodeChar ( )
- KEYCODE_7 ( )
- getScanCode ( )
- KEYCODE_PAGE_UP
- KEYCODE_5 ( )
- metaStateHasNoModifiers ( )
- isShiftPressed ( )
- KEYCODE_A
- getMetaState ( )
- ACTION_MULTIPLE
- hasModifiers ( )
- KEYCODE_MOVE_HOME
- KEYCODE_BUTTON_L1 ( )
- KEYCODE_BUTTON_Y
- KEYCODE_MINUS
- getFlags ( )
- isLongPress ( )
- KEYCODE_BUTTON_B
- KEYCODE_BUTTON_R1 ( )
- KEYCODE_SHIFT_RIGHT
- KEYCODE_Z
- KEYCODE_BUTTON_A
- KEYCODE_NUMPAD_ENTER
- isModifierKey ( )
- KEYCODE_ALT_RIGHT
- KEYCODE_MOVE_END
- KEYCODE_PLUS
- KEYCODE_P
- getSource ( )
- KEYCODE_UNKNOWN
- getKeyData ( )
- KEYCODE_F
- KEYCODE_BUTTON_L2 ( )
- DispatcherState ( )
- KEYCODE_SYM
- KEYCODE_S
- META_ALT_LEFT_ON
- META_META_ON
- FLAG_FROM_SYSTEM
- KEYCODE_EQUALS
- isGamepadButton ( )
- KEYCODE_R
- getDeviceId ( )
- KEYCODE_T
- getDownTime ( )
- changeAction ( )
- KEYCODE_FORWARD_DEL
- KEYCODE_W
- KEYCODE_TV_INPUT
- KEYCODE_Y
- META_SYM_ON
- KEYCODE_POWER
- KEYCODE_MUTE
- KEYCODE_X
- KEYCODE_ALT_LEFT
- META_CTRL_ON
- KEYCODE_BUTTON_X
- KEYCODE_SHIFT_LEFT
- KEYCODE_APP_SWITCH
- getNumber ( )
- KEYCODE_MEDIA_EJECT
- KEYCODE_ZOOM_IN
- KEYCODE_O
- KEYCODE_NUM
- KEYCODE_NUMPAD_8 ( )
- keyCodeToString ( )
- KEYCODE_SOFT_LEFT
- isNumLockOn ( )
- getCharacters ( )
- KEYCODE_G
- KEYCODE_NUMPAD_2 ( )
- KEYCODE_BUTTON_R2 ( )
- KEYCODE_D
- KEYCODE_V
- KEYCODE_NUMPAD_5 ( )
- KEYCODE_DPAD_UP_LEFT
- KEYCODE_BOOKMARK
- META_ALT_RIGHT_ON
- KEYCODE_C
- KEYCODE_STB_INPUT
- KEYCODE_F3 ( )
- isConfirmKey ( )
- KEYCODE_NUMPAD_1 ( )
Related Classes
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.os.Handler
- android.net.Uri
- android.widget.Button
- android.text.TextUtils
- android.view.MotionEvent
- android.graphics.drawable.Drawable
- android.widget.LinearLayout
- android.widget.EditText
- android.content.SharedPreferences
- android.support.annotation.NonNull
- android.annotation.SuppressLint
- android.content.DialogInterface
Java Code Examples for android.view.KeyEvent#KEYCODE_NUM
The following examples show how to use
android.view.KeyEvent#KEYCODE_NUM .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetaKeyKeyListener.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
/** * Handles presses of the meta keys. */ public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { press(content, CAP); return true; } if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_NUM) { press(content, ALT); return true; } if (keyCode == KeyEvent.KEYCODE_SYM) { press(content, SYM); return true; } return false; // no super to call through to }
Example 2
Source File: MetaKeyKeyListener.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
/** * Handles release of the meta keys. */ public boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { release(content, CAP, event); return true; } if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_NUM) { release(content, ALT, event); return true; } if (keyCode == KeyEvent.KEYCODE_SYM) { release(content, SYM, event); return true; } return false; // no super to call through to }
Example 3
Source File: MetaKeyKeyListener.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
/** * Handles presses of the meta keys. */ public static long handleKeyDown(long state, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { return press(state, META_SHIFT_ON, META_SHIFT_MASK, META_CAP_LOCKED, META_CAP_PRESSED, META_CAP_RELEASED, META_CAP_USED); } if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_NUM) { return press(state, META_ALT_ON, META_ALT_MASK, META_ALT_LOCKED, META_ALT_PRESSED, META_ALT_RELEASED, META_ALT_USED); } if (keyCode == KeyEvent.KEYCODE_SYM) { return press(state, META_SYM_ON, META_SYM_MASK, META_SYM_LOCKED, META_SYM_PRESSED, META_SYM_RELEASED, META_SYM_USED); } return state; }
Example 4
Source File: MetaKeyKeyListener.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
/** * Handles release of the meta keys. */ public static long handleKeyUp(long state, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { return release(state, META_SHIFT_ON, META_SHIFT_MASK, META_CAP_PRESSED, META_CAP_RELEASED, META_CAP_USED, event); } if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_NUM) { return release(state, META_ALT_ON, META_ALT_MASK, META_ALT_PRESSED, META_ALT_RELEASED, META_ALT_USED, event); } if (keyCode == KeyEvent.KEYCODE_SYM) { return release(state, META_SYM_ON, META_SYM_MASK, META_SYM_PRESSED, META_SYM_RELEASED, META_SYM_USED, event); } return state; }
Example 5
Source File: InputConnectionHacker.java From 920-text-editor-v2 with Apache License 2.0 | 5 votes |
@Override public boolean sendKeyEvent(KeyEvent event) { int keyCode = event.getKeyCode(); if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT || keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT) { isShiftPressed = event.getAction() == KeyEvent.ACTION_DOWN; } else if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_NUM) { isAltPressed = event.getAction() == KeyEvent.ACTION_DOWN; } else if (keyCode == KeyEvent.KEYCODE_SYM) { isSymPressed = event.getAction() == KeyEvent.ACTION_DOWN; } else if (keyCode == KeyEvent.KEYCODE_CTRL_LEFT || keyCode == KeyEvent.KEYCODE_CTRL_RIGHT) { isCtrlPressed = event.getAction() == KeyEvent.ACTION_DOWN; } return ic.sendKeyEvent(event); }