diff --git a/src/island_client.ml b/src/island_client.ml index 02f5cd6..7ba151a 100644 --- a/src/island_client.ml +++ b/src/island_client.ml @@ -86,11 +86,11 @@ let draw_map () = let kb_handler ev = let x, y = !Map.player_pos in let x, y = - match ev |> Ev.as_type |> Ev.Keyboard.key |> Jstr.to_string with - | "z" -> (x, y - 1) - | "q" -> (x - 1, y) - | "s" -> (x, y + 1) - | "d" -> (x + 1, y) + match ev |> Ev.as_type |> Ev.Keyboard.code |> Jstr.to_string with + | "KeyW" | "ArrowUp" -> (x, y - 1) + | "KeyA" | "ArrowLeft" -> (x - 1, y) + | "KeyS" | "ArrowDown" -> (x, y + 1) + | "KeyD" | "ArrowRight" -> (x + 1, y) | _s -> (x, y) in let x = max 0 x in