From ec8b0ccf759b3efe35158b75cb80c4c481f42468 Mon Sep 17 00:00:00 2001 From: milk Date: Tue, 7 May 2024 11:03:30 +0200 Subject: [PATCH] changed them to scancodes --- src/config.rs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4d899f3..ab88689 100644 --- a/src/config.rs +++ b/src/config.rs @@ -20,24 +20,24 @@ pub struct InputConfigs {} #[derive(Deserialize, Serialize)] pub struct KeyboardConfig { // directionals - Up: u32, - Down: u32, - Right: u32, - Left: u32, + Up: ScanCodes, + Down: ScanCodes, + Right: ScanCodes, + Left: ScanCodes, // the punches - LightPunch: u32, - MediumPunch: u32, - HeavyPunch: u32, + LightPunch: ScanCodes, + MediumPunch: ScanCodes, + HeavyPunch: ScanCodes, // the kicks - LightKick: u32, - MediumKick: u32, - HeavyKick: u32, + LightKick: ScanCodes, + MediumKick: ScanCodes, + HeavyKick: ScanCodes, // Macros - PunchMacro: u32, - KickMacro: u32, + PunchMacro: ScanCodes, + KickMacro: ScanCodes, } impl Default for KeyboardConfig { @@ -64,6 +64,7 @@ impl Default for KeyboardConfig { /// TODO finish this /// UNTESTED AND UNFINISHED #[repr(u32)] +#[derive(Deserialize, Serialize)] pub enum ScanCodes { Escape = 0x01, Key1 = 0x02,