Fix movement inputs when holding shift

This commit is contained in:
9382 2024-10-14 20:18:51 +01:00
parent a67aa71fb0
commit b0aecc3fd1
Signed by: aidan9382
GPG Key ID: 9BF9CD918201F681

View File

@ -99,7 +99,7 @@ impl WindowContext<'_>{
keycode=>{ keycode=>{
if let Some(input_instruction)=match keycode{ if let Some(input_instruction)=match keycode{
winit::keyboard::Key::Named(winit::keyboard::NamedKey::Space)=>Some(InputInstruction::Jump(s)), winit::keyboard::Key::Named(winit::keyboard::NamedKey::Space)=>Some(InputInstruction::Jump(s)),
winit::keyboard::Key::Character(key)=>match key.as_str(){ winit::keyboard::Key::Character(key)=>match key.to_lowercase().as_str(){
"w"=>Some(InputInstruction::MoveForward(s)), "w"=>Some(InputInstruction::MoveForward(s)),
"a"=>Some(InputInstruction::MoveLeft(s)), "a"=>Some(InputInstruction::MoveLeft(s)),
"s"=>Some(InputInstruction::MoveBack(s)), "s"=>Some(InputInstruction::MoveBack(s)),