1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.input; 20 21option java_outer_classname = "InputProtoEnums"; 22option java_multiple_files = true; 23 24/** 25 * Contains the key events that are pressed from keyboard 26 * Logged in KeyboardSystemsEventReported atom 27 */ 28enum KeyboardSystemEvent { 29 UNSPECIFIED = 0; 30 // Go to Homescreen 31 HOME = 1; 32 // Open Overview/Recent apps 33 RECENT_APPS = 2; 34 // Go back 35 BACK = 3; 36 // Toggle recent apps 37 APP_SWITCH = 4; 38 // Launch assistant app 39 LAUNCH_ASSISTANT = 5; 40 // Launch assistant in voice mode 41 LAUNCH_VOICE_ASSISTANT = 6; 42 // Launch settings 43 LAUNCH_SYSTEM_SETTINGS = 7; 44 // Open/close notification panel 45 TOGGLE_NOTIFICATION_PANEL = 8; 46 // Show/hide taskbar 47 TOGGLE_TASKBAR = 9; 48 // Take full screenshot 49 TAKE_SCREENSHOT = 10; 50 // Show system shortcut list 51 OPEN_SHORTCUT_HELPER = 11; 52 // Increase display brightness 53 BRIGHTNESS_UP = 12; 54 // Decrease display brightness 55 BRIGHTNESS_DOWN = 13; 56 // Increase keyboard backlight brightness 57 KEYBOARD_BACKLIGHT_UP = 14; 58 // Decrease keyboard backlight brightness 59 KEYBOARD_BACKLIGHT_DOWN = 15; 60 // Turn keyboard backlight on/off 61 KEYBOARD_BACKLIGHT_TOGGLE = 16; 62 // Increase speaker volume 63 VOLUME_UP = 17; 64 // Decrease speaker volume 65 VOLUME_DOWN = 18; 66 // Mute speaker volume 67 VOLUME_MUTE = 19; 68 // Open app drawer 69 ALL_APPS = 20; 70 // Open default search activity 71 LAUNCH_SEARCH = 21; 72 // Change IME language 73 LANGUAGE_SWITCH = 22; 74 // Launch app drawer in accessibility mode 75 ACCESSIBILITY_ALL_APPS = 23; 76 // Toggle caps lock 77 TOGGLE_CAPS_LOCK = 24; 78 // Mute system microphone 79 SYSTEM_MUTE = 25; 80 // Navigate to/from split screen mode 81 SPLIT_SCREEN_NAVIGATION = 26; 82 // Trigger bug report 83 TRIGGER_BUG_REPORT = 27; 84 // Lock the device 85 LOCK_SCREEN = 28; 86 // Open notes app 87 OPEN_NOTES = 29; 88 // Power button pressed 89 TOGGLE_POWER = 30; 90 // System navigation keys 91 SYSTEM_NAVIGATION = 31; 92 // Sleep button press 93 SLEEP = 32; 94 // Wakeup button pressed 95 WAKEUP = 33; 96 // Media keys like play, pause, next, previous pressed 97 MEDIA_KEY = 34; 98 // Application launch shortcuts 99 LAUNCH_DEFAULT_BROWSER = 35; 100 LAUNCH_DEFAULT_EMAIL = 36; 101 LAUNCH_DEFAULT_CONTACTS = 37; 102 LAUNCH_DEFAULT_CALENDAR = 38; 103 LAUNCH_DEFAULT_CALCULATOR = 39; 104 LAUNCH_DEFAULT_MUSIC = 40; 105 LAUNCH_DEFAULT_MAPS = 41; 106 LAUNCH_DEFAULT_MESSAGING = 42; 107 LAUNCH_DEFAULT_GALLERY = 43; 108 LAUNCH_DEFAULT_FILES = 44; 109 LAUNCH_DEFAULT_WEATHER = 45; 110 LAUNCH_DEFAULT_FITNESS = 46; 111 // Launch application by package name defined by custom overlays for OEM specific shortcuts 112 LAUNCH_APPLICATION_BY_PACKAGE_NAME = 47; 113 // Enter desktop mode 114 DESKTOP_MODE = 48; 115 // Navigate to/from a multiwindow mode 116 MULTI_WINDOW_NAVIGATION = 49; 117 // Change split screen focus 118 CHANGE_SPLITSCREEN_FOCUS = 50; 119} 120 121/** 122 * Criteria for keyboard layout selection 123 * DEPRECATED: Since Enums should include a default UNSPECIFIED value 124 * as the first value in the declaration 125 */ 126enum KeyboardLayoutSelectionCriteria { 127 option deprecated = true; 128 // Manual selection by user 129 USER = 0; 130 // Auto-detection based on device provided language tag and layout type 131 DEVICE = 1; 132 // Auto-detection based on IME provided language tag and layout type 133 VIRTUAL_KEYBOARD = 2; 134 // Default selection 135 DEFAULT = 3; 136} 137 138/** 139 * Criteria for keyboard layout selection 140 */ 141enum LayoutSelectionCriteriaKeyboard { 142 // Unspecified 143 LAYOUT_SELECTION_CRITERIA_UNSPECIFIED = 0; 144 // Manual selection by user 145 LAYOUT_SELECTION_CRITERIA_USER = 1; 146 // Auto-detection based on device provided language tag and layout type 147 LAYOUT_SELECTION_CRITERIA_DEVICE = 2; 148 // Auto-detection based on IME provided language tag and layout type 149 LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD = 3; 150 // Default selection 151 LAYOUT_SELECTION_CRITERIA_DEFAULT = 4; 152} 153 154/** 155 * Keyboard Layout Type 156 * This enum is for layout types provided both by the physical keyboard 157 * and the IME 158 */ 159enum KeyboardLayoutType { 160 LAYOUT_TYPE_UNDEFINED = 0; 161 LAYOUT_TYPE_QWERTY = 1; 162 LAYOUT_TYPE_QWERTZ = 2; 163 LAYOUT_TYPE_AZERTY = 3; 164 LAYOUT_TYPE_DVORAK = 4; 165 LAYOUT_TYPE_COLEMAK = 5; 166 LAYOUT_TYPE_WORKMAN = 6; 167 LAYOUT_TYPE_TURKISH_F = 7; 168 LAYOUT_TYPE_TURKISH_Q = 8; 169 LAYOUT_TYPE_EXTENDED = 9; 170} 171 172/** 173 * Contains usage type/category definitions. 174 * Logged in InputDeviceUsageReported atom. 175 */ 176enum InputDeviceUsageType { 177 UNKNOWN = 0; 178 // Miscellaneous buttons (such as volume, power, stylus buttons, remote controls etc.) 179 // that are not categorized a full keyboards. 180 BUTTONS = 1; 181 // An alphabetical physical keyboard. 182 KEYBOARD = 2; 183 // A D-Pad. 184 DPAD = 3; 185 // Gamepad buttons. 186 GAMEPAD = 4; 187 // A joystick, like one part of a gaming controller. 188 JOYSTICK = 5; 189 // A mouse that controls an on-screen cursor. (Touchpads are not included) 190 MOUSE = 6; 191 // A mouse that is operating under Pointer Capture mode. 192 MOUSE_CAPTURED = 7; 193 // A touchpad (trackpad) that controls an on-screen cursor. 194 TOUCHPAD = 8; 195 // A touchpad that is operating under Pointer Capture mode. 196 TOUCHPAD_CAPTURED = 9; 197 // A rotary encoder. 198 ROTARY_ENCODER = 10; 199 // A stylus, where touches are mapped directly to the display. 200 STYLUS_DIRECT = 11; 201 // A stylus that interacts with a display indirectly, such as by controlling an 202 // on-screen cursor. This includes external drawing tablets that don't have a built-in 203 // display. 204 STYLUS_INDIRECT = 12; 205 // A stylus that reports some information through Bluetooth that is then fused 206 // with touch information from the built-in touchscreen. 207 STYLUS_FUSED = 13; 208 // A touch device that navigates through the UI using gestures. 209 TOUCH_NAVIGATION = 14; 210 // A touchscreen, where touches are mapped directly to the display. 211 TOUCHSCREEN = 15; 212 // A trackball. 213 TRACKBALL = 16; 214}; 215 216/** 217 * Contains buses through which an input device can be connected. 218 * Logged in InputDeviceUsageReported atom. 219 */ 220enum InputDeviceBus { 221 OTHER = 0; 222 // Universal Serial Bus 223 USB = 1; 224 // Bluetooth or Bluetooth Low Energy (BLE) 225 BLUETOOTH = 2; 226 // Universal Stylus Initiative (USI) protocol (https://universalstylus.org) 227 USI = 3; 228} 229