blob: c2900b9ee3afe6965d06b954a146d3a60ecfcc9b [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.
library fuchsia.ui.shortcut;
using fuchsia.ui.input2;
using fuchsia.ui.input3;
/// 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.
/// @deprecated
HandleKeyEvent(fuchsia.ui.input2.KeyEvent event) -> (bool was_handled);
/// Detect shortcuts and notify clients of activations.
/// Returns true if shortcut was matched and client handled it, false otherwise.
HandleKey3Event(fuchsia.ui.input3.KeyEvent event) -> (bool was_handled);
// TODO: implement when the design is approved.
// HandleFocusChange(FocusChain focus) -> ();
};