Skip to content

Commit

Permalink
all: Added serde alias for each Direction variant
Browse files Browse the repository at this point in the history
  • Loading branch information
pentamassiv committed Sep 14, 2024
1 parent 0e83ee7 commit 9d48e98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,19 @@ impl fmt::Debug for Enigo {
pub enum Direction {
#[cfg_attr(feature = "serde", serde(alias = "P"))]
#[cfg_attr(feature = "serde", serde(alias = "p"))]
#[cfg_attr(feature = "serde", serde(alias = "Pressed"))]
#[cfg_attr(feature = "serde", serde(alias = "pressed"))]
Press,
#[cfg_attr(feature = "serde", serde(alias = "R"))]
#[cfg_attr(feature = "serde", serde(alias = "r"))]
#[cfg_attr(feature = "serde", serde(alias = "Released"))]
#[cfg_attr(feature = "serde", serde(alias = "released"))]
Release,
/// Equivalent to a press followed by a release
#[cfg_attr(feature = "serde", serde(alias = "C"))]
#[cfg_attr(feature = "serde", serde(alias = "c"))]
#[cfg_attr(feature = "serde", serde(alias = "Clicked"))]
#[cfg_attr(feature = "serde", serde(alias = "clicked"))]
#[default]
Click,
}
Expand Down

0 comments on commit 9d48e98

Please sign in to comment.