This commit is contained in:
Junkui Zhang 2025-08-27 00:24:16 +08:00
parent 98ea1d838a
commit 9615b712ca

View file

@ -7,9 +7,9 @@ use std::{
use crate::PlatformKeyboardMapper; use crate::PlatformKeyboardMapper;
/// TODO: /// This is a helper trait so that we can simplify the implementation of some functions
pub trait AsKeystroke { pub trait AsKeystroke {
/// TODO: /// Returns the GPUI representation of the keystroke.
fn as_keystroke(&self) -> &Keystroke; fn as_keystroke(&self) -> &Keystroke;
} }
@ -32,14 +32,14 @@ pub struct Keystroke {
pub key_char: Option<String>, pub key_char: Option<String>,
} }
/// TODO: /// Represents a keystroke that can be used in keybindings and displayed to the user.
#[derive(Debug, Clone, Eq, PartialEq, Hash)] #[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct KeybindingKeystroke { pub struct KeybindingKeystroke {
/// TODO: /// The GPUI representation of the keystroke.
pub inner: Keystroke, pub inner: Keystroke,
/// TODO: /// The modifiers to display.
pub display_modifiers: Modifiers, pub display_modifiers: Modifiers,
/// TODO: /// The key to display.
pub display_key: String, pub display_key: String,
} }