Skip to content

Commit

Permalink
Make shortcuts use shift instead of alt on WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
Colonial-Dev committed Apr 23, 2024
1 parent b75bbcc commit 7f2931b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,29 @@ use serde::{Deserialize, Serialize};
mod popups;
mod proof;

#[cfg(not(target_arch = "wasm32"))]
const MODIFIER: Modifiers = Modifiers::ALT;

#[cfg(target_arch = "wasm32")]
const MODIFIER: Modifiers = Modifiers::SHIFT;

const NEW_L: KeyboardShortcut = KeyboardShortcut::new(
Modifiers::ALT,
MODIFIER,
Key::Q
);

const NEW_S: KeyboardShortcut = KeyboardShortcut::new(
Modifiers::ALT,
MODIFIER,
Key::W
);

const NEW_LO: KeyboardShortcut = KeyboardShortcut::new(
Modifiers::ALT,
MODIFIER,
Key::A
);

const NEW_SO: KeyboardShortcut = KeyboardShortcut::new(
Modifiers::ALT,
MODIFIER,
Key::S
);

Expand Down

0 comments on commit 7f2931b

Please sign in to comment.