// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module ash.mojom; import "ui/events/mojo/event.mojom"; // Allows a client to implement spoken feedback features; used for ChromeVox. interface SpokenFeedbackEventRewriterDelegate { // Used to send key events to the ChromeVox extension. |capture| is true if // the rewriter discarded the event, false if the rewriter continues event // propagation. DispatchKeyEventToChromeVox(ui.mojom.Event event, bool capture); }; // Allows clients to toggle some event rewriting behavior. interface EventRewriterController { // Enables the KeyboardDrivenEventRewriter, which is disabled by default. // This only applies when the user is on the login screen. SetKeyboardDrivenEventRewriterEnabled(bool enabled); // If true, Shift + Arrow keys are rewritten to Tab/Shift-Tab keys. // This only applies when the KeyboardDrivenEventRewriter is active. SetArrowToTabRewritingEnabled(bool enabled); // Set the delegate used by the spoken feedback event rewriter. SetSpokenFeedbackEventRewriterDelegate( SpokenFeedbackEventRewriterDelegate delegate); // Continue dispatch of key events that were unhandled by ChromeVox. // TODO(crbug.com/839541): ChromeVox should not repost unhandled events. OnUnhandledSpokenFeedbackEvent(ui.mojom.Event event); // Discards key events and sends to spoken feedback when true. CaptureAllKeysForSpokenFeedback(bool capture); };