Appium-Python-Client 5.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. appium/__init__.py +17 -0
  2. appium/common/__init__.py +17 -0
  3. appium/common/exceptions.py +26 -0
  4. appium/common/helper.py +42 -0
  5. appium/common/logger.py +28 -0
  6. appium/options/__init__.py +0 -0
  7. appium/options/android/__init__.py +2 -0
  8. appium/options/android/common/__init__.py +0 -0
  9. appium/options/android/common/adb/__init__.py +0 -0
  10. appium/options/android/common/adb/adb_exec_timeout_option.py +41 -0
  11. appium/options/android/common/adb/adb_port_option.py +38 -0
  12. appium/options/android/common/adb/allow_delay_adb_option.py +39 -0
  13. appium/options/android/common/adb/build_tools_version_option.py +42 -0
  14. appium/options/android/common/adb/clear_device_logs_on_start_option.py +40 -0
  15. appium/options/android/common/adb/ignore_hidden_api_policy_error_option.py +40 -0
  16. appium/options/android/common/adb/logcat_filter_specs_option.py +42 -0
  17. appium/options/android/common/adb/logcat_format_option.py +39 -0
  18. appium/options/android/common/adb/mock_location_app_option.py +42 -0
  19. appium/options/android/common/adb/remote_adb_host_option.py +39 -0
  20. appium/options/android/common/adb/skip_logcat_capture_option.py +40 -0
  21. appium/options/android/common/adb/suppress_kill_server_option.py +39 -0
  22. appium/options/android/common/app/__init__.py +0 -0
  23. appium/options/android/common/app/allow_test_packages_option.py +40 -0
  24. appium/options/android/common/app/android_install_timeout_option.py +43 -0
  25. appium/options/android/common/app/app_activity_option.py +39 -0
  26. appium/options/android/common/app/app_package_option.py +39 -0
  27. appium/options/android/common/app/app_wait_activity_option.py +40 -0
  28. appium/options/android/common/app/app_wait_duration_option.py +41 -0
  29. appium/options/android/common/app/app_wait_for_launch_option.py +41 -0
  30. appium/options/android/common/app/app_wait_package_option.py +40 -0
  31. appium/options/android/common/app/auto_grant_premissions_option.py +40 -0
  32. appium/options/android/common/app/enforce_app_install_option.py +40 -0
  33. appium/options/android/common/app/intent_action_option.py +40 -0
  34. appium/options/android/common/app/intent_category_option.py +40 -0
  35. appium/options/android/common/app/intent_flags_option.py +40 -0
  36. appium/options/android/common/app/optional_intent_arguments_option.py +40 -0
  37. appium/options/android/common/app/remote_apps_cache_limit_option.py +42 -0
  38. appium/options/android/common/app/uninstall_other_packages_option.py +39 -0
  39. appium/options/android/common/avd/__init__.py +0 -0
  40. appium/options/android/common/avd/avd_args_option.py +38 -0
  41. appium/options/android/common/avd/avd_env_option.py +38 -0
  42. appium/options/android/common/avd/avd_launch_timeout_option.py +41 -0
  43. appium/options/android/common/avd/avd_option.py +41 -0
  44. appium/options/android/common/avd/avd_ready_timeout_option.py +41 -0
  45. appium/options/android/common/avd/gps_enabled_option.py +39 -0
  46. appium/options/android/common/avd/network_speed_option.py +41 -0
  47. appium/options/android/common/context/__init__.py +0 -0
  48. appium/options/android/common/context/auto_webview_timeout_option.py +41 -0
  49. appium/options/android/common/context/chrome_logging_prefs_option.py +41 -0
  50. appium/options/android/common/context/chrome_options_option.py +40 -0
  51. appium/options/android/common/context/chromedriver_args_option.py +41 -0
  52. appium/options/android/common/context/chromedriver_chrome_mapping_file_option.py +43 -0
  53. appium/options/android/common/context/chromedriver_disable_build_check_option.py +41 -0
  54. appium/options/android/common/context/chromedriver_executable_dir_option.py +43 -0
  55. appium/options/android/common/context/chromedriver_executable_option.py +38 -0
  56. appium/options/android/common/context/chromedriver_port_option.py +39 -0
  57. appium/options/android/common/context/chromedriver_ports_option.py +39 -0
  58. appium/options/android/common/context/chromedriver_use_system_executable_option.py +40 -0
  59. appium/options/android/common/context/ensure_webviews_have_pages_option.py +40 -0
  60. appium/options/android/common/context/extract_chrome_android_package_from_context_name_option.py +40 -0
  61. appium/options/android/common/context/native_web_screenshot_option.py +40 -0
  62. appium/options/android/common/context/recreate_chrome_driver_sessions_option.py +41 -0
  63. appium/options/android/common/context/show_chromedriver_log_option.py +39 -0
  64. appium/options/android/common/context/webview_devtools_port_option.py +40 -0
  65. appium/options/android/common/localization/__init__.py +0 -0
  66. appium/options/android/common/localization/locale_script_option.py +40 -0
  67. appium/options/android/common/locking/__init__.py +0 -0
  68. appium/options/android/common/locking/skip_unlock_option.py +42 -0
  69. appium/options/android/common/locking/unlock_key_option.py +40 -0
  70. appium/options/android/common/locking/unlock_strategy_option.py +40 -0
  71. appium/options/android/common/locking/unlock_success_timeout_option.py +43 -0
  72. appium/options/android/common/locking/unlock_type_option.py +40 -0
  73. appium/options/android/common/mjpeg/__init__.py +0 -0
  74. appium/options/android/common/mjpeg/mjpeg_screenshot_url_option.py +40 -0
  75. appium/options/android/common/other/__init__.py +0 -0
  76. appium/options/android/common/other/disable_suppress_accessibility_service_option.py +40 -0
  77. appium/options/android/common/other/user_profile_option.py +42 -0
  78. appium/options/android/common/signing/__init__.py +0 -0
  79. appium/options/android/common/signing/key_alias_option.py +40 -0
  80. appium/options/android/common/signing/key_password_option.py +40 -0
  81. appium/options/android/common/signing/keystore_password_option.py +40 -0
  82. appium/options/android/common/signing/keystore_path_option.py +40 -0
  83. appium/options/android/common/signing/no_sign_option.py +42 -0
  84. appium/options/android/common/signing/use_keystore_option.py +42 -0
  85. appium/options/android/espresso/__init__.py +0 -0
  86. appium/options/android/espresso/activity_options_option.py +41 -0
  87. appium/options/android/espresso/app_locale_option.py +44 -0
  88. appium/options/android/espresso/base.py +221 -0
  89. appium/options/android/espresso/espresso_build_config_option.py +46 -0
  90. appium/options/android/espresso/espresso_server_launch_timeout_option.py +43 -0
  91. appium/options/android/espresso/force_espresso_rebuild_option.py +41 -0
  92. appium/options/android/espresso/intent_options_option.py +41 -0
  93. appium/options/android/espresso/show_gradle_log_option.py +39 -0
  94. appium/options/android/uiautomator2/__init__.py +0 -0
  95. appium/options/android/uiautomator2/base.py +221 -0
  96. appium/options/android/uiautomator2/disable_window_animation_option.py +40 -0
  97. appium/options/android/uiautomator2/mjpeg_server_port_option.py +41 -0
  98. appium/options/android/uiautomator2/skip_device_initialization_option.py +40 -0
  99. appium/options/android/uiautomator2/skip_server_installation_option.py +44 -0
  100. appium/options/android/uiautomator2/uiautomator2_server_install_timeout_option.py +44 -0
  101. appium/options/android/uiautomator2/uiautomator2_server_launch_timeout_option.py +44 -0
  102. appium/options/android/uiautomator2/uiautomator2_server_read_timeout_option.py +46 -0
  103. appium/options/common/__init__.py +1 -0
  104. appium/options/common/app_option.py +41 -0
  105. appium/options/common/auto_web_view_option.py +40 -0
  106. appium/options/common/automation_name_option.py +38 -0
  107. appium/options/common/base.py +125 -0
  108. appium/options/common/browser_name_option.py +38 -0
  109. appium/options/common/bundle_id_option.py +38 -0
  110. appium/options/common/clear_system_files_option.py +38 -0
  111. appium/options/common/device_name_option.py +38 -0
  112. appium/options/common/enable_performance_logging_option.py +38 -0
  113. appium/options/common/event_timings_option.py +40 -0
  114. appium/options/common/full_reset_option.py +38 -0
  115. appium/options/common/is_headless_option.py +39 -0
  116. appium/options/common/language_option.py +38 -0
  117. appium/options/common/locale_option.py +38 -0
  118. appium/options/common/new_command_timeout_option.py +41 -0
  119. appium/options/common/no_reset_option.py +38 -0
  120. appium/options/common/orientation_option.py +40 -0
  121. appium/options/common/other_apps_option.py +39 -0
  122. appium/options/common/platform_version_option.py +40 -0
  123. appium/options/common/postrun_option.py +39 -0
  124. appium/options/common/prerun_option.py +40 -0
  125. appium/options/common/print_page_source_on_find_failure_option.py +40 -0
  126. appium/options/common/skip_log_capture_option.py +38 -0
  127. appium/options/common/supports_capabilities.py +26 -0
  128. appium/options/common/system_host_option.py +38 -0
  129. appium/options/common/system_port_option.py +38 -0
  130. appium/options/common/udid_option.py +38 -0
  131. appium/options/flutter_integration/__init__.py +15 -0
  132. appium/options/flutter_integration/base.py +39 -0
  133. appium/options/flutter_integration/flutter_element_wait_timeout_option.py +50 -0
  134. appium/options/flutter_integration/flutter_enable_mock_camera_option.py +44 -0
  135. appium/options/flutter_integration/flutter_server_launch_timeout_option.py +51 -0
  136. appium/options/flutter_integration/flutter_system_port_option.py +45 -0
  137. appium/options/gecko/__init__.py +1 -0
  138. appium/options/gecko/android_storage_option.py +39 -0
  139. appium/options/gecko/base.py +51 -0
  140. appium/options/gecko/firefox_options_option.py +38 -0
  141. appium/options/gecko/marionette_port_option.py +43 -0
  142. appium/options/gecko/verbosity_option.py +40 -0
  143. appium/options/ios/__init__.py +2 -0
  144. appium/options/ios/safari/__init__.py +0 -0
  145. appium/options/ios/safari/automatic_inspection_option.py +41 -0
  146. appium/options/ios/safari/automatic_profiling_option.py +41 -0
  147. appium/options/ios/safari/base.py +51 -0
  148. appium/options/ios/safari/device_name_option.py +43 -0
  149. appium/options/ios/safari/device_type_option.py +41 -0
  150. appium/options/ios/safari/device_udid_option.py +43 -0
  151. appium/options/ios/safari/platform_build_version_option.py +41 -0
  152. appium/options/ios/safari/platform_version_option.py +41 -0
  153. appium/options/ios/safari/use_simulator_option.py +41 -0
  154. appium/options/ios/safari/webkit_webrtc_option.py +52 -0
  155. appium/options/ios/xcuitest/__init__.py +0 -0
  156. appium/options/ios/xcuitest/app/__init__.py +0 -0
  157. appium/options/ios/xcuitest/app/app_install_strategy_option.py +46 -0
  158. appium/options/ios/xcuitest/app/app_push_timeout_option.py +42 -0
  159. appium/options/ios/xcuitest/app/localizable_strings_dir_option.py +39 -0
  160. appium/options/ios/xcuitest/base.py +223 -0
  161. appium/options/ios/xcuitest/general/__init__.py +0 -0
  162. appium/options/ios/xcuitest/general/include_device_caps_to_session_info_option.py +41 -0
  163. appium/options/ios/xcuitest/general/reset_location_service_option.py +39 -0
  164. appium/options/ios/xcuitest/other/__init__.py +0 -0
  165. appium/options/ios/xcuitest/other/command_timeouts_option.py +57 -0
  166. appium/options/ios/xcuitest/other/launch_with_idb_option.py +42 -0
  167. appium/options/ios/xcuitest/other/show_ios_log_option.py +39 -0
  168. appium/options/ios/xcuitest/other/use_json_source_option.py +39 -0
  169. appium/options/ios/xcuitest/simulator/__init__.py +0 -0
  170. appium/options/ios/xcuitest/simulator/calendar_access_authorized_option.py +41 -0
  171. appium/options/ios/xcuitest/simulator/calendar_format_option.py +38 -0
  172. appium/options/ios/xcuitest/simulator/connect_hardware_keyboard_option.py +43 -0
  173. appium/options/ios/xcuitest/simulator/custom_ssl_cert_option.py +39 -0
  174. appium/options/ios/xcuitest/simulator/enforce_fresh_simulator_creation_option.py +39 -0
  175. appium/options/ios/xcuitest/simulator/force_simulator_software_keyboard_presence_option.py +45 -0
  176. appium/options/ios/xcuitest/simulator/ios_simulator_logs_predicate_option.py +38 -0
  177. appium/options/ios/xcuitest/simulator/keep_key_chains_option.py +39 -0
  178. appium/options/ios/xcuitest/simulator/keychains_exclude_patterns_option.py +44 -0
  179. appium/options/ios/xcuitest/simulator/permissions_option.py +50 -0
  180. appium/options/ios/xcuitest/simulator/reduce_motion_option.py +40 -0
  181. appium/options/ios/xcuitest/simulator/reset_on_session_start_only_option.py +41 -0
  182. appium/options/ios/xcuitest/simulator/scale_factor_option.py +44 -0
  183. appium/options/ios/xcuitest/simulator/shutdown_other_simulators_option.py +44 -0
  184. appium/options/ios/xcuitest/simulator/simulator_devices_set_path_option.py +41 -0
  185. appium/options/ios/xcuitest/simulator/simulator_pasteboard_automatic_sync_option.py +42 -0
  186. appium/options/ios/xcuitest/simulator/simulator_startup_timeout_option.py +46 -0
  187. appium/options/ios/xcuitest/simulator/simulator_trace_pointer_option.py +41 -0
  188. appium/options/ios/xcuitest/simulator/simulator_window_center_option.py +41 -0
  189. appium/options/ios/xcuitest/wda/__init__.py +0 -0
  190. appium/options/ios/xcuitest/wda/allow_provisioning_device_regitration_option.py +40 -0
  191. appium/options/ios/xcuitest/wda/auto_accept_alerts_option.py +39 -0
  192. appium/options/ios/xcuitest/wda/auto_disimiss_alerts_option.py +39 -0
  193. appium/options/ios/xcuitest/wda/derived_data_path_option.py +41 -0
  194. appium/options/ios/xcuitest/wda/disable_automatic_screenshots_option.py +40 -0
  195. appium/options/ios/xcuitest/wda/force_app_launch_option.py +42 -0
  196. appium/options/ios/xcuitest/wda/keychain_password_option.py +39 -0
  197. appium/options/ios/xcuitest/wda/keychain_path_option.py +39 -0
  198. appium/options/ios/xcuitest/wda/max_typing_frequency_option.py +40 -0
  199. appium/options/ios/xcuitest/wda/mjpeg_server_port_option.py +42 -0
  200. appium/options/ios/xcuitest/wda/process_arguments_option.py +42 -0
  201. appium/options/ios/xcuitest/wda/result_bundle_path_option.py +42 -0
  202. appium/options/ios/xcuitest/wda/screenshot_quality_option.py +42 -0
  203. appium/options/ios/xcuitest/wda/should_terminate_app_option.py +42 -0
  204. appium/options/ios/xcuitest/wda/should_use_singleton_test_manager_option.py +39 -0
  205. appium/options/ios/xcuitest/wda/show_xcode_log_option.py +40 -0
  206. appium/options/ios/xcuitest/wda/simple_is_visible_check_option.py +42 -0
  207. appium/options/ios/xcuitest/wda/updated_wda_bundle_id_option.py +39 -0
  208. appium/options/ios/xcuitest/wda/use_native_caching_strategy_option.py +41 -0
  209. appium/options/ios/xcuitest/wda/use_new_wda_option.py +51 -0
  210. appium/options/ios/xcuitest/wda/use_prebuilt_wda_option.py +39 -0
  211. appium/options/ios/xcuitest/wda/use_simple_build_test_option.py +40 -0
  212. appium/options/ios/xcuitest/wda/use_xctestrun_file_option.py +49 -0
  213. appium/options/ios/xcuitest/wda/wait_for_idle_timeout_option.py +45 -0
  214. appium/options/ios/xcuitest/wda/wait_for_quiescence_option.py +42 -0
  215. appium/options/ios/xcuitest/wda/wda_base_url_option.py +41 -0
  216. appium/options/ios/xcuitest/wda/wda_connection_timeout_option.py +43 -0
  217. appium/options/ios/xcuitest/wda/wda_eventloop_idle_delay_option.py +46 -0
  218. appium/options/ios/xcuitest/wda/wda_launch_timeout_option.py +41 -0
  219. appium/options/ios/xcuitest/wda/wda_local_port_option.py +41 -0
  220. appium/options/ios/xcuitest/wda/wda_startup_retries_option.py +39 -0
  221. appium/options/ios/xcuitest/wda/wda_startup_retry_interval_option.py +43 -0
  222. appium/options/ios/xcuitest/wda/web_driver_agent_url_option.py +39 -0
  223. appium/options/ios/xcuitest/wda/xcode_org_id_option.py +39 -0
  224. appium/options/ios/xcuitest/wda/xcode_signing_id_option.py +39 -0
  225. appium/options/ios/xcuitest/webview/__init__.py +0 -0
  226. appium/options/ios/xcuitest/webview/absolute_web_locations_option.py +42 -0
  227. appium/options/ios/xcuitest/webview/additional_webview_bundle_ids_option.py +40 -0
  228. appium/options/ios/xcuitest/webview/enable_async_execute_from_https_option.py +39 -0
  229. appium/options/ios/xcuitest/webview/full_context_list_option.py +42 -0
  230. appium/options/ios/xcuitest/webview/include_safari_in_webviews_option.py +41 -0
  231. appium/options/ios/xcuitest/webview/native_web_tap_option.py +40 -0
  232. appium/options/ios/xcuitest/webview/safari_garbage_collect_option.py +39 -0
  233. appium/options/ios/xcuitest/webview/safari_ignore_fraud_warning_option.py +39 -0
  234. appium/options/ios/xcuitest/webview/safari_ignore_web_hostnames_option.py +42 -0
  235. appium/options/ios/xcuitest/webview/safari_initial_url_option.py +38 -0
  236. appium/options/ios/xcuitest/webview/safari_log_all_communication_hex_dump_option.py +43 -0
  237. appium/options/ios/xcuitest/webview/safari_log_all_communication_option.py +40 -0
  238. appium/options/ios/xcuitest/webview/safari_open_links_in_background_option.py +39 -0
  239. appium/options/ios/xcuitest/webview/safari_socket_chunk_size_option.py +41 -0
  240. appium/options/ios/xcuitest/webview/safari_web_inspector_max_frame_length_option.py +41 -0
  241. appium/options/ios/xcuitest/webview/webkit_response_timeout_option.py +43 -0
  242. appium/options/ios/xcuitest/webview/webview_connect_retries_option.py +40 -0
  243. appium/options/ios/xcuitest/webview/webview_connect_timeout_option.py +43 -0
  244. appium/options/mac/__init__.py +1 -0
  245. appium/options/mac/mac2/__init__.py +0 -0
  246. appium/options/mac/mac2/app_path_option.py +39 -0
  247. appium/options/mac/mac2/arguments_option.py +39 -0
  248. appium/options/mac/mac2/base.py +113 -0
  249. appium/options/mac/mac2/bootstrap_root_option.py +41 -0
  250. appium/options/mac/mac2/environment_option.py +41 -0
  251. appium/options/mac/mac2/server_startup_timeout_option.py +44 -0
  252. appium/options/mac/mac2/show_server_logs_option.py +39 -0
  253. appium/options/mac/mac2/skip_app_kill_option.py +40 -0
  254. appium/options/mac/mac2/web_driver_agent_mac_url_option.py +39 -0
  255. appium/options/windows/__init__.py +1 -0
  256. appium/options/windows/windows/__init__.py +0 -0
  257. appium/options/windows/windows/app_arguments_option.py +40 -0
  258. appium/options/windows/windows/app_top_level_window_option.py +40 -0
  259. appium/options/windows/windows/app_working_dir_option.py +40 -0
  260. appium/options/windows/windows/base.py +97 -0
  261. appium/options/windows/windows/create_session_timeout_option.py +45 -0
  262. appium/options/windows/windows/expreimental_web_driver_option.py +39 -0
  263. appium/options/windows/windows/wait_for_app_launch_option.py +43 -0
  264. appium/protocols/__init__.py +13 -0
  265. appium/protocols/webdriver/__init__.py +13 -0
  266. appium/protocols/webdriver/can_execute_commands.py +23 -0
  267. appium/protocols/webdriver/can_execute_scripts.py +27 -0
  268. appium/protocols/webdriver/can_find_elements.py +32 -0
  269. appium/protocols/webdriver/can_remember_extension_presence.py +23 -0
  270. appium/py.typed +0 -0
  271. appium/version.py +22 -0
  272. appium/webdriver/__init__.py +20 -0
  273. appium/webdriver/appium_connection.py +65 -0
  274. appium/webdriver/appium_service.py +330 -0
  275. appium/webdriver/applicationstate.py +21 -0
  276. appium/webdriver/client_config.py +38 -0
  277. appium/webdriver/clipboard_content_type.py +19 -0
  278. appium/webdriver/command_method.py +27 -0
  279. appium/webdriver/common/__init__.py +17 -0
  280. appium/webdriver/common/appiumby.py +54 -0
  281. appium/webdriver/connectiontype.py +42 -0
  282. appium/webdriver/errorhandler.py +125 -0
  283. appium/webdriver/extensions/__init__.py +13 -0
  284. appium/webdriver/extensions/action_helpers.py +188 -0
  285. appium/webdriver/extensions/android/__init__.py +0 -0
  286. appium/webdriver/extensions/android/activities.py +65 -0
  287. appium/webdriver/extensions/android/common.py +59 -0
  288. appium/webdriver/extensions/android/display.py +48 -0
  289. appium/webdriver/extensions/android/gsm.py +147 -0
  290. appium/webdriver/extensions/android/nativekey.py +1119 -0
  291. appium/webdriver/extensions/android/network.py +175 -0
  292. appium/webdriver/extensions/android/performance.py +85 -0
  293. appium/webdriver/extensions/android/power.py +80 -0
  294. appium/webdriver/extensions/android/sms.py +50 -0
  295. appium/webdriver/extensions/android/system_bars.py +58 -0
  296. appium/webdriver/extensions/applications.py +274 -0
  297. appium/webdriver/extensions/clipboard.py +107 -0
  298. appium/webdriver/extensions/context.py +63 -0
  299. appium/webdriver/extensions/device_time.py +75 -0
  300. appium/webdriver/extensions/execute_driver.py +60 -0
  301. appium/webdriver/extensions/execute_mobile_command.py +62 -0
  302. appium/webdriver/extensions/flutter_integration/__init__.py +13 -0
  303. appium/webdriver/extensions/flutter_integration/flutter_commands.py +296 -0
  304. appium/webdriver/extensions/flutter_integration/flutter_finder.py +55 -0
  305. appium/webdriver/extensions/flutter_integration/scroll_directions.py +6 -0
  306. appium/webdriver/extensions/hw_actions.py +149 -0
  307. appium/webdriver/extensions/images_comparison.py +132 -0
  308. appium/webdriver/extensions/keyboard.py +168 -0
  309. appium/webdriver/extensions/location.py +98 -0
  310. appium/webdriver/extensions/log_event.py +68 -0
  311. appium/webdriver/extensions/logs.py +53 -0
  312. appium/webdriver/extensions/remote_fs.py +110 -0
  313. appium/webdriver/extensions/screen_record.py +207 -0
  314. appium/webdriver/extensions/session.py +41 -0
  315. appium/webdriver/extensions/settings.py +49 -0
  316. appium/webdriver/locator_converter.py +29 -0
  317. appium/webdriver/mobilecommand.py +104 -0
  318. appium/webdriver/switch_to.py +35 -0
  319. appium/webdriver/webdriver.py +495 -0
  320. appium/webdriver/webelement.py +130 -0
  321. appium_python_client-5.2.0.dist-info/METADATA +573 -0
  322. appium_python_client-5.2.0.dist-info/RECORD +324 -0
  323. appium_python_client-5.2.0.dist-info/WHEEL +4 -0
  324. appium_python_client-5.2.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,1119 @@
