diff --git a/CHANGELOG.md b/CHANGELOG.md index 6783ab94..d0862dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - On Windows, fix issue where resizing or moving window combined with grabbing the cursor would freeze program. - On Windows, fix issue where resizing or moving window would eat `Awakened` events. - On X11, fixed a segfault when using virtual monitors with XRandR. +- Derive `Ord` and `PartialOrd` for `VirtualKeyCode` enum. # Version 0.18.0 (2018-11-07) diff --git a/src/events.rs b/src/events.rs index 6725b19a..b764bcd5 100644 --- a/src/events.rs +++ b/src/events.rs @@ -253,7 +253,7 @@ pub enum MouseScrollDelta { } /// Symbolic name for a keyboard key. -#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] +#[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)] #[repr(u32)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum VirtualKeyCode {