gui_server_api/msg/
keyboard.rs

1// SPDX-FileCopyrightText: 2024 Foundation Devices, Inc. <hello@foundation.xyz>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4use crate::KeyboardKind;
5
6#[derive(Debug, server::Message, rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)]
7#[rkyv(derive(Debug))]
8pub struct UpdateKeyboard {
9    pub kind: KeyboardKind,
10    pub request_caps: bool,
11    pub accept_button_text: String,
12    pub accept_button_enabled: bool,
13    pub delete_button_enabled: bool,
14}
15
16#[derive(Debug, server::Message)]
17pub struct HideKeyboard;
18
19#[derive(Debug, server::Message)]
20pub struct KeyPressed(pub Option<crate::Key>);
21
22#[derive(Debug, server::Message)]
23pub struct KeyReleased(pub Option<crate::Key>);