changed them to scancodes

Milk.H 2024-05-07 11:03:30 +02:00
parent 140908344e
commit ec8b0ccf75
Signed by: milk
GPG Key ID: 1C656AF758F96101
1 changed files with 13 additions and 12 deletions

View File

@ -20,24 +20,24 @@ pub struct InputConfigs {}
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct KeyboardConfig { pub struct KeyboardConfig {
// directionals // directionals
Up: u32, Up: ScanCodes,
Down: u32, Down: ScanCodes,
Right: u32, Right: ScanCodes,
Left: u32, Left: ScanCodes,
// the punches // the punches
LightPunch: u32, LightPunch: ScanCodes,
MediumPunch: u32, MediumPunch: ScanCodes,
HeavyPunch: u32, HeavyPunch: ScanCodes,
// the kicks // the kicks
LightKick: u32, LightKick: ScanCodes,
MediumKick: u32, MediumKick: ScanCodes,
HeavyKick: u32, HeavyKick: ScanCodes,
// Macros // Macros
PunchMacro: u32, PunchMacro: ScanCodes,
KickMacro: u32, KickMacro: ScanCodes,
} }
impl Default for KeyboardConfig { impl Default for KeyboardConfig {
@ -64,6 +64,7 @@ impl Default for KeyboardConfig {
/// TODO finish this /// TODO finish this
/// UNTESTED AND UNFINISHED /// UNTESTED AND UNFINISHED
#[repr(u32)] #[repr(u32)]
#[derive(Deserialize, Serialize)]
pub enum ScanCodes { pub enum ScanCodes {
Escape = 0x01, Escape = 0x01,
Key1 = 0x02, Key1 = 0x02,