From 16c7611e88d14313dbe08921d36443dcd17aa283 Mon Sep 17 00:00:00 2001 From: pentamassiv <91755244+pentamassiv@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:47:27 +0000 Subject: [PATCH] Fix build --- src/win/win_impl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/win_impl.rs b/src/win/win_impl.rs index 2e8e536a..7663e4f8 100644 --- a/src/win/win_impl.rs +++ b/src/win/win_impl.rs @@ -400,7 +400,7 @@ impl Enigo { /// Generic function to translate between virtual keys and scan codes fn translate_key(input: u16, map_type: MAP_VIRTUAL_KEY_TYPE) -> InputResult { - let layout = Enigo::get_keyboard_layout(); + let layout = Some(Enigo::get_keyboard_layout()); // Call MapVirtualKeyExW using the provided map_type and input match unsafe { MapVirtualKeyExW(input.into(), map_type, layout) }.try_into() {