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} 114 115/** 116 * Criteria for keyboard layout selection 117 */ 118enum KeyboardLayoutSelectionCriteria { 119 // Manual selection by user 120 USER = 0; 121 // Auto-detection based on device provided language tag and layout type 122 DEVICE = 1; 123 // Auto-detection based on IME provided language tag and layout type 124 VIRTUAL_KEYBOARD = 2; 125 // Default selection 126 DEFAULT = 3; 127} 128 129/** 130 * Contains usage type/category definitions. 131 * Logged in InputDeviceUsageReported atom. 132 */ 133enum InputDeviceUsageType { 134 UNKNOWN = 0; 135 // Miscellaneous buttons (such as volume, power, stylus buttons, remote controls etc.) 136 // that are not categorized a full keyboards. 137 BUTTONS = 1; 138 // An alphabetical physical keyboard. 139 KEYBOARD = 2; 140 // A D-Pad. 141 DPAD = 3; 142 // Gamepad buttons. 143 GAMEPAD = 4; 144 // A joystick, like one part of a gaming controller. 145 JOYSTICK = 5; 146 // A mouse that controls an on-screen cursor. (Touchpads are not included) 147 MOUSE = 6; 148 // A mouse that is operating under Pointer Capture mode. 149 MOUSE_CAPTURED = 7; 150 // A touchpad (trackpad) that controls an on-screen cursor. 151 TOUCHPAD = 8; 152 // A touchpad that is operating under Pointer Capture mode. 153 TOUCHPAD_CAPTURED = 9; 154 // A rotary encoder. 155 ROTARY_ENCODER = 10; 156 // A stylus, where touches are mapped directly to the display. 157 STYLUS_DIRECT = 11; 158 // A stylus that interacts with a display indirectly, such as by controlling an 159 // on-screen cursor. This includes external drawing tablets that don't have a built-in 160 // display. 161 STYLUS_INDIRECT = 12; 162 // A stylus that reports some information through Bluetooth that is then fused 163 // with touch information from the built-in touchscreen. 164 STYLUS_FUSED = 13; 165 // A touch device that navigates through the UI using gestures. 166 TOUCH_NAVIGATION = 14; 167 // A touchscreen, where touches are mapped directly to the display. 168 TOUCHSCREEN = 15; 169 // A trackball. 170 TRACKBALL = 16; 171}; 172 173/** 174 * Contains buses through which an input device can be connected. 175 * Logged in InputDeviceUsageReported atom. 176 */ 177enum InputDeviceBus { 178 OTHER = 0; 179 // Universal Serial Bus 180 USB = 1; 181 // Bluetooth or Bluetooth Low Energy (BLE) 182 BLUETOOTH = 2; 183 // Universal Stylus Initiative (USI) protocol (https://universalstylus.org) 184 USI = 3; 185} 186