feat: Derive (de)serialize for Key (#213)
This commit is contained in:
parent
44cd304cdf
commit
f1c6d2b59c
1 changed files with 1 additions and 0 deletions
|
@ -170,6 +170,7 @@ impl Modifiers {
|
||||||
/// Many keys are omitted because they are not always physical keys (depending on keyboard language), e.g. `;` and `§`,
|
/// Many keys are omitted because they are not always physical keys (depending on keyboard language), e.g. `;` and `§`,
|
||||||
/// and are therefor unsuitable as keyboard shortcuts if you want your app to be portable.
|
/// and are therefor unsuitable as keyboard shortcuts if you want your app to be portable.
|
||||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
|
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
|
||||||
|
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))]
|
||||||
pub enum Key {
|
pub enum Key {
|
||||||
ArrowDown,
|
ArrowDown,
|
||||||
ArrowLeft,
|
ArrowLeft,
|
||||||
|
|
Loading…
Reference in a new issue