docs.unity3d.com
    Show / Hide Table of Contents

    Enum AndroidKeyCode

    Enum used to identity the key in the Android key event. See buttons. See https://developer.android.com/reference/android/view/KeyEvent#constants_1 for more details.

    Namespace: UnityEngine.InputSystem.Android.LowLevel
    Syntax
    public enum AndroidKeyCode

    Fields

    Name Description Value
    Unknown

    Unknown key code.


    0
    SoftLeft

    Soft Left key. Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.


    1
    SoftRight

    Soft Right key. Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.


    2
    Home

    Home key. This key is handled by the framework and is never delivered to applications.


    3
    Back

    Back key.


    4
    Call

    Call key.


    5
    Endcall

    End Call key.


    6
    Alpha0

    '0' key.


    7
    Alpha1

    '1' key.


    8
    Alpha2

    '2' key.


    9
    Alpha3

    '3' key.


    10
    Alpha4

    '4' key.


    11
    Alpha5

    '5' key.


    12
    Alpha6

    '6' key.


    13
    Alpha7

    '7' key.


    14
    Alpha8

    '8' key.


    15
    Alpha9

    '9' key.


    16
    Star

    '*' key.


    17
    Pound

    '#' key.


    18
    DpadUp

    Directional Pad Up key. May also be synthesized from trackball motions.


    19
    DpadDown

    Directional Pad Down key. May also be synthesized from trackball motions.


    20
    DpadLeft

    Directional Pad Left key. May also be synthesized from trackball motions.


    21
    DpadRight

    Directional Pad Right key. May also be synthesized from trackball motions.


    22
    DpadCenter

    Directional Pad Center key. May also be synthesized from trackball motions.


    23
    VolumeUp

    Volume Up key. Adjusts the speaker volume up.


    24
    VolumeDown

    Volume Down key. Adjusts the speaker volume down.


    25
    Power

    Power key.


    26
    Camera

    Camera key. Used to launch a camera application or take pictures.


    27
    Clear

    Clear key.


    28
    A

    'A' key.


    29
    B

    'B' key.


    30
    C

    'C' key.


    31
    D

    'D' key.


    32
    E

    'E' key.


    33
    F

    'F' key.


    34
    G

    'G' key.


    35
    H

    'H' key.


    36
    I

    'I' key.


    37
    J

    'J' key.


    38
    K

    'K' key.


    39
    L

    'L' key.


    40
    M

    'M' key.


    41
    N

    'N' key.


    42
    O

    'O' key.


    43
    P

    'P' key.


    44
    Q

    'Q' key.


    45
    R

    'R' key.


    46
    S

    'S' key.


    47
    T

    'T' key.


    48
    U

    'U' key.


    49
    V

    'V' key.


    50
    W

    'W' key.


    51
    X

    'X' key.


    52
    Y

    'Y' key.


    53
    Z

    'Z' key.


    54
    Comma

    ',' key.


    55
    Period

    '.' key.


    56
    AltLeft

    Left Alt modifier key.


    57
    AltRight

    Right Alt modifier key.


    58
    ShiftLeft

    Left Shift modifier key.


    59
    ShiftRight

    Right Shift modifier key.


    60
    Tab

    Tab key.


    61
    Space

    Space key.


    62
    Sym

    Symbol modifier key. Used to enter alternate symbols.


    63
    Explorer

    Explorer special function key. Used to launch a browser application.


    64
    Envelope

    Envelope special function key. Used to launch a mail application.


    65
    Enter

    Enter key.


    66
    Del

    Backspace key. Deletes characters before the insertion point, unlike ForwardDel.


    67
    Grave

    '`' (backtick) key.


    68
    Minus

    '-' key.


    69
    Equals

    '=' key.


    70
    LeftBracket

    '[' key.


    71
    RightBracket

    ']' key.


    72
    Backslash

    '' key.


    73
    Semicolon

    ';' key.


    74
    Apostrophe

    ''' (apostrophe) key.


    75
    Slash

    '/' key.


    76
    At

    '@' key.


    77
    Num

    Number modifier key. Used to enter numeric symbols. This key is not Num Lock; it is more like AltLeft.


    78
    Headsethook

    Headset Hook key. Used to hang up calls and stop media.


    79
    Focus

    Camera Focus key. Used to focus the camera.


    80
    Plus

    '+' key.


    81
    Menu

    Menu key.


    82
    Notification

    Notification key.


    83
    Search

    Search key.


    84
    MediaPlayPause

    Play/Pause media key.


    85
    MediaStop

    Stop media key.


    86
    MediaNext

    Play Next media key.


    87
    MediaPrevious

    Play Previous media key.


    88
    MediaRewind

    Rewind media key.


    89
    MediaFastForward

    Fast Forward media key.


    90
    Mute

    Mute key. Mutes the microphone, unlike VolumeMute.


    91
    PageUp

    Page Up key.


    92
    PageDown

    Page Down key.


    93
    Pictsymbols

    Picture Symbols modifier key. Used to switch symbol sets (Emoji, Kao-moji).


    94
    SwitchCharset

    Switch Charset modifier key. Used to switch character sets (Kanji, Katakana).


    95
    ButtonA

    A Button key. On a game controller, the A button should be either the button labeled A or the first button on the bottom row of controller buttons.


    96
    ButtonB

    B Button key. On a game controller, the B button should be either the button labeled B or the second button on the bottom row of controller buttons.


    97
    ButtonC

    C Button key. On a game controller, the C button should be either the button labeled C or the third button on the bottom row of controller buttons.


    98
    ButtonX

    X Button key. On a game controller, the X button should be either the button labeled X or the first button on the upper row of controller buttons.


    99
    ButtonY

    Y Button key. On a game controller, the Y button should be either the button labeled Y or the second button on the upper row of controller buttons.


    100
    ButtonZ

    Z Button key. On a game controller, the Z button should be either the button labeled Z or the third button on the upper row of controller buttons.


    101
    ButtonL1

    L1 Button key. On a game controller, the L1 button should be either the button labeled L1 (or L) or the top left trigger button.


    102
    ButtonR1

    R1 Button key. On a game controller, the R1 button should be either the button labeled R1 (or R) or the top right trigger button.


    103
    ButtonL2

    L2 Button key. On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button.


    104
    ButtonR2

    R2 Button key. On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button.


    105
    ButtonThumbl

    Left Thumb Button key. On a game controller, the left thumb button indicates that the left (or only) joystick is pressed.


    106
    ButtonThumbr

    Right Thumb Button key. On a game controller, the right thumb button indicates that the right joystick is pressed.


    107
    ButtonStart

    Start Button key. On a game controller, the button labeled Start.


    108
    ButtonSelect

    Select Button key. On a game controller, the button labeled Select.


    109
    ButtonMode

    Mode Button key. On a game controller, the button labeled Mode.


    110
    Escape

    Escape key.


    111
    ForwardDel

    Forward Delete key. Deletes characters ahead of the insertion point, unlike Del.


    112
    CtrlLeft

    Left Control modifier key.


    113
    CtrlRight

    Right Control modifier key.


    114
    CapsLock

    Caps Lock key.


    115
    ScrollLock

    Scroll Lock key.


    116
    MetaLeft

    Left Meta modifier key.


    117
    MetaRight

    Right Meta modifier key.


    118
    Function

    Function modifier key.


    119
    Sysrq

    System Request / Print Screen key.


    120
    Break

    Break / Pause key.


    121
    MoveHome

    Home Movement key. Used for scrolling or moving the cursor around to the start of a line or to the top of a list.


    122
    MoveEnd

    End Movement key. Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list.


    123
    Insert

    Insert key. Toggles insert / overwrite edit mode.


    124
    Forward

    Forward key. Navigates forward in the history stack. Complement of Back.


    125
    MediaPlay

    Play media key.


    126
    MediaPause

    Play/Pause media key.


    127
    MediaClose

    Close media key. May be used to close a CD tray, for example.


    128
    MediaEject

    Eject media key. May be used to eject a CD tray, for example.


    129
    MediaRecord

    Record media key.


    130
    F1

    F1 key.


    131
    F2

    F2 key.


    132
    F3

    F3 key.


    133
    F4

    F4 key.


    134
    F5

    F5 key.


    135
    F6

    F6 key.


    136
    F7

    F7 key.


    137
    F8

    F8 key.


    138
    F9

    F9 key.


    139
    F10

    F10 key.


    140
    F11

    F11 key.


    141
    F12

    F12 key.


    142
    NumLock

    Num Lock key. This is the Num Lock key; it is different from Num. This key alters the behavior of other keys on the numeric keypad.


    143
    Numpad0

    Numeric keypad '0' key.


    144
    Numpad1

    Numeric keypad '1' key.


    145
    Numpad2

    Numeric keypad '2' key.


    146
    Numpad3

    Numeric keypad '3' key.


    147
    Numpad4

    Numeric keypad '4' key.


    148
    Numpad5

    Numeric keypad '5' key.


    149
    Numpad6

    'Numeric keypad '6' key.


    150
    Numpad7

    'Numeric keypad '7' key.


    151
    Numpad8

    Numeric keypad '8' key.


    152
    Numpad9

    Numeric keypad '9' key.


    153
    NumpadDivide

    Numeric keypad '/' key (for division).


    154
    NumpadMultiply

    Numeric keypad '*' key (for multiplication).


    155
    NumpadSubtract

    Numeric keypad '-' key (for subtraction).


    156
    NumpadAdd

    Numeric keypad '+' key (for addition).


    157
    NumpadDot

    Numeric keypad '.' key (for decimals or digit grouping).


    158
    NumpadComma

    Numeric keypad ',' key (for decimals or digit grouping).


    159
    NumpadEnter

    Numeric keypad Enter key.


    160
    NumpadEquals

    Numeric keypad '=' key.


    161
    NumpadLeftParen

    Numeric keypad '(' key.


    162
    NumpadRightParen

    Numeric keypad ')' key.


    163
    VolumeMute

    Volume Mute key. Mutes the speaker, unlike Mute. This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volum


    164
    Info

    Info key. Common on TV remotes to show additional information related to what is currently being viewed.


    165
    ChannelUp

    Channel up key. On TV remotes, increments the television channel.


    166
    ChannelDown

    Channel down key. On TV remotes, increments the television channel.


    167
    ZoomIn

    Zoom in key.


    168
    ZoomOut

    Zoom out key.


    169
    Tv

    TV key. On TV remotes, switches to viewing live TV.


    170
    Window

    Window key. On TV remotes, toggles picture-in-picture mode or other windowing functions. On Android Wear devices, triggers a display offset.


    171
    Guide

    Guide key. On TV remotes, shows a programming guide.


    172
    Dvr

    DVR key. On some TV remotes, switches to a DVR mode for recorded shows.


    173
    Bookmark

    Bookmark key. On some TV remotes, bookmarks content or web pages.


    174
    Captions

    Toggle captions key. Switches the mode for closed-captioning text, for example during television shows.


    175
    Settings

    Settings key. Starts the system settings activity.


    176
    TvPower

    TV power key. On HDMI TV panel devices and Android TV devices that don't support HDMI, toggles the power state of the device. On HDMI source devices, toggles the power state of the HDMI-connected TV via HDMI-CEC and makes the source device follow this power state.


    177
    TvInput

    TV input key. On TV remotes, switches the input on a television screen.


    178
    StbPower

    Set-top-box power key. On TV remotes, toggles the power on an external Set-top-box.


    179
    StbInput

    Set-top-box input key. On TV remotes, switches the input mode on an external Set-top-box.


    180
    AvrPower

    A/V Receiver power key. On TV remotes, toggles the power on an external A/V Receiver.


    181
    AvrInput

    A/V Receiver input key. On TV remotes, switches the input mode on an external A/V Receive


    182
    ProgRed

    Red "programmable" key. On TV remotes, acts as a contextual/programmable key.


    183
    ProgGreen

    Green "programmable" key. On TV remotes, actsas a contextual/programmable key.


    184
    ProgYellow

    Yellow "programmable" key. On TV remotes, actsas a contextual/programmable key.


    185
    ProgBlue

    Blue "programmable" key. On TV remotes, actsas a contextual/programmable key.


    186
    AppSwitch

    App switch key. Should bring up the application switcher dialog.


    187
    Button1

    Generic Game Pad Button #1.


    188
    Button2

    Generic Game Pad Button #2.


    189
    Button3

    Generic Game Pad Button #3.


    190
    Button4

    Generic Game Pad Button #4.


    191
    Button5

    Generic Game Pad Button #5.


    192
    Button6

    Generic Game Pad Button #6.


    193
    Button7

    Generic Game Pad Button #7.


    194
    Button8

    Generic Game Pad Button #8.


    195
    Button9

    Generic Game Pad Button #9.


    196
    Button10

    Generic Game Pad Button #10.


    197
    Button11

    Generic Game Pad Button #11.


    198
    Button12

    Generic Game Pad Button #12.


    199
    Button13

    Generic Game Pad Button #13.


    200
    Button14

    Generic Game Pad Button #14.


    201
    Button15

    Generic Game Pad Button #15.


    202
    Button16

    Generic Game Pad Button #16.


    203
    LanguageSwitch

    Language Switch key. Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard. On some devices, the same function may be performed by pressing Shift+Spacebar.


    204
    MannerMode

    'Manner Mode key. Toggles silent or vibrate mode on and off to make the device behave more politely in certain settings such as on a crowded train. On some devices, the key may only operate when long-pressed.


    205
    Mode3D

    3D Mode key. Toggles the display between 2D and 3D mode.


    206
    Contacts

    Contacts special function key. Used to launch an address book application.


    207
    Calendar

    Calendar special function key. Used to launch a calendar application.


    208
    Music

    Music special function key. Used to launch a music player application.


    209
    Calculator

    Calculator special function key. Used to launch a calculator application.


    210
    ZenkakuHankaku

    Japanese full-width / half-width key.


    211
    Eisu

    Japanese alphanumeric key.


    212
    Muhenkan

    Japanese non-conversion key.


    213
    Henkan

    Japanese conversion key.


    214
    KatakanaHiragana

    Japanese katakana / hiragana key.


    215
    Yen

    Japanese Yen key.


    216
    Ro

    Japanese Ro key.


    217
    Kana

    Japanese kana key.


    218
    Assist

    Assist key. Launches the global assist activity. Not delivered to applications.


    219
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023