1
+ #!/usr/bin/env python
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ class AndroidKey:
17
+ # Key code constant: Unknown key code.
18
+ UNKNOWN = 0
19
+
20
+ # Key code constant: Soft Left key.
21
+ # Usually situated below the display on phones and used as a multi-function
22
+ # feature key for selecting a software defined function shown on the bottom left
23
+ # of the display.
24
+ SOFT_LEFT = 1
25
+
26
+ # Key code constant: Soft Right key.
27
+ # Usually situated below the display on phones and used as a multi-function
28
+ # feature key for selecting a software defined function shown on the bottom right
29
+ # of the display.
30
+ SOFT_RIGHT = 2
31
+
32
+ # Key code constant: Home key.
33
+ # This key is handled by the framework and is never delivered to applications.
34
+ HOME = 3
35
+
36
+ # Key code constant: Back key.
37
+ BACK = 4
38
+
39
+ # Key code constant: Call key.
40
+ CALL = 5
41
+
42
+ # Key code constant: End Call key.
43
+ ENDCALL = 6
44
+
45
+ # Key code constant: '0' key.
46
+ DIGIT_0 = 7
47
+
48
+ # Key code constant: '1' key.
49
+ DIGIT_1 = 8
50
+
51
+ # Key code constant: '2' key.
52
+ DIGIT_2 = 9
53
+
54
+ # Key code constant: '3' key.
55
+ DIGIT_3 = 10
56
+
57
+ # Key code constant: '4' key.
58
+ DIGIT_4 = 11
59
+
60
+ # Key code constant: '5' key.
61
+ DIGIT_5 = 12
62
+
63
+ # Key code constant: '6' key.
64
+ DIGIT_6 = 13
65
+
66
+ # Key code constant: '7' key.
67
+ DIGIT_7 = 14
68
+
69
+ # Key code constant: '8' key.
70
+ DIGIT_8 = 15
71
+
72
+ # Key code constant: '9' key.
73
+ DIGIT_9 = 16
74
+
75
+ # Key code constant: '*' key.
76
+ STAR = 17
77
+
78
+ # Key code constant: '#' key.
79
+ POUND = 18
80
+
81
+ # Key code constant: Directional Pad Up key.
82
+ # May also be synthesized from trackball motions.
83
+ DPAD_UP = 19
84
+
85
+ # Key code constant: Directional Pad Down key.
86
+ # May also be synthesized from trackball motions.
87
+ DPAD_DOWN = 20
88
+
89
+ # Key code constant: Directional Pad Left key.
90
+ # May also be synthesized from trackball motions.
91
+ DPAD_LEFT = 21
92
+
93
+ # Key code constant: Directional Pad Right key.
94
+ # May also be synthesized from trackball motions.
95
+ DPAD_RIGHT = 22
96
+
97
+ # Key code constant: Directional Pad Center key.
98
+ # May also be synthesized from trackball motions.
99
+ DPAD_CENTER = 23
100
+
101
+ # Key code constant: Volume Up key.
102
+ # Adjusts the speaker volume up.
103
+ VOLUME_UP = 24
104
+
105
+ # Key code constant: Volume Down key.
106
+ # Adjusts the speaker volume down.
107
+ VOLUME_DOWN = 25
108
+
109
+ # Key code constant: Power key.
110
+ POWER = 26
111
+
112
+ # Key code constant: Camera key.
113
+ # Used to launch a camera application or take pictures.
114
+ CAMERA = 27
115
+
116
+ # Key code constant: Clear key.
117
+ CLEAR = 28
118
+
119
+ # Key code constant: 'A' key.
120
+ A = 29
121
+
122
+ # Key code constant: 'B' key.
123
+ B = 30
124
+
125
+ # Key code constant: 'C' key.
126
+ C = 31
127
+
128
+ # Key code constant: 'D' key.
129
+ D = 32
130
+
131
+ # Key code constant: 'E' key.
132
+ E = 33
133
+
134
+ # Key code constant: 'F' key.
135
+ F = 34
136
+
137
+ # Key code constant: 'G' key.
138
+ G = 35
139
+
140
+ # Key code constant: 'H' key.
141
+ H = 36
142
+
143
+ # Key code constant: 'I' key.
144
+ I = 37
145
+
146
+ # Key code constant: 'J' key.
147
+ J = 38
148
+
149
+ # Key code constant: 'K' key.
150
+ K = 39
151
+
152
+ # Key code constant: 'L' key.
153
+ L = 40
154
+
155
+ # Key code constant: 'M' key.
156
+ M = 41
157
+
158
+ # Key code constant: 'N' key.
159
+ N = 42
160
+
161
+ # Key code constant: 'O' key.
162
+ O = 43
163
+
164
+ # Key code constant: 'P' key.
165
+ P = 44
166
+
167
+ # Key code constant: 'Q' key.
168
+ Q = 45
169
+
170
+ # Key code constant: 'R' key.
171
+ R = 46
172
+
173
+ # Key code constant: 'S' key.
174
+ S = 47
175
+
176
+ # Key code constant: 'T' key.
177
+ T = 48
178
+
179
+ # Key code constant: 'U' key.
180
+ U = 49
181
+
182
+ # Key code constant: 'V' key.
183
+ V = 50
184
+
185
+ # Key code constant: 'W' key.
186
+ W = 51
187
+
188
+ # Key code constant: 'X' key.
189
+ X = 52
190
+
191
+ # Key code constant: 'Y' key.
192
+ Y = 53
193
+
194
+ # Key code constant: 'Z' key.
195
+ Z = 54
196
+
197
+ # Key code constant: ',' key.
198
+ COMMA = 55
199
+
200
+ # Key code constant: '.' key.
201
+ PERIOD = 56
202
+
203
+ # Key code constant: Left Alt modifier key.
204
+ ALT_LEFT = 57
205
+
206
+ # Key code constant: Right Alt modifier key.
207
+ ALT_RIGHT = 58
208
+
209
+ # Key code constant: Left Shift modifier key.
210
+ SHIFT_LEFT = 59
211
+
212
+ # Key code constant: Right Shift modifier key.
213
+ SHIFT_RIGHT = 60
214
+
215
+ # Key code constant: Tab key.
216
+ TAB = 61
217
+
218
+ # Key code constant: Space key.
219
+ SPACE = 62
220
+
221
+ # Key code constant: Symbol modifier key.
222
+ # Used to enter alternate symbols.
223
+ SYM = 63
224
+
225
+ # Key code constant: Explorer special function key.
226
+ # Used to launch a browser application.
227
+ EXPLORER = 64
228
+
229
+ # Key code constant: Envelope special function key.
230
+ # Used to launch a mail application.
231
+ ENVELOPE = 65
232
+
233
+ # Key code constant: Enter key.
234
+ ENTER = 66
235
+
236
+ # Key code constant: Backspace key.
237
+ # Deletes characters before the insertion point, unlike {@link #FORWARD_DEL}.
238
+ DEL = 67
239
+
240
+ # Key code constant: '`' (backtick) key.
241
+ GRAVE = 68
242
+
243
+ # Key code constant: '-'.
244
+ MINUS = 69
245
+
246
+ # Key code constant: '=' key.
247
+ EQUALS = 70
248
+
249
+ # Key code constant: '[' key.
250
+ LEFT_BRACKET = 71
251
+
252
+ # Key code constant: ']' key.
253
+ RIGHT_BRACKET = 72
254
+
255
+ # Key code constant: '\' key.
256
+ BACKSLASH = 73
257
+
258
+ # Key code constant: ';' key.
259
+ SEMICOLON = 74
260
+
261
+ # Key code constant: ''' (apostrophe) key.
262
+ APOSTROPHE = 75
263
+
264
+ # Key code constant: '/' key.
265
+ SLASH = 76
266
+
267
+ # Key code constant: '@' key.
268
+ AT = 77
269
+
270
+ # Key code constant: Number modifier key.
271
+ # Used to enter numeric symbols.
272
+ # This key is not Num Lock; it is more like {@link #ALT_LEFT} and is
273
+ # interpreted as an ALT key
274
+ NUM = 78
275
+
276
+ # Key code constant: Headset Hook key.
277
+ # Used to hang up calls and stop media.
278
+ HEADSETHOOK = 79
279
+
280
+ # Key code constant: Camera Focus key.
281
+ # Used to focus the camera.
282
+ FOCUS = 80 # *Camera* focus
283
+
284
+ # Key code constant: '+' key.
285
+ PLUS = 81
286
+
287
+ # Key code constant: Menu key.
288
+ MENU = 82
289
+
290
+ # Key code constant: Notification key.
291
+ NOTIFICATION = 83
292
+
293
+ # Key code constant: Search key.
294
+ SEARCH = 84
295
+
296
+ # Key code constant: Play/Pause media key.
297
+ MEDIA_PLAY_PAUSE = 85
298
+
299
+ # Key code constant: Stop media key.
300
+ MEDIA_STOP = 86
301
+
302
+ # Key code constant: Play Next media key.
303
+ MEDIA_NEXT = 87
304
+
305
+ # Key code constant: Play Previous media key.
306
+ MEDIA_PREVIOUS = 88
307
+
308
+ # Key code constant: Rewind media key.
309
+ MEDIA_REWIND = 89
310
+
311
+ # Key code constant: Fast Forward media key.
312
+ MEDIA_FAST_FORWARD = 90
313
+
314
+ # Key code constant: Mute key.
315
+ # Mutes the microphone, unlike {@link #VOLUME_MUTE}.
316
+ MUTE = 91
317
+
318
+ # Key code constant: Page Up key.
319
+ PAGE_UP = 92
320
+
321
+ # Key code constant: Page Down key.
322
+ PAGE_DOWN = 93
323
+
324
+ # Key code constant: Picture Symbols modifier key.
325
+ # Used to switch symbol sets (Emoji, Kao-moji).
326
+
327
+ PICTSYMBOLS = 94 # switch symbol-sets (Emoji,Kao-moji)
328
+
329
+ # Key code constant: Switch Charset modifier key.
330
+ # Used to switch character sets (Kanji, Katakana).
331
+
332
+ SWITCH_CHARSET = 95 # switch char-sets (Kanji,Katakana)
333
+
334
+ # Key code constant: A Button key.
335
+ # On a game controller, the A button should be either the button labeled A
336
+ # or the first button on the bottom row of controller buttons.
337
+ BUTTON_A = 96
338
+
339
+ # Key code constant: B Button key.
340
+ # On a game controller, the B button should be either the button labeled B
341
+ # or the second button on the bottom row of controller buttons.
342
+ BUTTON_B = 97
343
+
344
+ # Key code constant: C Button key.
345
+ # On a game controller, the C button should be either the button labeled C
346
+ # or the third button on the bottom row of controller buttons.
347
+ BUTTON_C = 98
348
+
349
+ # Key code constant: X Button key.
350
+ # On a game controller, the X button should be either the button labeled X
351
+ # or the first button on the upper row of controller buttons.
352
+ BUTTON_X = 99
353
+
354
+ # Key code constant: Y Button key.
355
+ # On a game controller, the Y button should be either the button labeled Y
356
+ # or the second button on the upper row of controller buttons.
357
+ BUTTON_Y = 100
358
+
359
+ # Key code constant: Z Button key.
360
+ # On a game controller, the Z button should be either the button labeled Z
361
+ # or the third button on the upper row of controller buttons.
362
+ BUTTON_Z = 101
363
+
364
+ # Key code constant: L1 Button key.
365
+ # On a game controller, the L1 button should be either the button labeled L1 (or L)
366
+ # or the top left trigger button.
367
+ BUTTON_L1 = 102
368
+
369
+ # Key code constant: R1 Button key.
370
+ # On a game controller, the R1 button should be either the button labeled R1 (or R)
371
+ # or the top right trigger button.
372
+ BUTTON_R1 = 103
373
+
374
+ # Key code constant: L2 Button key.
375
+ # On a game controller, the L2 button should be either the button labeled L2
376
+ # or the bottom left trigger button.
377
+ BUTTON_L2 = 104
378
+
379
+ # Key code constant: R2 Button key.
380
+ # On a game controller, the R2 button should be either the button labeled R2
381
+ # or the bottom right trigger button.
382
+ BUTTON_R2 = 105
383
+
384
+ # Key code constant: Left Thumb Button key.
385
+ # On a game controller, the left thumb button indicates that the left (or only)
386
+ # joystick is pressed.
387
+ BUTTON_THUMBL = 106
388
+
389
+ # Key code constant: Right Thumb Button key.
390
+ # On a game controller, the right thumb button indicates that the right
391
+ # joystick is pressed.
392
+ BUTTON_THUMBR = 107
393
+
394
+ # Key code constant: Start Button key.
395
+ # On a game controller, the button labeled Start.
396
+ BUTTON_START = 108
397
+
398
+ # Key code constant: Select Button key.
399
+ # On a game controller, the button labeled Select.
400
+ BUTTON_SELECT = 109
401
+
402
+ # Key code constant: Mode Button key.
403
+ # On a game controller, the button labeled Mode.
404
+ BUTTON_MODE = 110
405
+
406
+ # Key code constant: Escape key.
407
+ ESCAPE = 111
408
+
409
+ # Key code constant: Forward Delete key.
410
+ # Deletes characters ahead of the insertion point, unlike {@link #DEL}.
411
+ FORWARD_DEL = 112
412
+
413
+ # Key code constant: Left Control modifier key.
414
+ CTRL_LEFT = 113
415
+
416
+ # Key code constant: Right Control modifier key.
417
+ CTRL_RIGHT = 114
418
+
419
+ # Key code constant: Caps Lock key.
420
+ CAPS_LOCK = 115
421
+
422
+ # Key code constant: Scroll Lock key.
423
+ SCROLL_LOCK = 116
424
+
425
+ # Key code constant: Left Meta modifier key.
426
+ META_LEFT = 117
427
+
428
+ # Key code constant: Right Meta modifier key.
429
+ META_RIGHT = 118
430
+
431
+ # Key code constant: Function modifier key.
432
+ FUNCTION = 119
433
+
434
+ # Key code constant: System Request / Print Screen key.
435
+ SYSRQ = 120
436
+
437
+ # Key code constant: Break / Pause key.
438
+ BREAK = 121
439
+
440
+ # Key code constant: Home Movement key.
441
+ # Used for scrolling or moving the cursor around to the start of a line
442
+ # or to the top of a list.
443
+ MOVE_HOME = 122
444
+
445
+ # Key code constant: End Movement key.
446
+ # Used for scrolling or moving the cursor around to the end of a line
447
+ # or to the bottom of a list.
448
+ MOVE_END = 123
449
+
450
+ # Key code constant: Insert key.
451
+ # Toggles insert / overwrite edit mode.
452
+ INSERT = 124
453
+
454
+ # Key code constant: Forward key.
455
+ # Navigates forward in the history stack. Complement of {@link #BACK}.
456
+ FORWARD = 125
457
+
458
+ # Key code constant: Play media key.
459
+ MEDIA_PLAY = 126
460
+
461
+ # Key code constant: Pause media key.
462
+ MEDIA_PAUSE = 127
463
+
464
+ # Key code constant: Close media key.
465
+ # May be used to close a CD tray, for example.
466
+ MEDIA_CLOSE = 128
467
+
468
+ # Key code constant: Eject media key.
469
+ # May be used to eject a CD tray, for example.
470
+ MEDIA_EJECT = 129
471
+
472
+ # Key code constant: Record media key.
473
+ MEDIA_RECORD = 130
474
+
475
+ # Key code constant: F1 key.
476
+ F1 = 131
477
+
478
+ # Key code constant: F2 key.
479
+ F2 = 132
480
+
481
+ # Key code constant: F3 key.
482
+ F3 = 133
483
+
484
+ # Key code constant: F4 key.
485
+ F4 = 134
486
+
487
+ # Key code constant: F5 key.
488
+ F5 = 135
489
+
490
+ # Key code constant: F6 key.
491
+ F6 = 136
492
+
493
+ # Key code constant: F7 key.
494
+ F7 = 137
495
+
496
+ # Key code constant: F8 key.
497
+ F8 = 138
498
+
499
+ # Key code constant: F9 key.
500
+ F9 = 139
501
+
502
+ # Key code constant: F10 key.
503
+ F10 = 140
504
+
505
+ # Key code constant: F11 key.
506
+ F11 = 141
507
+
508
+ # Key code constant: F12 key.
509
+ F12 = 142
510
+
511
+ # Key code constant: Num Lock key.
512
+ # This is the Num Lock key; it is different from {@link #NUM}.
513
+ # This key alters the behavior of other keys on the numeric keypad.
514
+ NUM_LOCK = 143
515
+
516
+ # Key code constant: Numeric keypad '0' key.
517
+ NUMPAD_0 = 144
518
+
519
+ # Key code constant: Numeric keypad '1' key.
520
+ NUMPAD_1 = 145
521
+
522
+ # Key code constant: Numeric keypad '2' key.
523
+ NUMPAD_2 = 146
524
+
525
+ # Key code constant: Numeric keypad '3' key.
526
+ NUMPAD_3 = 147
527
+
528
+ # Key code constant: Numeric keypad '4' key.
529
+ NUMPAD_4 = 148
530
+
531
+ # Key code constant: Numeric keypad '5' key.
532
+ NUMPAD_5 = 149
533
+
534
+ # Key code constant: Numeric keypad '6' key.
535
+ NUMPAD_6 = 150
536
+
537
+ # Key code constant: Numeric keypad '7' key.
538
+ NUMPAD_7 = 151
539
+
540
+ # Key code constant: Numeric keypad '8' key.
541
+ NUMPAD_8 = 152
542
+
543
+ # Key code constant: Numeric keypad '9' key.
544
+ NUMPAD_9 = 153
545
+
546
+ # Key code constant: Numeric keypad '/' key (for division).
547
+ NUMPAD_DIVIDE = 154
548
+
549
+ # Key code constant: Numeric keypad '#' key (for multiplication).
550
+ NUMPAD_MULTIPLY = 155
551
+
552
+ # Key code constant: Numeric keypad '-' key (for subtraction).
553
+ NUMPAD_SUBTRACT = 156
554
+
555
+ # Key code constant: Numeric keypad '+' key (for addition).
556
+ NUMPAD_ADD = 157
557
+
558
+ # Key code constant: Numeric keypad '.' key (for decimals or digit grouping).
559
+ NUMPAD_DOT = 158
560
+
561
+ # Key code constant: Numeric keypad ',' key (for decimals or digit grouping).
562
+ NUMPAD_COMMA = 159
563
+
564
+ # Key code constant: Numeric keypad Enter key.
565
+ NUMPAD_ENTER = 160
566
+
567
+ # Key code constant: Numeric keypad '=' key.
568
+ NUMPAD_EQUALS = 161
569
+
570
+ # Key code constant: Numeric keypad '(' key.
571
+ NUMPAD_LEFT_PAREN = 162
572
+
573
+ # Key code constant: Numeric keypad ')' key.
574
+ NUMPAD_RIGHT_PAREN = 163
575
+
576
+ # Key code constant: Volume Mute key.
577
+ # Mutes the speaker, unlike {@link #MUTE}.
578
+ # This key should normally be implemented as a toggle such that the first press
579
+ # mutes the speaker and the second press restores the original volume.
580
+ VOLUME_MUTE = 164
581
+
582
+ # Key code constant: Info key.
583
+ # Common on TV remotes to show additional information related to what is
584
+ # currently being viewed.
585
+ INFO = 165
586
+
587
+ # Key code constant: Channel up key.
588
+ # On TV remotes, increments the television channel.
589
+ CHANNEL_UP = 166
590
+
591
+ # Key code constant: Channel down key.
592
+ # On TV remotes, decrements the television channel.
593
+ CHANNEL_DOWN = 167
594
+
595
+ # Key code constant: Zoom in key.
596
+ KEYCODE_ZOOM_IN = 168
597
+
598
+ # Key code constant: Zoom out key.
599
+ KEYCODE_ZOOM_OUT = 169
600
+
601
+ # Key code constant: TV key.
602
+ # On TV remotes, switches to viewing live TV.
603
+ TV = 170
604
+
605
+ # Key code constant: Window key.
606
+ # On TV remotes, toggles picture-in-picture mode or other windowing functions.
607
+ WINDOW = 171
608
+
609
+ # Key code constant: Guide key.
610
+ # On TV remotes, shows a programming guide.
611
+ GUIDE = 172
612
+
613
+ # Key code constant: DVR key.
614
+ # On some TV remotes, switches to a DVR mode for recorded shows.
615
+ DVR = 173
616
+
617
+ # Key code constant: Bookmark key.
618
+ # On some TV remotes, bookmarks content or web pages.
619
+ BOOKMARK = 174
620
+
621
+ # Key code constant: Toggle captions key.
622
+ # Switches the mode for closed-captioning text, for example during television shows.
623
+ CAPTIONS = 175
624
+
625
+ # Key code constant: Settings key.
626
+ # Starts the system settings activity.
627
+ SETTINGS = 176
628
+
629
+ # Key code constant: TV power key.
630
+ # On TV remotes, toggles the power on a television screen.
631
+ TV_POWER = 177
632
+
633
+ # Key code constant: TV input key.
634
+ # On TV remotes, switches the input on a television screen.
635
+ TV_INPUT = 178
636
+
637
+ # Key code constant: Set-top-box power key.
638
+ # On TV remotes, toggles the power on an external Set-top-box.
639
+ STB_POWER = 179
640
+
641
+ # Key code constant: Set-top-box input key.
642
+ # On TV remotes, switches the input mode on an external Set-top-box.
643
+ STB_INPUT = 180
644
+
645
+ # Key code constant: A/V Receiver power key.
646
+ # On TV remotes, toggles the power on an external A/V Receiver.
647
+ AVR_POWER = 181
648
+
649
+ # Key code constant: A/V Receiver input key.
650
+ # On TV remotes, switches the input mode on an external A/V Receiver.
651
+ AVR_INPUT = 182
652
+
653
+ # Key code constant: Red "programmable" key.
654
+ # On TV remotes, acts as a contextual/programmable key.
655
+ PROG_RED = 183
656
+
657
+ # Key code constant: Green "programmable" key.
658
+ # On TV remotes, actsas a contextual/programmable key.
659
+ PROG_GREEN = 184
660
+
661
+ # Key code constant: Yellow "programmable" key.
662
+ # On TV remotes, acts as a contextual/programmable key.
663
+ PROG_YELLOW = 185
664
+
665
+ # Key code constant: Blue "programmable" key.
666
+ # On TV remotes, acts as a contextual/programmable key.
667
+ PROG_BLUE = 186
668
+
669
+ # Key code constant: App switch key.
670
+ # Should bring up the application switcher dialog.
671
+ APP_SWITCH = 187
672
+
673
+ # Key code constant: Generic Game Pad Button #1.
674
+ BUTTON_1 = 188
675
+
676
+ # Key code constant: Generic Game Pad Button #2.
677
+ BUTTON_2 = 189
678
+
679
+ # Key code constant: Generic Game Pad Button #3.
680
+ BUTTON_3 = 190
681
+
682
+ # Key code constant: Generic Game Pad Button #4.
683
+ BUTTON_4 = 191
684
+
685
+ # Key code constant: Generic Game Pad Button #5.
686
+ BUTTON_5 = 192
687
+
688
+ # Key code constant: Generic Game Pad Button #6.
689
+ BUTTON_6 = 193
690
+
691
+ # Key code constant: Generic Game Pad Button #7.
692
+ BUTTON_7 = 194
693
+
694
+ # Key code constant: Generic Game Pad Button #8.
695
+ BUTTON_8 = 195
696
+
697
+ # Key code constant: Generic Game Pad Button #9.
698
+ BUTTON_9 = 196
699
+
700
+ # Key code constant: Generic Game Pad Button #10.
701
+ BUTTON_10 = 197
702
+
703
+ # Key code constant: Generic Game Pad Button #11.
704
+ BUTTON_11 = 198
705
+
706
+ # Key code constant: Generic Game Pad Button #12.
707
+ BUTTON_12 = 199
708
+
709
+ # Key code constant: Generic Game Pad Button #13.
710
+ BUTTON_13 = 200
711
+
712
+ # Key code constant: Generic Game Pad Button #14.
713
+ BUTTON_14 = 201
714
+
715
+ # Key code constant: Generic Game Pad Button #15.
716
+ BUTTON_15 = 202
717
+
718
+ # Key code constant: Generic Game Pad Button #16.
719
+ BUTTON_16 = 203
720
+
721
+ # Key code constant: Language Switch key.
722
+ # Toggles the current input language such as switching between English and Japanese on
723
+ # a QWERTY keyboard. On some devices, the same function may be performed by
724
+ # pressing Shift+Spacebar.
725
+ LANGUAGE_SWITCH = 204
726
+
727
+ # Key code constant: Manner Mode key.
728
+ # Toggles silent or vibrate mode on and off to make the device behave more politely
729
+ # in certain settings such as on a crowded train. On some devices, the key may only
730
+ # operate when long-pressed.
731
+ MANNER_MODE = 205
732
+
733
+ # Key code constant: 3D Mode key.
734
+ # Toggles the display between 2D and 3D mode.
735
+ MODE_3D = 206
736
+
737
+ # Key code constant: Contacts special function key.
738
+ # Used to launch an address book application.
739
+ CONTACTS = 207
740
+
741
+ # Key code constant: Calendar special function key.
742
+ # Used to launch a calendar application.
743
+ CALENDAR = 208
744
+
745
+ # Key code constant: Music special function key.
746
+ # Used to launch a music player application.
747
+ MUSIC = 209
748
+
749
+ # Key code constant: Calculator special function key.
750
+ # Used to launch a calculator application.
751
+ CALCULATOR = 210
752
+
753
+ # Key code constant: Japanese full-width / half-width key.
754
+ ZENKAKU_HANKAKU = 211
755
+
756
+ # Key code constant: Japanese alphanumeric key.
757
+ EISU = 212
758
+
759
+ # Key code constant: Japanese non-conversion key.
760
+ MUHENKAN = 213
761
+
762
+ # Key code constant: Japanese conversion key.
763
+ HENKAN = 214
764
+
765
+ # Key code constant: Japanese katakana / hiragana key.
766
+ KATAKANA_HIRAGANA = 215
767
+
768
+ # Key code constant: Japanese Yen key.
769
+ YEN = 216
770
+
771
+ # Key code constant: Japanese Ro key.
772
+ RO = 217
773
+
774
+ # Key code constant: Japanese kana key.
775
+ KANA = 218
776
+
777
+ # Key code constant: Assist key.
778
+ # Launches the global assist activity. Not delivered to applications.
779
+ ASSIST = 219
780
+
781
+ # Key code constant: Brightness Down key.
782
+ # Adjusts the screen brightness down.
783
+ BRIGHTNESS_DOWN = 220
784
+
785
+ # Key code constant: Brightness Up key.
786
+ # Adjusts the screen brightness up.
787
+ BRIGHTNESS_UP = 221
788
+
789
+ # Key code constant: Audio Track key.
790
+ # Switches the audio tracks.
791
+ MEDIA_AUDIO_TRACK = 222
792
+
793
+ # Key code constant: Sleep key.
794
+ # Puts the device to sleep. Behaves somewhat like {@link #POWER} but it
795
+ # has no effect if the device is already asleep.
796
+ SLEEP = 223
797
+
798
+ # Key code constant: Wakeup key.
799
+ # Wakes up the device. Behaves somewhat like {@link #POWER} but it
800
+ # has no effect if the device is already awake.
801
+ WAKEUP = 224
802
+
803
+ # Key code constant: Pairing key.
804
+ # Initiates peripheral pairing mode. Useful for pairing remote control
805
+ # devices or game controllers, especially if no other input mode is
806
+ # available.
807
+ PAIRING = 225
808
+
809
+ # Key code constant: Media Top Menu key.
810
+ # Goes to the top of media menu.
811
+ MEDIA_TOP_MENU = 226
812
+
813
+ # Key code constant: '11' key.
814
+ KEY_11 = 227
815
+
816
+ # Key code constant: '12' key.
817
+ KEY_12 = 228
818
+
819
+ # Key code constant: Last Channel key.
820
+ # Goes to the last viewed channel.
821
+ LAST_CHANNEL = 229
822
+
823
+ # Key code constant: TV data service key.
824
+ # Displays data services like weather, sports.
825
+ TV_DATA_SERVICE = 230
826
+
827
+ # Key code constant: Voice Assist key.
828
+ # Launches the global voice assist activity. Not delivered to applications.
829
+ VOICE_ASSIST = 231
830
+
831
+ # Key code constant: Radio key.
832
+ # Toggles TV service / Radio service.
833
+ TV_RADIO_SERVICE = 232
834
+
835
+ # Key code constant: Teletext key.
836
+ # Displays Teletext service.
837
+ TV_TELETEXT = 233
838
+
839
+ # Key code constant: Number entry key.
840
+ # Initiates to enter multi-digit channel nubmber when each digit key is assigned
841
+ # for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC
842
+ # User Control Code.
843
+ TV_NUMBER_ENTRY = 234
844
+
845
+ # Key code constant: Analog Terrestrial key.
846
+ # Switches to analog terrestrial broadcast service.
847
+ TV_TERRESTRIAL_ANALOG = 235
848
+
849
+ # Key code constant: Digital Terrestrial key.
850
+ # Switches to digital terrestrial broadcast service.
851
+ TV_TERRESTRIAL_DIGITAL = 236
852
+
853
+ # Key code constant: Satellite key.
854
+ # Switches to digital satellite broadcast service.
855
+ TV_SATELLITE = 237
856
+
857
+ # Key code constant: BS key.
858
+ # Switches to BS digital satellite broadcasting service available in Japan.
859
+ TV_SATELLITE_BS = 238
860
+
861
+ # Key code constant: CS key.
862
+ # Switches to CS digital satellite broadcasting service available in Japan.
863
+ TV_SATELLITE_CS = 239
864
+
865
+ # Key code constant: BS/CS key.
866
+ # Toggles between BS and CS digital satellite services.
867
+ TV_SATELLITE_SERVICE = 240
868
+
869
+ # Key code constant: Toggle Network key.
870
+ # Toggles selecting broadcast services.
871
+ TV_NETWORK = 241
872
+
873
+ # Key code constant: Antenna/Cable key.
874
+ # Toggles broadcast input source between antenna and cable.
875
+ TV_ANTENNA_CABLE = 242
876
+
877
+ # Key code constant: HDMI #1 key.
878
+ # Switches to HDMI input #1.
879
+ TV_INPUT_HDMI_1 = 243
880
+
881
+ # Key code constant: HDMI #2 key.
882
+ # Switches to HDMI input #2.
883
+ TV_INPUT_HDMI_2 = 244
884
+
885
+ # Key code constant: HDMI #3 key.
886
+ # Switches to HDMI input #3.
887
+ TV_INPUT_HDMI_3 = 245
888
+
889
+ # Key code constant: HDMI #4 key.
890
+ # Switches to HDMI input #4.
891
+ TV_INPUT_HDMI_4 = 246
892
+
893
+ # Key code constant: Composite #1 key.
894
+ # Switches to composite video input #1.
895
+ TV_INPUT_COMPOSITE_1 = 247
896
+
897
+ # Key code constant: Composite #2 key.
898
+ # Switches to composite video input #2.
899
+ TV_INPUT_COMPOSITE_2 = 248
900
+
901
+ # Key code constant: Component #1 key.
902
+ # Switches to component video input #1.
903
+ TV_INPUT_COMPONENT_1 = 249
904
+
905
+ # Key code constant: Component #2 key.
906
+ # Switches to component video input #2.
907
+ TV_INPUT_COMPONENT_2 = 250
908
+
909
+ # Key code constant: VGA #1 key.
910
+ # Switches to VGA (analog RGB) input #1.
911
+ TV_INPUT_VGA_1 = 251
912
+
913
+ # Key code constant: Audio description key.
914
+ # Toggles audio description off / on.
915
+ TV_AUDIO_DESCRIPTION = 252
916
+
917
+ # Key code constant: Audio description mixing volume up key.
918
+ # Louden audio description volume as compared with normal audio volume.
919
+ TV_AUDIO_DESCRIPTION_MIX_UP = 253
920
+
921
+ # Key code constant: Audio description mixing volume down key.
922
+ # Lessen audio description volume as compared with normal audio volume.
923
+ TV_AUDIO_DESCRIPTION_MIX_DOWN = 254
924
+
925
+ # Key code constant: Zoom mode key.
926
+ # Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.)
927
+ TV_ZOOM_MODE = 255
928
+
929
+ # Key code constant: Contents menu key.
930
+ # Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
931
+ # Code
932
+ TV_CONTENTS_MENU = 256
933
+
934
+ # Key code constant: Media context menu key.
935
+ # Goes to the context menu of media contents. Corresponds to Media Context-sensitive
936
+ # Menu (0x11) of CEC User Control Code.
937
+ TV_MEDIA_CONTEXT_MENU = 257
938
+
939
+ # Key code constant: Timer programming key.
940
+ # Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
941
+ # CEC User Control Code.
942
+ TV_TIMER_PROGRAMMING = 258
943
+
944
+ # Key code constant: Help key.
945
+ HELP = 259
946
+
947
+ # Key code constant: Navigate to previous key.
948
+ # Goes backward by one item in an ordered collection of items.
949
+ NAVIGATE_PREVIOUS = 260
950
+
951
+ # Key code constant: Navigate to next key.
952
+ # Advances to the next item in an ordered collection of items.
953
+ NAVIGATE_NEXT = 261
954
+
955
+ # Key code constant: Navigate in key.
956
+ # Activates the item that currently has focus or expands to the next level of a navigation
957
+ # hierarchy.
958
+ NAVIGATE_IN = 262
959
+
960
+ # Key code constant: Navigate out key.
961
+ # Backs out one level of a navigation hierarchy or collapses the item that currently has
962
+ # focus.
963
+ NAVIGATE_OUT = 263
964
+
965
+ # Key code constant: Primary stem key for Wear.
966
+ # Main power/reset button on watch.
967
+ STEM_PRIMARY = 264
968
+
969
+ # Key code constant: Generic stem key 1 for Wear.
970
+ STEM_1 = 265
971
+
972
+ # Key code constant: Generic stem key 2 for Wear.
973
+ STEM_2 = 266
974
+
975
+ # Key code constant: Generic stem key 3 for Wear.
976
+ STEM_3 = 267
977
+
978
+ # Key code constant: Directional Pad Up-Left.
979
+ DPAD_UP_LEFT = 268
980
+
981
+ # Key code constant: Directional Pad Down-Left.
982
+ DPAD_DOWN_LEFT = 269
983
+
984
+ # Key code constant: Directional Pad Up-Right.
985
+ DPAD_UP_RIGHT = 270
986
+
987
+ # Key code constant: Directional Pad Down-Right.
988
+ DPAD_DOWN_RIGHT = 271
989
+
990
+ # Key code constant: Skip forward media key.
991
+ MEDIA_SKIP_FORWARD = 272
992
+
993
+ # Key code constant: Skip backward media key.
994
+ MEDIA_SKIP_BACKWARD = 273
995
+
996
+ # Key code constant: Step forward media key.
997
+ # Steps media forward, one frame at a time.
998
+ MEDIA_STEP_FORWARD = 274
999
+
1000
+ # Key code constant: Step backward media key.
1001
+ # Steps media backward, one frame at a time.
1002
+ MEDIA_STEP_BACKWARD = 275
1003
+
1004
+ # Key code constant: put device to sleep unless a wakelock is held.
1005
+ SOFT_SLEEP = 276
1006
+
1007
+ # Key code constant: Cut key.
1008
+ CUT = 277
1009
+
1010
+ # Key code constant: Copy key.
1011
+ COPY = 278
1012
+
1013
+ gamepad_buttons = [
1014
+ BUTTON_A,
1015
+ BUTTON_B,
1016
+ BUTTON_C,
1017
+ BUTTON_X,
1018
+ BUTTON_Y,
1019
+ BUTTON_Z,
1020
+ BUTTON_L1,
1021
+ BUTTON_R1,
1022
+ BUTTON_L2,
1023
+ BUTTON_R2,
1024
+ BUTTON_THUMBL,
1025
+ BUTTON_THUMBR,
1026
+ BUTTON_START,
1027
+ BUTTON_SELECT,
1028
+ BUTTON_MODE,
1029
+ BUTTON_1,
1030
+ BUTTON_2,
1031
+ BUTTON_3,
1032
+ BUTTON_4,
1033
+ BUTTON_5,
1034
+ BUTTON_6,
1035
+ BUTTON_7,
1036
+ BUTTON_8,
1037
+ BUTTON_9,
1038
+ BUTTON_10,
1039
+ BUTTON_11,
1040
+ BUTTON_12,
1041
+ BUTTON_13,
1042
+ BUTTON_14,
1043
+ BUTTON_15,
1044
+ BUTTON_16,
1045
+ ]
1046
+
1047
+ @staticmethod
1048
+ def is_gamepad_button(code: int) -> bool:
1049
+ """Returns true if the specified nativekey is a gamepad button."""
1050
+ return code in AndroidKey.gamepad_buttons
1051
+
1052
+ confirm_buttons = [DPAD_CENTER, ENTER, SPACE, NUMPAD_ENTER]
1053
+
1054
+ @staticmethod
1055
+ def is_confirm_key(code: int) -> bool:
1056
+ """Returns true if the key will, by default, trigger a click on the focused view."""
1057
+ return code in AndroidKey.confirm_buttons
1058
+
1059
+ media_buttons = [
1060
+ MEDIA_PLAY,
1061
+ MEDIA_PAUSE,
1062
+ MEDIA_PLAY_PAUSE,
1063
+ MUTE,
1064
+ HEADSETHOOK,
1065
+ MEDIA_STOP,
1066
+ MEDIA_NEXT,
1067
+ MEDIA_PREVIOUS,
1068
+ MEDIA_REWIND,
1069
+ MEDIA_RECORD,
1070
+ MEDIA_FAST_FORWARD,
1071
+ ]
1072
+
1073
+ @staticmethod
1074
+ def is_media_key(code: int) -> bool:
1075
+ """Returns true if this key is a media key, which can be send to apps that are
1076
+ interested in media key events."""
1077
+ return code in AndroidKey.media_buttons
1078
+
1079
+ system_buttons = [
1080
+ MENU,
1081
+ SOFT_RIGHT,
1082
+ HOME,
1083
+ BACK,
1084
+ CALL,
1085
+ ENDCALL,
1086
+ VOLUME_UP,
1087
+ VOLUME_DOWN,
1088
+ VOLUME_MUTE,
1089
+ MUTE,
1090
+ POWER,
1091
+ HEADSETHOOK,
1092
+ MEDIA_PLAY,
1093
+ MEDIA_PAUSE,
1094
+ MEDIA_PLAY_PAUSE,
1095
+ MEDIA_STOP,
1096
+ MEDIA_NEXT,
1097
+ MEDIA_PREVIOUS,
1098
+ MEDIA_REWIND,
1099
+ MEDIA_RECORD,
1100
+ MEDIA_FAST_FORWARD,
1101
+ CAMERA,
1102
+ FOCUS,
1103
+ SEARCH,
1104
+ BRIGHTNESS_DOWN,
1105
+ BRIGHTNESS_UP,
1106
+ MEDIA_AUDIO_TRACK,
1107
+ ]
1108
+
1109
+ @staticmethod
1110
+ def is_system_key(code: int) -> bool:
1111
+ """Returns true if the key is a system key, System keys can not be used for menu shortcuts."""
1112
+ return code in AndroidKey.system_buttons
1113
+
1114
+ wake_buttons = [BACK, MENU, WAKEUP, PAIRING, STEM_1, STEM_2, STEM_3]
1115
+
1116
+ @staticmethod
1117
+ def is_wake_key(code: int) -> bool:
1118
+ """Returns true if the key is a wake key."""
1119
+ return code in AndroidKey.wake_buttons