[go: nahoru, domu]

tree: 5dd3ea070e0756a7565f7a24a7157d7e27e00d36 [path history] [tgz]
  1. accelerator_alias_converter.cc
  2. accelerator_alias_converter.h
  3. accelerator_alias_converter_unittest.cc
  4. accelerator_capslock_state_machine.cc
  5. accelerator_capslock_state_machine.h
  6. accelerator_capslock_state_machine_unittest.cc
  7. accelerator_commands.cc
  8. accelerator_commands.h
  9. accelerator_commands_unittest.cc
  10. accelerator_controller_impl.cc
  11. accelerator_controller_impl.h
  12. accelerator_controller_unittest.cc
  13. accelerator_encoding.cc
  14. accelerator_encoding.h
  15. accelerator_encoding_unittest.cc
  16. accelerator_filter_unittest.cc
  17. accelerator_history_impl.cc
  18. accelerator_history_impl.h
  19. accelerator_history_unittest.cc
  20. accelerator_ids.h
  21. accelerator_launcher_state_machine.cc
  22. accelerator_launcher_state_machine.h
  23. accelerator_launcher_state_machine_unittest.cc
  24. accelerator_lookup.cc
  25. accelerator_lookup.h
  26. accelerator_lookup_unittest.cc
  27. accelerator_notifications.cc
  28. accelerator_notifications.h
  29. accelerator_prefs.cc
  30. accelerator_prefs.h
  31. accelerator_prefs_delegate.h
  32. accelerator_prefs_unittest.cc
  33. accelerator_shift_disable_capslock_state_machine.cc
  34. accelerator_shift_disable_capslock_state_machine.h
  35. accelerator_shift_disable_capslock_state_machine_unittest.cc
  36. accelerator_table.cc
  37. accelerator_table.h
  38. accelerator_table_unittest.cc
  39. accelerator_tracker.cc
  40. accelerator_tracker.h
  41. accelerator_tracker_unittest.cc
  42. accelerator_unittest.cc
  43. ash_accelerator_configuration.cc
  44. ash_accelerator_configuration.h
  45. ash_accelerator_configuration_unittest.cc
  46. ash_focus_manager_factory.cc
  47. ash_focus_manager_factory.h
  48. debug_commands.cc
  49. debug_commands.h
  50. DEPS
  51. exit_warning_handler.cc
  52. exit_warning_handler.h
  53. key_hold_detector.cc
  54. key_hold_detector.h
  55. keyboard_code_util.cc
  56. keyboard_code_util.h
  57. magnifier_key_scroller.cc
  58. magnifier_key_scroller.h
  59. magnifier_key_scroller_unittest.cc
  60. OWNERS
  61. pre_target_accelerator_handler.cc
  62. pre_target_accelerator_handler.h
  63. README.md
  64. shortcut_input_handler.cc
  65. shortcut_input_handler.h
  66. shortcut_input_handler_unittest.cc
  67. spoken_feedback_toggler.cc
  68. spoken_feedback_toggler.h
  69. spoken_feedback_toggler_unittest.cc
  70. tablet_volume_controller.cc
  71. tablet_volume_controller.h
  72. test_accelerator_prefs_delegate.cc
  73. test_accelerator_prefs_delegate.h
ash/accelerators/README.md

This directory contains code for handling accelerators in Ash. The following documents the flow of accelerators.

  1. wm::AcceleratorFilter() sees events first as it's a pre-target handler on Shell.
  2. wm::AcceleratorFilter calls to PreTargetAcceleratorHandler.
  3. PreTargetAcceleratorHandler handles accelerators that need to be handled early on, such as system keys. This does not include accelerators such as control-n (for new window).
  4. If focus is on a Widget, then views handles the accelerator.
  5. Views does normally processing first (meaning sends to the focused view). If the focused view doesn't handle the event, then Views sends to the FocusManager.
  6. FocusManager::OnKeyEvent() calls PostTargetAcceleratorHandler::ProcessAccelerator().
  7. PostTargetAcceleratorHandler::ProcessAccelerator() calls to Ash's AcceleratorController.

Steps 1-3 give Ash the opportunity to have accelerators before the target (these are often referred to as pre-target accelerators). Step 4-5 allows the target to handle the accelerator. Step 6-7 allow for post-target accelerators (accelerators that only occur if the target does not handle the accelerator).

Steps 4-7 differ if focus is on a remote window (a window created at the request of a client connecting by way of the WindowService). If focus is on a remote window, then step 4-7 are replaced with:

  1. WindowService waits for response from remote client.
  2. If remote client does not handle the event, WindowService calls WindowServiceDelegate::OnUnhandledKeyEvent().
  3. Ash's WindowServiceDelegateImpl::OnUnhandledKeyEvent() calls to AcceleratorController::Process(), which handles the post-target processing phase.