Files
oak-gpui/crates
Ben Kunkle 9b63ba6205 gpui: Add cx.intercept_keystrokes API to intercept keystrokes before action dispatch (#34084)
Closes #ISSUE

`cx.intercept_keystrokes` functions as a sibling API to
`cx.observe_keystrokes`. Under the hood the two API's are basically
identical, however, `cx.observe_keystrokes` runs _after_ all event
dispatch handling (including action dispatch) while
`cx.intercept_keystrokes` runs _before_. This allows for
`cx.stop_propagation()` calls within the `cx.intercept_keystrokes`
callback to prevent action dispatch.

The motivating example usage behind this API is also included in this
PR. It is used as part of a keystroke input component that needs to
intercept keystrokes before action dispatch to display them.

cc: @mikayla-maki 

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-07-09 22:44:32 +00:00
..
2025-07-09 16:02:31 +00:00
2025-07-09 16:02:31 +00:00
2025-07-03 12:17:54 +00:00
2025-07-09 08:57:03 +08:00
2025-07-09 16:02:31 +00:00
2025-06-17 20:26:27 +00:00
2025-07-08 14:34:57 +00:00
2025-07-09 16:02:31 +00:00
2025-07-09 16:02:31 +00:00
2025-07-01 15:43:39 +00:00
2025-07-09 16:02:31 +00:00
2025-07-09 16:02:31 +00:00