blob: 4317a7c70b02ba0a92390ab5a3347d309815b2fa [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// # Fuchsia shortcut
///
/// ## Documentation
///
/// * [Rust](https://fuchsia-docs.firebaseapp.com/rust/fidl_fuchsia_ui_shortcut/index.html)
///
/// ## Overview
///
/// `fuchsia.ui.shortcut` is an internal API for delivering events to the
/// shortcut manager. See `fuchsia.ui.shortcut2` for client-side notification
/// interface.
library fuchsia.ui.shortcut;
using fuchsia.ui.input3;
using fuchsia.ui.focus;
/// Shortcuts manager handles keyboard events, detects shortcut activations,
/// notifies clients.
///
/// Typically this interface is used by RootPresenter to notify the manager
/// about events generated by other participants of the user interaction flow.
@discoverable
protocol Manager {
/// Detect shortcuts and notify clients of activations.
/// Returns true if shortcut was matched and client handled it, false otherwise.
HandleKey3Event(struct {
event fuchsia.ui.input3.KeyEvent;
}) -> (struct {
was_handled bool;
});
// Notify Shortcut manager service when the focused chain changes.
HandleFocusChange(resource struct {
focus_chain fuchsia.ui.focus.FocusChain;
}) -> ();
};