Skip to content

Commit

Permalink
register ReflectHash and ReflectPartialEq on KeyCode/ScanCode
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Sep 7, 2022
1 parent c0dbc7a commit 65c713b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_input/src/keyboard.rs
Expand Up @@ -63,6 +63,7 @@ pub fn keyboard_input_system(
/// The resource is updated inside of the [`keyboard_input_system`](crate::keyboard::keyboard_input_system).
#[derive(Reflect, FromReflect, Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[reflect(Hash, PartialEq)]
#[repr(u32)]
pub enum KeyCode {
/// The `1` key over the letters.
Expand Down Expand Up @@ -424,5 +425,6 @@ pub enum KeyCode {
///
/// The resource is updated inside of the [`keyboard_input_system`](crate::keyboard::keyboard_input_system).
#[derive(Reflect, FromReflect, Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
#[reflect(Hash, PartialEq)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub struct ScanCode(pub u32);

0 comments on commit 65c713b

Please sign in to comment.