Key
expect value class Key(val keyCode: Long)
Represents keys on a keyboard.
Parameters
keyCode | a Long value representing the key pressed. Note: This keycode can be used to uniquely identify a hardware key. It is different from the native keycode. |
Companion Object
Properties
val Unknown: Key
Unknown key.
val SoftLeft: Key
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.
val SoftRight: Key
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.
val Home: Key
Home key.
This key is handled by the framework and is never delivered to applications.
val Back: Key
Back key.
val Help: Key
Help key.
val NavigatePrevious: Key
Navigate to previous key.
Goes backward by one item in an ordered collection of items.
val NavigateNext: Key
Navigate to next key.
Advances to the next item in an ordered collection of items.
val NavigateIn: Key
Navigate in key.
Activates the item that currently has focus or expands to the next level of a navigation hierarchy.
val NavigateOut: Key
Navigate out key.
Backs out one level of a navigation hierarchy or collapses the item that currently has focus.
val SystemNavigationUp: Key
Consumed by the system for navigation up.
val SystemNavigationDown: Key
Consumed by the system for navigation down.
val SystemNavigationLeft: Key
Consumed by the system for navigation left.
val SystemNavigationRight: Key
Consumed by the system for navigation right.
val Call: Key
Call key.
val EndCall: Key
End Call key.
val DirectionUp: Key
Up Arrow Key / Directional Pad Up key.
May also be synthesized from trackball motions.
val DirectionDown: Key
Down Arrow Key / Directional Pad Down key.
May also be synthesized from trackball motions.
val DirectionLeft: Key
Left Arrow Key / Directional Pad Left key.
May also be synthesized from trackball motions.
val DirectionRight: Key
Right Arrow Key / Directional Pad Right key.
May also be synthesized from trackball motions.
val DirectionCenter: Key
Center Arrow Key / Directional Pad Center key.
May also be synthesized from trackball motions.
val DirectionUpLeft: Key
Directional Pad Up-Left.
val DirectionDownLeft: Key
Directional Pad Down-Left.
val DirectionUpRight: Key
Directional Pad Up-Right.
val DirectionDownRight: Key
Directional Pad Down-Right.
val VolumeUp: Key
Volume Up key.
Adjusts the speaker volume up.
val VolumeDown: Key
Volume Down key.
Adjusts the speaker volume down.
val Power: Key
Power key.
val Camera: Key
Camera key.
Used to launch a camera application or take pictures.
val Clear: Key
Clear key.
val Zero: Key
'0' key.
val One: Key
'1' key.
val Two: Key
'2' key.
val Three: Key
'3' key.
val Four: Key
'4' key.
val Five: Key
'5' key.
val Six: Key
'6' key.
val Seven: Key
'7' key.
val Eight: Key
'8' key.
val Nine: Key
'9' key.
val Plus: Key
'+' key.
val Minus: Key
'-' key.
val Multiply: Key
'*' key.
val Equals: Key
'=' key.
val Pound: Key
'#' key.
val A: Key
'A' key.
val B: Key
'B' key.
val C: Key
'C' key.
val D: Key
'D' key.
val E: Key
'E' key.
val F: Key
'F' key.
val G: Key
'G' key.
val H: Key
'H' key.
val I: Key
'I' key.
val J: Key
'J' key.
val K: Key
'K' key.
val L: Key
'L' key.
val M: Key
'M' key.
val N: Key
'N' key.
val O: Key
'O' key.
val P: Key
'P' key.
val Q: Key
'Q' key.
val R: Key
'R' key.
val S: Key
'S' key.
val T: Key
'T' key.
val U: Key
'U' key.
val V: Key
'V' key.
val W: Key
'W' key.
val X: Key
'X' key.
val Y: Key
'Y' key.
val Z: Key
'Z' key.
val Comma: Key
',' key.
val Period: Key
'.' key.
val AltLeft: Key
Left Alt modifier key.
val AltRight: Key
Right Alt modifier key.
val ShiftLeft: Key
Left Shift modifier key.
val ShiftRight: Key
Right Shift modifier key.
val Tab: Key
Tab key.
val Spacebar: Key
Space key.
val Symbol: Key
Symbol modifier key.
Used to enter alternate symbols.
val Browser: Key
Browser special function key.
Used to launch a browser application.
val Envelope: Key
Envelope special function key.
Used to launch a mail application.
val Enter: Key
Enter key.
val Backspace: Key
Backspace key.
Deletes characters before the insertion point, unlike Delete
.
val Delete: Key
Delete key.
Deletes characters ahead of the insertion point, unlike Backspace
.
val Escape: Key
Escape key.
val CtrlLeft: Key
Left Control modifier key.
val CtrlRight: Key
Right Control modifier key.
val CapsLock: Key
Caps Lock key.
val ScrollLock: Key
Scroll Lock key.
val MetaLeft: Key
Left Meta modifier key.
val MetaRight: Key
Right Meta modifier key.
val Function: Key
Function modifier key.
val PrintScreen: Key
System Request / Print Screen key.
val Break: Key
Break / Pause key.
val MoveHome: Key
Home Movement key.
Used for scrolling or moving the cursor around to the start of a line or to the top of a list.
val MoveEnd: Key
End Movement key.
Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list.
val Insert: Key
Insert key.
Toggles insert / overwrite edit mode.
val Cut: Key
Cut key.
val Copy: Key
Copy key.
val Paste: Key
Paste key.
val Grave: Key
'`' (backtick) key.
val LeftBracket: Key
'`' key.
val RightBracket: Key
'`' key.
val Slash: Key
'/' key.
val Backslash: Key
'' key.
val Semicolon: Key
';' key.
val Apostrophe: Key
''' (apostrophe) key.
val At: Key
'@' key.
val Number: Key
Number modifier key.
Used to enter numeric symbols. This key is not Num Lock; it is more like AltLeft
.
val HeadsetHook: Key
Headset Hook key.
Used to hang up calls and stop media.
val Focus: Key
Camera Focus key.
Used to focus the camera.
val Menu: Key
Menu key.
val Notification: Key
Notification key.
val Search: Key
Search key.
val PageUp: Key
Page Up key.
val PageDown: Key
Page Down key.
val PictureSymbols: Key
Picture Symbols modifier key.
Used to switch symbol sets (Emoji, Kao-moji).
val SwitchCharset: Key
Switch Charset modifier key.
Used to switch character sets (Kanji, Katakana).
val ButtonA: Key
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.
val ButtonB: Key
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.
val ButtonC: Key
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.
val ButtonX: Key
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.
val ButtonY: Key
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.
val ButtonZ: Key
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.
val ButtonL1: Key
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.
val ButtonR1: Key
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.
val ButtonL2: Key
L2 Button key.
On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button.
val ButtonR2: Key
R2 Button key.
On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button.
val ButtonThumbLeft: Key
Left Thumb Button key.
On a game controller, the left thumb button indicates that the left (or only) joystick is pressed.
val ButtonThumbRight: Key
Right Thumb Button key.
On a game controller, the right thumb button indicates that the right joystick is pressed.
val ButtonStart: Key
Start Button key.
On a game controller, the button labeled Start.
val ButtonSelect: Key
Select Button key.
On a game controller, the button labeled Select.
val ButtonMode: Key
Mode Button key.
On a game controller, the button labeled Mode.
val Button1: Key
Generic Game Pad Button #1.
val Button2: Key
Generic Game Pad Button #2.
val Button3: Key
Generic Game Pad Button #3.
val Button4: Key
Generic Game Pad Button #4.
val Button5: Key
Generic Game Pad Button #5.
val Button6: Key
Generic Game Pad Button #6.
val Button7: Key
Generic Game Pad Button #7.
val Button8: Key
Generic Game Pad Button #8.
val Button9: Key
Generic Game Pad Button #9.
val Button10: Key
Generic Game Pad Button #10.
val Button11: Key
Generic Game Pad Button #11.
val Button12: Key
Generic Game Pad Button #12.
val Button13: Key
Generic Game Pad Button #13.
val Button14: Key
Generic Game Pad Button #14.
val Button15: Key
Generic Game Pad Button #15.
val Button16: Key
Generic Game Pad Button #16.
val Forward: Key
Forward key.
Navigates forward in the history stack. Complement of Back
.
val F1: Key
F1 key.
val F2: Key
F2 key.
val F3: Key
F3 key.
val F4: Key
F4 key.
val F5: Key
F5 key.
val F6: Key
F6 key.
val F7: Key
F7 key.
val F8: Key
F8 key.
val F9: Key
F9 key.
val F10: Key
F10 key.
val F11: Key
F11 key.
val F12: Key
F12 key.
val NumLock: Key
Num Lock key.
This is the Num Lock key; it is different from Number
. This key alters the behavior of
other keys on the numeric keypad.
val NumPad0: Key
Numeric keypad '0' key.
val NumPad1: Key
Numeric keypad '1' key.
val NumPad2: Key
Numeric keypad '2' key.
val NumPad3: Key
Numeric keypad '3' key.
val NumPad4: Key
Numeric keypad '4' key.
val NumPad5: Key
Numeric keypad '5' key.
val NumPad6: Key
Numeric keypad '6' key.
val NumPad7: Key
Numeric keypad '7' key.
val NumPad8: Key
Numeric keypad '8' key.
val NumPad9: Key
Numeric keypad '9' key.
val NumPadDivide: Key
Numeric keypad '/' key (for division).
val NumPadMultiply: Key
Numeric keypad '*' key (for multiplication).
val NumPadSubtract: Key
Numeric keypad '-' key (for subtraction).
val NumPadAdd: Key
Numeric keypad '+' key (for addition).
val NumPadDot: Key
Numeric keypad '.' key (for decimals or digit grouping).
val NumPadComma: Key
Numeric keypad ',' key (for decimals or digit grouping).
val NumPadEnter: Key
Numeric keypad Enter key.
val NumPadEquals: Key
Numeric keypad '=' key.
val NumPadLeftParenthesis: Key
Numeric keypad '(' key.
val NumPadRightParenthesis: Key
Numeric keypad ')' key.
val MediaPlay: Key
Play media key.
val MediaPause: Key
Pause media key.
val MediaPlayPause: Key
Play/Pause media key.
val MediaStop: Key
Stop media key.
val MediaRecord: Key
Record media key.
val MediaNext: Key
Play Next media key.
val MediaPrevious: Key
Play Previous media key.
val MediaRewind: Key
Rewind media key.
val MediaFastForward: Key
Fast Forward media key.
val MediaClose: Key
Close media key.
May be used to close a CD tray, for example.
val MediaAudioTrack: Key
Audio Track key.
Switches the audio tracks.
val MediaEject: Key
Eject media key.
May be used to eject a CD tray, for example.
val MediaTopMenu: Key
Media Top Menu key.
Goes to the top of media menu.
val MediaSkipForward: Key
Skip forward media key.
val MediaSkipBackward: Key
Skip backward media key.
val MediaStepForward: Key
Step forward media key.
Steps media forward, one frame at a time.
val MediaStepBackward: Key
Step backward media key.
Steps media backward, one frame at a time.
val MicrophoneMute: Key
Mute key.
Mutes the microphone, unlike VolumeMute
.
val VolumeMute: Key
Volume Mute key.
Mutes the speaker, unlike MicrophoneMute
.
This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volume.
val Info: Key
Info key.
Common on TV remotes to show additional information related to what is currently being viewed.
val ChannelUp: Key
Channel up key.
On TV remotes, increments the television channel.
val ChannelDown: Key
Channel down key.
On TV remotes, decrements the television channel.
val ZoomIn: Key
Zoom in key.
val ZoomOut: Key
Zoom out key.
val Tv: Key
TV key.
On TV remotes, switches to viewing live TV.
val Window: Key
Window key.
On TV remotes, toggles picture-in-picture mode or other windowing functions. On Android Wear devices, triggers a display offset.
val Guide: Key
Guide key.
On TV remotes, shows a programming guide.
val Dvr: Key
DVR key.
On some TV remotes, switches to a DVR mode for recorded shows.
val Bookmark: Key
Bookmark key.
On some TV remotes, bookmarks content or web pages.
val Captions: Key
Toggle captions key.
Switches the mode for closed-captioning text, for example during television shows.
val Settings: Key
Settings key.
Starts the system settings activity.
val TvPower: Key
TV power key.
On TV remotes, toggles the power on a television screen.
val TvInput: Key
TV input key.
On TV remotes, switches the input on a television screen.
val SetTopBoxPower: Key
Set-top-box power key.
On TV remotes, toggles the power on an external Set-top-box.
val SetTopBoxInput: Key
Set-top-box input key.
On TV remotes, switches the input mode on an external Set-top-box.
val AvReceiverPower: Key
A/V Receiver power key.
On TV remotes, toggles the power on an external A/V Receiver.
val AvReceiverInput: Key
A/V Receiver input key.
On TV remotes, switches the input mode on an external A/V Receiver.
val ProgramRed: Key
Red "programmable" key.
On TV remotes, acts as a contextual/programmable key.
val ProgramGreen: Key
Green "programmable" key.
On TV remotes, acts as a contextual/programmable key.
val ProgramYellow: Key
Yellow "programmable" key.
On TV remotes, acts as a contextual/programmable key.
val ProgramBlue: Key
Blue "programmable" key.
On TV remotes, acts as a contextual/programmable key.
val AppSwitch: Key
App switch key.
Should bring up the application switcher dialog.
val LanguageSwitch: Key
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+Space.
val MannerMode: Key
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.
val Toggle2D3D: Key
3D Mode key.
Toggles the display between 2D and 3D mode.
val Contacts: Key
Contacts special function key.
Used to launch an address book application.
val Calendar: Key
Calendar special function key.
Used to launch a calendar application.
val Music: Key
Music special function key.
Used to launch a music player application.
val Calculator: Key
Calculator special function key.
Used to launch a calculator application.
val ZenkakuHankaru: Key
Japanese full-width / half-width key.
val Eisu: Key
Japanese alphanumeric key.
val Muhenkan: Key
Japanese non-conversion key.
val Henkan: Key
Japanese conversion key.
val KatakanaHiragana: Key
Japanese katakana / hiragana key.
val Yen: Key
Japanese Yen key.
val Ro: Key
Japanese Ro key.
val Kana: Key
Japanese kana key.
val Assist: Key
Assist key.
Launches the global assist activity. Not delivered to applications.
val BrightnessDown: Key
Brightness Down key.
Adjusts the screen brightness down.
val BrightnessUp: Key
Brightness Up key.
Adjusts the screen brightness up.
val Sleep: Key
Sleep key.
Puts the device to sleep. Behaves somewhat like Power
but it has no effect if the
device is already asleep.
val WakeUp: Key
Wakeup key.
Wakes up the device. Behaves somewhat like Power
but it has no effect if the device is
already awake.
val SoftSleep: Key
Put device to sleep unless a wakelock is held.
val Pairing: Key
Pairing key.
Initiates peripheral pairing mode. Useful for pairing remote control devices or game controllers, especially if no other input mode is available.
val LastChannel: Key
Last Channel key.
Goes to the last viewed channel.
val TvDataService: Key
TV data service key.
Displays data services like weather, sports.
val VoiceAssist: Key
Voice Assist key.
Launches the global voice assist activity. Not delivered to applications.
val TvRadioService: Key
Radio key.
Toggles TV service / Radio service.
val TvTeletext: Key
Teletext key.
Displays Teletext service.
val TvNumberEntry: Key
Number entry key.
Initiates to enter multi-digit channel number when each digit key is assigned for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC User Control Code.
val TvTerrestrialAnalog: Key
Analog Terrestrial key.
Switches to analog terrestrial broadcast service.
val TvTerrestrialDigital: Key
Digital Terrestrial key.
Switches to digital terrestrial broadcast service.
val TvSatellite: Key
Satellite key.
Switches to digital satellite broadcast service.
val TvSatelliteBs: Key
BS key.
Switches to BS digital satellite broadcasting service available in Japan.
val TvSatelliteCs: Key
CS key.
Switches to CS digital satellite broadcasting service available in Japan.
val TvSatelliteService: Key
BS/CS key.
Toggles between BS and CS digital satellite services.
val TvNetwork: Key
Toggle Network key.
Toggles selecting broadcast services.
val TvAntennaCable: Key
Antenna/Cable key.
Toggles broadcast input source between antenna and cable.
val TvInputHdmi1: Key
HDMI #1 key.
Switches to HDMI input #1.
val TvInputHdmi2: Key
HDMI #2 key.
Switches to HDMI input #2.
val TvInputHdmi3: Key
HDMI #3 key.
Switches to HDMI input #3.
val TvInputHdmi4: Key
HDMI #4 key.
Switches to HDMI input #4.
val TvInputComposite1: Key
Composite #1 key.
Switches to composite video input #1.
val TvInputComposite2: Key
Composite #2 key.
Switches to composite video input #2.
val TvInputComponent1: Key
Component #1 key.
Switches to component video input #1.
val TvInputComponent2: Key
Component #2 key.
Switches to component video input #2.
val TvInputVga1: Key
VGA #1 key.
Switches to VGA (analog RGB) input #1.
val TvAudioDescription: Key
Audio description key.
Toggles audio description off / on.
val TvAudioDescriptionMixingVolumeUp: Key
Audio description mixing volume up key.
Increase the audio description volume as compared with normal audio volume.
val TvAudioDescriptionMixingVolumeDown: Key
Audio description mixing volume down key.
Lessen audio description volume as compared with normal audio volume.
val TvZoomMode: Key
Zoom mode key.
Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.)
val TvContentsMenu: Key
Contents menu key.
Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control Code
val TvMediaContextMenu: Key
Media context menu key.
Goes to the context menu of media contents. Corresponds to Media Context-sensitive Menu (0x11) of CEC User Control Code.
val TvTimerProgramming: Key
Timer programming key.
Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of CEC User Control Code.
val StemPrimary: Key
Primary stem key for Wearables.
Main power/reset button.
val Stem1: Key
Generic stem key 1 for Wearables.
val Stem2: Key
Generic stem key 2 for Wearables.
val Stem3: Key
Generic stem key 3 for Wearables.
val AllApps: Key
Show all apps.
val Refresh: Key
Refresh key.
val ThumbsUp: Key
Thumbs up key. Apps can use this to let user up-vote content.
val ThumbsDown: Key
Thumbs down key. Apps can use this to let user down-vote content.
val ProfileSwitch: Key
Used to switch current account
that is consuming content. May
be consumed by system to set account globally.
actual value class Key(val keyCode: Long)
Actual implementation of Key
for Android.
Parameters
keyCode | an integer code representing the key pressed. |
Companion Object
Properties
actual val Unknown = Key(KeyEvent.KEYCODE_UNKNOWN)
Unknown key.
actual val SoftLeft = Key(KeyEvent.KEYCODE_SOFT_LEFT)
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.
actual val SoftRight = Key(KeyEvent.KEYCODE_SOFT_RIGHT)
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.
actual val Home = Key(KeyEvent.KEYCODE_HOME)
Home key.
This key is handled by the framework and is never delivered to applications.
actual val Back = Key(KeyEvent.KEYCODE_BACK)
Back key.
actual val Help = Key(KeyEvent.KEYCODE_HELP)
Help key.
actual val NavigatePrevious = Key(KeyEvent.KEYCODE_NAVIGATE_PREVIOUS)
Navigate to previous key.
Goes backward by one item in an ordered collection of items.
actual val NavigateNext = Key(KeyEvent.KEYCODE_NAVIGATE_NEXT)
Navigate to next key.
Advances to the next item in an ordered collection of items.
actual val NavigateIn = Key(KeyEvent.KEYCODE_NAVIGATE_IN)
Navigate in key.
Activates the item that currently has focus or expands to the next level of a navigation hierarchy.
actual val NavigateOut = Key(KeyEvent.KEYCODE_NAVIGATE_OUT)
Navigate out key.
Backs out one level of a navigation hierarchy or collapses the item that currently has focus.
actual val SystemNavigationUp = Key(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP)
Consumed by the system for navigation up.
actual val SystemNavigationDown = Key(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN)
Consumed by the system for navigation down.
actual val SystemNavigationLeft = Key(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_LEFT)
Consumed by the system for navigation left.
actual val SystemNavigationRight = Key(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_RIGHT)
Consumed by the system for navigation right.
actual val Call = Key(KeyEvent.KEYCODE_CALL)
Call key.
actual val EndCall = Key(KeyEvent.KEYCODE_ENDCALL)
End Call key.
actual val DirectionUp = Key(KeyEvent.KEYCODE_DPAD_UP)
Up Arrow Key / Directional Pad Up key.
May also be synthesized from trackball motions.
actual val DirectionDown = Key(KeyEvent.KEYCODE_DPAD_DOWN)
Down Arrow Key / Directional Pad Down key.
May also be synthesized from trackball motions.
actual val DirectionLeft = Key(KeyEvent.KEYCODE_DPAD_LEFT)
Left Arrow Key / Directional Pad Left key.
May also be synthesized from trackball motions.
actual val DirectionRight = Key(KeyEvent.KEYCODE_DPAD_RIGHT)
Right Arrow Key / Directional Pad Right key.
May also be synthesized from trackball motions.
actual val DirectionCenter = Key(KeyEvent.KEYCODE_DPAD_CENTER)
Center Arrow Key / Directional Pad Center key.
May also be synthesized from trackball motions.
actual val DirectionUpLeft = Key(KeyEvent.KEYCODE_DPAD_UP_LEFT)
Directional Pad Up-Left.
actual val DirectionDownLeft = Key(KeyEvent.KEYCODE_DPAD_DOWN_LEFT)
Directional Pad Down-Left.
actual val DirectionUpRight = Key(KeyEvent.KEYCODE_DPAD_UP_RIGHT)
Directional Pad Up-Right.
actual val DirectionDownRight = Key(KeyEvent.KEYCODE_DPAD_DOWN_RIGHT)
Directional Pad Down-Right.
actual val VolumeUp = Key(KeyEvent.KEYCODE_VOLUME_UP)
Volume Up key.
Adjusts the speaker volume up.
actual val VolumeDown = Key(KeyEvent.KEYCODE_VOLUME_DOWN)
Volume Down key.
Adjusts the speaker volume down.
actual val Power = Key(KeyEvent.KEYCODE_POWER)
Power key.
actual val Camera = Key(KeyEvent.KEYCODE_CAMERA)
Camera key.
Used to launch a camera application or take pictures.
actual val Clear = Key(KeyEvent.KEYCODE_CLEAR)
Clear key.
actual val Zero = Key(KeyEvent.KEYCODE_0)
'0' key.
actual val One = Key(KeyEvent.KEYCODE_1)
'1' key.
actual val Two = Key(KeyEvent.KEYCODE_2)
'2' key.
actual val Three = Key(KeyEvent.KEYCODE_3)
'3' key.
actual val Four = Key(KeyEvent.KEYCODE_4)
'4' key.
actual val Five = Key(KeyEvent.KEYCODE_5)
'5' key.
actual val Six = Key(KeyEvent.KEYCODE_6)
'6' key.
actual val Seven = Key(KeyEvent.KEYCODE_7)
'7' key.
actual val Eight = Key(KeyEvent.KEYCODE_8)
'8' key.
actual val Nine = Key(KeyEvent.KEYCODE_9)
'9' key.
actual val Plus = Key(KeyEvent.KEYCODE_PLUS)
'+' key.
actual val Minus = Key(KeyEvent.KEYCODE_MINUS)
'-' key.
actual val Multiply = Key(KeyEvent.KEYCODE_STAR)
'*' key.
actual val Equals = Key(KeyEvent.KEYCODE_EQUALS)
'=' key.
actual val Pound = Key(KeyEvent.KEYCODE_POUND)
'#' key.
actual val A = Key(KeyEvent.KEYCODE_A)
'A' key.
actual val B = Key(KeyEvent.KEYCODE_B)
'B' key.
actual val C = Key(KeyEvent.KEYCODE_C)
'C' key.
actual val D = Key(KeyEvent.KEYCODE_D)
'D' key.
actual val E = Key(KeyEvent.KEYCODE_E)
'E' key.
actual val F = Key(KeyEvent.KEYCODE_F)
'F' key.
actual val G = Key(KeyEvent.KEYCODE_G)
'G' key.
actual val H = Key(KeyEvent.KEYCODE_H)
'H' key.
actual val I = Key(KeyEvent.KEYCODE_I)
'I' key.
actual val J = Key(KeyEvent.KEYCODE_J)
'J' key.
actual val K = Key(KeyEvent.KEYCODE_K)
'K' key.
actual val L = Key(KeyEvent.KEYCODE_L)
'L' key.
actual val M = Key(KeyEvent.KEYCODE_M)
'M' key.
actual val N = Key(KeyEvent.KEYCODE_N)
'N' key.
actual val O = Key(KeyEvent.KEYCODE_O)
'O' key.
actual val P = Key(KeyEvent.KEYCODE_P)
'P' key.
actual val Q = Key(KeyEvent.KEYCODE_Q)
'Q' key.
actual val R = Key(KeyEvent.KEYCODE_R)
'R' key.
actual val S = Key(KeyEvent.KEYCODE_S)
'S' key.
actual val T = Key(KeyEvent.KEYCODE_T)
'T' key.
actual val U = Key(KeyEvent.KEYCODE_U)
'U' key.
actual val V = Key(KeyEvent.KEYCODE_V)
'V' key.
actual val W = Key(KeyEvent.KEYCODE_W)
'W' key.
actual val X = Key(KeyEvent.KEYCODE_X)
'X' key.
actual val Y = Key(KeyEvent.KEYCODE_Y)
'Y' key.
actual val Z = Key(KeyEvent.KEYCODE_Z)
'Z' key.
actual val Comma = Key(KeyEvent.KEYCODE_COMMA)
',' key.
actual val Period = Key(KeyEvent.KEYCODE_PERIOD)
'.' key.
actual val AltLeft = Key(KeyEvent.KEYCODE_ALT_LEFT)
Left Alt modifier key.
actual val AltRight = Key(KeyEvent.KEYCODE_ALT_RIGHT)
Right Alt modifier key.
actual val ShiftLeft = Key(KeyEvent.KEYCODE_SHIFT_LEFT)
Left Shift modifier key.
actual val ShiftRight = Key(KeyEvent.KEYCODE_SHIFT_RIGHT)
Right Shift modifier key.
actual val Tab = Key(KeyEvent.KEYCODE_TAB)
Tab key.
actual val Spacebar = Key(KeyEvent.KEYCODE_SPACE)
Space key.
actual val Symbol = Key(KeyEvent.KEYCODE_SYM)
Symbol modifier key.
Used to enter alternate symbols.
actual val Browser = Key(KeyEvent.KEYCODE_EXPLORER)
Browser special function key.
Used to launch a browser application.
actual val Envelope = Key(KeyEvent.KEYCODE_ENVELOPE)
Envelope special function key.
Used to launch a mail application.
actual val Enter = Key(KeyEvent.KEYCODE_ENTER)
Enter key.
actual val Backspace = Key(KeyEvent.KEYCODE_DEL)
Backspace key.
Deletes characters before the insertion point, unlike Delete
.
actual val Delete = Key(KeyEvent.KEYCODE_FORWARD_DEL)
Delete key.
Deletes characters ahead of the insertion point, unlike Backspace
.
actual val Escape = Key(KeyEvent.KEYCODE_ESCAPE)
Escape key.
actual val CtrlLeft = Key(KeyEvent.KEYCODE_CTRL_LEFT)
Left Control modifier key.
actual val CtrlRight = Key(KeyEvent.KEYCODE_CTRL_RIGHT)
Right Control modifier key.
actual val CapsLock = Key(KeyEvent.KEYCODE_CAPS_LOCK)
Caps Lock key.
actual val ScrollLock = Key(KeyEvent.KEYCODE_SCROLL_LOCK)
Scroll Lock key.
actual val MetaLeft = Key(KeyEvent.KEYCODE_META_LEFT)
Left Meta modifier key.
actual val MetaRight = Key(KeyEvent.KEYCODE_META_RIGHT)
Right Meta modifier key.
actual val Function = Key(KeyEvent.KEYCODE_FUNCTION)
Function modifier key.
actual val PrintScreen = Key(KeyEvent.KEYCODE_SYSRQ)
System Request / Print Screen key.
actual val Break = Key(KeyEvent.KEYCODE_BREAK)
Break / Pause key.
actual val MoveHome = Key(KeyEvent.KEYCODE_MOVE_HOME)
Home Movement key.
Used for scrolling or moving the cursor around to the start of a line or to the top of a list.
actual val MoveEnd = Key(KeyEvent.KEYCODE_MOVE_END)
End Movement key.
Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list.
actual val Insert = Key(KeyEvent.KEYCODE_INSERT)
Insert key.
Toggles insert / overwrite edit mode.
actual val Cut = Key(KeyEvent.KEYCODE_CUT)
Cut key.
actual val Copy = Key(KeyEvent.KEYCODE_COPY)
Copy key.
actual val Paste = Key(KeyEvent.KEYCODE_PASTE)
Paste key.
actual val Grave = Key(KeyEvent.KEYCODE_GRAVE)
'`' (backtick) key.
actual val LeftBracket = Key(KeyEvent.KEYCODE_LEFT_BRACKET)
'`' key.
actual val RightBracket = Key(KeyEvent.KEYCODE_RIGHT_BRACKET)
'`' key.
actual val Slash = Key(KeyEvent.KEYCODE_SLASH)
'/' key.
actual val Backslash = Key(KeyEvent.KEYCODE_BACKSLASH)
'' key.
actual val Semicolon = Key(KeyEvent.KEYCODE_SEMICOLON)
';' key.
actual val Apostrophe = Key(KeyEvent.KEYCODE_APOSTROPHE)
''' (apostrophe) key.
actual val At = Key(KeyEvent.KEYCODE_AT)
'@' key.
actual val Number = Key(KeyEvent.KEYCODE_NUM)
Number modifier key.
Used to enter numeric symbols. This key is not Num Lock; it is more like AltLeft
.
actual val HeadsetHook = Key(KeyEvent.KEYCODE_HEADSETHOOK)
Headset Hook key.
Used to hang up calls and stop media.
actual val Focus = Key(KeyEvent.KEYCODE_FOCUS)
Camera Focus key.
Used to focus the camera.
actual val Menu = Key(KeyEvent.KEYCODE_MENU)
Menu key.
actual val Notification = Key(KeyEvent.KEYCODE_NOTIFICATION)
Notification key.
actual val Search = Key(KeyEvent.KEYCODE_SEARCH)
Search key.
actual val PageUp = Key(KeyEvent.KEYCODE_PAGE_UP)
Page Up key.
actual val PageDown = Key(KeyEvent.KEYCODE_PAGE_DOWN)
Page Down key.
actual val PictureSymbols = Key(KeyEvent.KEYCODE_PICTSYMBOLS)
Picture Symbols modifier key.
Used to switch symbol sets (Emoji, Kao-moji).
actual val SwitchCharset = Key(KeyEvent.KEYCODE_SWITCH_CHARSET)
Switch Charset modifier key.
Used to switch character sets (Kanji, Katakana).
actual val ButtonA = Key(KeyEvent.KEYCODE_BUTTON_A)
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.
actual val ButtonB = Key(KeyEvent.KEYCODE_BUTTON_B)
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.
actual val ButtonC = Key(KeyEvent.KEYCODE_BUTTON_C)
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.
actual val ButtonX = Key(KeyEvent.KEYCODE_BUTTON_X)
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.
actual val ButtonY = Key(KeyEvent.KEYCODE_BUTTON_Y)
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.
actual val ButtonZ = Key(KeyEvent.KEYCODE_BUTTON_Z)
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.
actual val ButtonL1 = Key(KeyEvent.KEYCODE_BUTTON_L1)
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.
actual val ButtonR1 = Key(KeyEvent.KEYCODE_BUTTON_R1)
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.
actual val ButtonL2 = Key(KeyEvent.KEYCODE_BUTTON_L2)
L2 Button key.
On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button.
actual val ButtonR2 = Key(KeyEvent.KEYCODE_BUTTON_R2)
R2 Button key.
On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button.
actual val ButtonThumbLeft = Key(KeyEvent.KEYCODE_BUTTON_THUMBL)
Left Thumb Button key.
On a game controller, the left thumb button indicates that the left (or only) joystick is pressed.
actual val ButtonThumbRight = Key(KeyEvent.KEYCODE_BUTTON_THUMBR)
Right Thumb Button key.
On a game controller, the right thumb button indicates that the right joystick is pressed.
actual val ButtonStart = Key(KeyEvent.KEYCODE_BUTTON_START)
Start Button key.
On a game controller, the button labeled Start.
actual val ButtonSelect = Key(KeyEvent.KEYCODE_BUTTON_SELECT)
Select Button key.
On a game controller, the button labeled Select.
actual val ButtonMode = Key(KeyEvent.KEYCODE_BUTTON_MODE)
Mode Button key.
On a game controller, the button labeled Mode.
actual val Button1 = Key(KeyEvent.KEYCODE_BUTTON_1)
Generic Game Pad Button #1.
actual val Button2 = Key(KeyEvent.KEYCODE_BUTTON_2)
Generic Game Pad Button #2.
actual val Button3 = Key(KeyEvent.KEYCODE_BUTTON_3)
Generic Game Pad Button #3.
actual val Button4 = Key(KeyEvent.KEYCODE_BUTTON_4)
Generic Game Pad Button #4.
actual val Button5 = Key(KeyEvent.KEYCODE_BUTTON_5)
Generic Game Pad Button #5.
actual val Button6 = Key(KeyEvent.KEYCODE_BUTTON_6)
Generic Game Pad Button #6.
actual val Button7 = Key(KeyEvent.KEYCODE_BUTTON_7)
Generic Game Pad Button #7.
actual val Button8 = Key(KeyEvent.KEYCODE_BUTTON_8)
Generic Game Pad Button #8.
actual val Button9 = Key(KeyEvent.KEYCODE_BUTTON_9)
Generic Game Pad Button #9.
actual val Button10 = Key(KeyEvent.KEYCODE_BUTTON_10)
Generic Game Pad Button #10.
actual val Button11 = Key(KeyEvent.KEYCODE_BUTTON_11)
Generic Game Pad Button #11.
actual val Button12 = Key(KeyEvent.KEYCODE_BUTTON_12)
Generic Game Pad Button #12.
actual val Button13 = Key(KeyEvent.KEYCODE_BUTTON_13)
Generic Game Pad Button #13.
actual val Button14 = Key(KeyEvent.KEYCODE_BUTTON_14)
Generic Game Pad Button #14.
actual val Button15 = Key(KeyEvent.KEYCODE_BUTTON_15)
Generic Game Pad Button #15.
actual val Button16 = Key(KeyEvent.KEYCODE_BUTTON_16)
Generic Game Pad Button #16.
actual val Forward = Key(KeyEvent.KEYCODE_FORWARD)
Forward key.
Navigates forward in the history stack. Complement of Back
.
actual val F1 = Key(KeyEvent.KEYCODE_F1)
F1 key.
actual val F2 = Key(KeyEvent.KEYCODE_F2)
F2 key.
actual val F3 = Key(KeyEvent.KEYCODE_F3)
F3 key.
actual val F4 = Key(KeyEvent.KEYCODE_F4)
F4 key.
actual val F5 = Key(KeyEvent.KEYCODE_F5)
F5 key.
actual val F6 = Key(KeyEvent.KEYCODE_F6)
F6 key.
actual val F7 = Key(KeyEvent.KEYCODE_F7)
F7 key.
actual val F8 = Key(KeyEvent.KEYCODE_F8)
F8 key.
actual val F9 = Key(KeyEvent.KEYCODE_F9)
F9 key.
actual val F10 = Key(KeyEvent.KEYCODE_F10)
F10 key.
actual val F11 = Key(KeyEvent.KEYCODE_F11)
F11 key.
actual val F12 = Key(KeyEvent.KEYCODE_F12)
F12 key.
actual val NumLock = Key(KeyEvent.KEYCODE_NUM_LOCK)
Num Lock key.
This is the Num Lock key; it is different from Number
. This key alters the behavior of
other keys on the numeric keypad.
actual val NumPad0 = Key(KeyEvent.KEYCODE_NUMPAD_0)
Numeric keypad '0' key.
actual val NumPad1 = Key(KeyEvent.KEYCODE_NUMPAD_1)
Numeric keypad '1' key.
actual val NumPad2 = Key(KeyEvent.KEYCODE_NUMPAD_2)
Numeric keypad '2' key.
actual val NumPad3 = Key(KeyEvent.KEYCODE_NUMPAD_3)
Numeric keypad '3' key.
actual val NumPad4 = Key(KeyEvent.KEYCODE_NUMPAD_4)
Numeric keypad '4' key.
actual val NumPad5 = Key(KeyEvent.KEYCODE_NUMPAD_5)
Numeric keypad '5' key.
actual val NumPad6 = Key(KeyEvent.KEYCODE_NUMPAD_6)
Numeric keypad '6' key.
actual val NumPad7 = Key(KeyEvent.KEYCODE_NUMPAD_7)
Numeric keypad '7' key.
actual val NumPad8 = Key(KeyEvent.KEYCODE_NUMPAD_8)
Numeric keypad '8' key.
actual val NumPad9 = Key(KeyEvent.KEYCODE_NUMPAD_9)
Numeric keypad '9' key.
actual val NumPadDivide = Key(KeyEvent.KEYCODE_NUMPAD_DIVIDE)
Numeric keypad '/' key (for division).
actual val NumPadMultiply = Key(KeyEvent.KEYCODE_NUMPAD_MULTIPLY)
Numeric keypad '*' key (for multiplication).
actual val NumPadSubtract = Key(KeyEvent.KEYCODE_NUMPAD_SUBTRACT)
Numeric keypad '-' key (for subtraction).
actual val NumPadAdd = Key(KeyEvent.KEYCODE_NUMPAD_ADD)
Numeric keypad '+' key (for addition).
actual val NumPadDot = Key(KeyEvent.KEYCODE_NUMPAD_DOT)
Numeric keypad '.' key (for decimals or digit grouping).
actual val NumPadComma = Key(KeyEvent.KEYCODE_NUMPAD_COMMA)
Numeric keypad ',' key (for decimals or digit grouping).
actual val NumPadEnter = Key(KeyEvent.KEYCODE_NUMPAD_ENTER)
Numeric keypad Enter key.
actual val NumPadEquals = Key(KeyEvent.KEYCODE_NUMPAD_EQUALS)
Numeric keypad '=' key.
actual val NumPadLeftParenthesis = Key(KeyEvent.KEYCODE_NUMPAD_LEFT_PAREN)
Numeric keypad '(' key.
actual val NumPadRightParenthesis = Key(KeyEvent.KEYCODE_NUMPAD_RIGHT_PAREN)
Numeric keypad ')' key.
actual val MediaPlay = Key(KeyEvent.KEYCODE_MEDIA_PLAY)
Play media key.
actual val MediaPause = Key(KeyEvent.KEYCODE_MEDIA_PAUSE)
Pause media key.
actual val MediaPlayPause = Key(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE)
Play/Pause media key.
actual val MediaStop = Key(KeyEvent.KEYCODE_MEDIA_STOP)
Stop media key.
actual val MediaRecord = Key(KeyEvent.KEYCODE_MEDIA_RECORD)
Record media key.
actual val MediaNext = Key(KeyEvent.KEYCODE_MEDIA_NEXT)
Play Next media key.
actual val MediaPrevious = Key(KeyEvent.KEYCODE_MEDIA_PREVIOUS)
Play Previous media key.
actual val MediaRewind = Key(KeyEvent.KEYCODE_MEDIA_REWIND)
Rewind media key.
actual val MediaFastForward = Key(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD)
Fast Forward media key.
actual val MediaClose = Key(KeyEvent.KEYCODE_MEDIA_CLOSE)
Close media key.
May be used to close a CD tray, for example.
actual val MediaAudioTrack = Key(KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK)
Audio Track key.
Switches the audio tracks.
actual val MediaEject = Key(KeyEvent.KEYCODE_MEDIA_EJECT)
Eject media key.
May be used to eject a CD tray, for example.
actual val MediaTopMenu = Key(KeyEvent.KEYCODE_MEDIA_TOP_MENU)
Media Top Menu key.
Goes to the top of media menu.
actual val MediaSkipForward = Key(KeyEvent.KEYCODE_MEDIA_SKIP_FORWARD)
Skip forward media key.
actual val MediaSkipBackward = Key(KeyEvent.KEYCODE_MEDIA_SKIP_BACKWARD)
Skip backward media key.
actual val MediaStepForward = Key(KeyEvent.KEYCODE_MEDIA_STEP_FORWARD)
Step forward media key.
Steps media forward, one frame at a time.
actual val MediaStepBackward = Key(KeyEvent.KEYCODE_MEDIA_STEP_BACKWARD)
Step backward media key.
Steps media backward, one frame at a time.
actual val MicrophoneMute = Key(KeyEvent.KEYCODE_MUTE)
Mute key.
Mutes the microphone, unlike VolumeMute
.
actual val VolumeMute = Key(KeyEvent.KEYCODE_VOLUME_MUTE)
Volume Mute key.
Mutes the speaker, unlike MicrophoneMute
.
This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volume.
actual val Info = Key(KeyEvent.KEYCODE_INFO)
Info key.
Common on TV remotes to show additional information related to what is currently being viewed.
actual val ChannelUp = Key(KeyEvent.KEYCODE_CHANNEL_UP)
Channel up key.
On TV remotes, increments the television channel.
actual val ChannelDown = Key(KeyEvent.KEYCODE_CHANNEL_DOWN)
Channel down key.
On TV remotes, decrements the television channel.
actual val ZoomIn = Key(KeyEvent.KEYCODE_ZOOM_IN)
Zoom in key.
actual val ZoomOut = Key(KeyEvent.KEYCODE_ZOOM_OUT)
Zoom out key.
actual val Tv = Key(KeyEvent.KEYCODE_TV)
TV key.
On TV remotes, switches to viewing live TV.
actual val Window = Key(KeyEvent.KEYCODE_WINDOW)
Window key.
On TV remotes, toggles picture-in-picture mode or other windowing functions. On Android Wear devices, triggers a display offset.
actual val Guide = Key(KeyEvent.KEYCODE_GUIDE)
Guide key.
On TV remotes, shows a programming guide.
actual val Dvr = Key(KeyEvent.KEYCODE_DVR)
DVR key.
On some TV remotes, switches to a DVR mode for recorded shows.
actual val Bookmark = Key(KeyEvent.KEYCODE_BOOKMARK)
Bookmark key.
On some TV remotes, bookmarks content or web pages.
actual val Captions = Key(KeyEvent.KEYCODE_CAPTIONS)
Toggle captions key.
Switches the mode for closed-captioning text, for example during television shows.
actual val Settings = Key(KeyEvent.KEYCODE_SETTINGS)
Settings key.
Starts the system settings activity.
actual val TvPower = Key(KeyEvent.KEYCODE_TV_POWER)
TV power key.
On TV remotes, toggles the power on a television screen.
actual val TvInput = Key(KeyEvent.KEYCODE_TV_INPUT)
TV input key.
On TV remotes, switches the input on a television screen.
actual val SetTopBoxPower = Key(KeyEvent.KEYCODE_STB_POWER)
Set-top-box power key.
On TV remotes, toggles the power on an external Set-top-box.
actual val SetTopBoxInput = Key(KeyEvent.KEYCODE_STB_INPUT)
Set-top-box input key.
On TV remotes, switches the input mode on an external Set-top-box.
actual val AvReceiverPower = Key(KeyEvent.KEYCODE_AVR_POWER)
A/V Receiver power key.
On TV remotes, toggles the power on an external A/V Receiver.
actual val AvReceiverInput = Key(KeyEvent.KEYCODE_AVR_INPUT)
A/V Receiver input key.
On TV remotes, switches the input mode on an external A/V Receiver.
actual val ProgramRed = Key(KeyEvent.KEYCODE_PROG_RED)
Red "programmable" key.
On TV remotes, acts as a contextual/programmable key.
actual val ProgramGreen = Key(KeyEvent.KEYCODE_PROG_GREEN)
Green "programmable" key.
On TV remotes, acts as a contextual/programmable key.
actual val ProgramYellow = Key(KeyEvent.KEYCODE_PROG_YELLOW)
Yellow "programmable" key.
On TV remotes, acts as a contextual/programmable key.
actual val ProgramBlue = Key(KeyEvent.KEYCODE_PROG_BLUE)
Blue "programmable" key.
On TV remotes, acts as a contextual/programmable key.
actual val AppSwitch = Key(KeyEvent.KEYCODE_APP_SWITCH)
App switch key.
Should bring up the application switcher dialog.
actual val LanguageSwitch = Key(KeyEvent.KEYCODE_LANGUAGE_SWITCH)
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+Space.
actual val MannerMode = Key(KeyEvent.KEYCODE_MANNER_MODE)
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.
actual val Toggle2D3D = Key(KeyEvent.KEYCODE_3D_MODE)
3D Mode key.
Toggles the display between 2D and 3D mode.
actual val Contacts = Key(KeyEvent.KEYCODE_CONTACTS)
Contacts special function key.
Used to launch an address book application.
actual val Calendar = Key(KeyEvent.KEYCODE_CALENDAR)
Calendar special function key.
Used to launch a calendar application.
actual val Music = Key(KeyEvent.KEYCODE_MUSIC)
Music special function key.
Used to launch a music player application.
actual val Calculator = Key(KeyEvent.KEYCODE_CALCULATOR)
Calculator special function key.
Used to launch a calculator application.
actual val ZenkakuHankaru = Key(KeyEvent.KEYCODE_ZENKAKU_HANKAKU)
Japanese full-width / half-width key.
actual val Eisu = Key(KeyEvent.KEYCODE_EISU)
Japanese alphanumeric key.
actual val Muhenkan = Key(KeyEvent.KEYCODE_MUHENKAN)
Japanese non-conversion key.
actual val Henkan = Key(KeyEvent.KEYCODE_HENKAN)
Japanese conversion key.
actual val KatakanaHiragana = Key(KeyEvent.KEYCODE_KATAKANA_HIRAGANA)
Japanese katakana / hiragana key.
actual val Yen = Key(KeyEvent.KEYCODE_YEN)
Japanese Yen key.
actual val Ro = Key(KeyEvent.KEYCODE_RO)
Japanese Ro key.
actual val Kana = Key(KeyEvent.KEYCODE_KANA)
Japanese kana key.
actual val Assist = Key(KeyEvent.KEYCODE_ASSIST)
Assist key.
Launches the global assist activity. Not delivered to applications.
actual val BrightnessDown = Key(KeyEvent.KEYCODE_BRIGHTNESS_DOWN)
Brightness Down key.
Adjusts the screen brightness down.
actual val BrightnessUp = Key(KeyEvent.KEYCODE_BRIGHTNESS_UP)
Brightness Up key.
Adjusts the screen brightness up.
actual val Sleep = Key(KeyEvent.KEYCODE_SLEEP)
Sleep key.
Puts the device to sleep. Behaves somewhat like Power
but it has no effect if the
device is already asleep.
actual val WakeUp = Key(KeyEvent.KEYCODE_WAKEUP)
Wakeup key.
Wakes up the device. Behaves somewhat like Power
but it has no effect if the device is
already awake.
actual val SoftSleep = Key(KeyEvent.KEYCODE_SOFT_SLEEP)
Put device to sleep unless a wakelock is held.
actual val Pairing = Key(KeyEvent.KEYCODE_PAIRING)
Pairing key.
Initiates peripheral pairing mode. Useful for pairing remote control devices or game controllers, especially if no other input mode is available.
actual val LastChannel = Key(KeyEvent.KEYCODE_LAST_CHANNEL)
Last Channel key.
Goes to the last viewed channel.
actual val TvDataService = Key(KeyEvent.KEYCODE_TV_DATA_SERVICE)
TV data service key.
Displays data services like weather, sports.
actual val VoiceAssist = Key(KeyEvent.KEYCODE_VOICE_ASSIST)
Voice Assist key.
Launches the global voice assist activity. Not delivered to applications.
actual val TvRadioService = Key(KeyEvent.KEYCODE_TV_RADIO_SERVICE)
Radio key.
Toggles TV service / Radio service.
actual val TvTeletext = Key(KeyEvent.KEYCODE_TV_TELETEXT)
Teletext key.
Displays Teletext service.
actual val TvNumberEntry = Key(KeyEvent.KEYCODE_TV_NUMBER_ENTRY)
Number entry key.
Initiates to enter multi-digit channel number when each digit key is assigned for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC User Control Code.
actual val TvTerrestrialAnalog = Key(KeyEvent.KEYCODE_TV_TERRESTRIAL_ANALOG)
Analog Terrestrial key.
Switches to analog terrestrial broadcast service.
actual val TvTerrestrialDigital = Key(KeyEvent.KEYCODE_TV_TERRESTRIAL_DIGITAL)
Digital Terrestrial key.
Switches to digital terrestrial broadcast service.
actual val TvSatellite = Key(KeyEvent.KEYCODE_TV_SATELLITE)
Satellite key.
Switches to digital satellite broadcast service.
actual val TvSatelliteBs = Key(KeyEvent.KEYCODE_TV_SATELLITE_BS)
BS key.
Switches to BS digital satellite broadcasting service available in Japan.
actual val TvSatelliteCs = Key(KeyEvent.KEYCODE_TV_SATELLITE_CS)
CS key.
Switches to CS digital satellite broadcasting service available in Japan.
actual val TvSatelliteService = Key(KeyEvent.KEYCODE_TV_SATELLITE_SERVICE)
BS/CS key.
Toggles between BS and CS digital satellite services.
actual val TvNetwork = Key(KeyEvent.KEYCODE_TV_NETWORK)
Toggle Network key.
Toggles selecting broadcast services.
actual val TvAntennaCable = Key(KeyEvent.KEYCODE_TV_ANTENNA_CABLE)
Antenna/Cable key.
Toggles broadcast input source between antenna and cable.
actual val TvInputHdmi1 = Key(KeyEvent.KEYCODE_TV_INPUT_HDMI_1)
HDMI #1 key.
Switches to HDMI input #1.
actual val TvInputHdmi2 = Key(KeyEvent.KEYCODE_TV_INPUT_HDMI_2)
HDMI #2 key.
Switches to HDMI input #2.
actual val TvInputHdmi3 = Key(KeyEvent.KEYCODE_TV_INPUT_HDMI_3)
HDMI #3 key.
Switches to HDMI input #3.
actual val TvInputHdmi4 = Key(KeyEvent.KEYCODE_TV_INPUT_HDMI_4)
HDMI #4 key.
Switches to HDMI input #4.
actual val TvInputComposite1 = Key(KeyEvent.KEYCODE_TV_INPUT_COMPOSITE_1)
Composite #1 key.
Switches to composite video input #1.
actual val TvInputComposite2 = Key(KeyEvent.KEYCODE_TV_INPUT_COMPOSITE_2)
Composite #2 key.
Switches to composite video input #2.
actual val TvInputComponent1 = Key(KeyEvent.KEYCODE_TV_INPUT_COMPONENT_1)
Component #1 key.
Switches to component video input #1.
actual val TvInputComponent2 = Key(KeyEvent.KEYCODE_TV_INPUT_COMPONENT_2)
Component #2 key.
Switches to component video input #2.
actual val TvInputVga1 = Key(KeyEvent.KEYCODE_TV_INPUT_VGA_1)
VGA #1 key.
Switches to VGA (analog RGB) input #1.
actual val TvAudioDescription = Key(KeyEvent.KEYCODE_TV_AUDIO_DESCRIPTION)
Audio description key.
Toggles audio description off / on.
actual val TvAudioDescriptionMixingVolumeUp = Key(KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP)
Audio description mixing volume up key.
Increase the audio description volume as compared with normal audio volume.
actual val TvAudioDescriptionMixingVolumeDown = Key(KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN)
Audio description mixing volume down key.
Lessen audio description volume as compared with normal audio volume.
actual val TvZoomMode = Key(KeyEvent.KEYCODE_TV_ZOOM_MODE)
Zoom mode key.
Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.)
actual val TvContentsMenu = Key(KeyEvent.KEYCODE_TV_CONTENTS_MENU)
Contents menu key.
Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control Code
actual val TvMediaContextMenu = Key(KeyEvent.KEYCODE_TV_MEDIA_CONTEXT_MENU)
Media context menu key.
Goes to the context menu of media contents. Corresponds to Media Context-sensitive Menu (0x11) of CEC User Control Code.
actual val TvTimerProgramming = Key(KeyEvent.KEYCODE_TV_TIMER_PROGRAMMING)
Timer programming key.
Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of CEC User Control Code.
actual val StemPrimary = Key(KeyEvent.KEYCODE_STEM_PRIMARY)
Primary stem key for Wearables.
Main power/reset button.
actual val Stem1 = Key(KeyEvent.KEYCODE_STEM_1)
Generic stem key 1 for Wearables.
actual val Stem2 = Key(KeyEvent.KEYCODE_STEM_2)
Generic stem key 2 for Wearables.
actual val Stem3 = Key(KeyEvent.KEYCODE_STEM_3)
Generic stem key 3 for Wearables.
actual val AllApps = Key(KeyEvent.KEYCODE_ALL_APPS)
Show all apps.
actual val Refresh = Key(KeyEvent.KEYCODE_REFRESH)
Refresh key.
actual val ThumbsUp = Key(KeyEvent.KEYCODE_THUMBS_UP)
Thumbs up key. Apps can use this to let user up-vote content.
actual val ThumbsDown = Key(KeyEvent.KEYCODE_THUMBS_DOWN)
Thumbs down key. Apps can use this to let user down-vote content.
actual val ProfileSwitch = Key(KeyEvent.KEYCODE_PROFILE_SWITCH)
Used to switch current account
that is consuming content. May
be consumed by system to set account globally.
Code Examples
KeyEventIsAltPressedSample
@Composable
fun KeyEventIsAltPressedSample() {
Box(
Modifier.onKeyEvent {
if (it.isAltPressed && it.key == Key.A) {
println("Alt + A is pressed")
true
} else {
false
}
}
.focusable()
)
}