Skip to content

Commit

Permalink
derive Serialize and Deserialize on KeyboardShortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
zeozeozeo committed Dec 9, 2023
1 parent 8d4de86 commit b15b828
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/egui/src/data/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ impl Key {
/// Can be used with [`crate::InputState::consume_shortcut`]
/// and [`crate::Context::format_shortcut`].
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct KeyboardShortcut {
pub modifiers: Modifiers,
pub key: Key,
Expand Down

0 comments on commit b15b828

Please sign in to comment.