Stop propagation of events after handling trigger keys

Prevents shortcuts from triggering multiple actions, e.g.
escape also closes the editor in MW.

Bug: T78201
Change-Id: Id419cd13dfa096573dafd4e922b1f4434536cdc7
(cherry picked from commit 4597c9a99dad3e0b9fd0c44c8e77520b7c7f57fa)