You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: crates/egui_window_glfw_passthrough/src/lib.rs
+7-3
Original file line number
Diff line number
Diff line change
@@ -641,16 +641,20 @@ impl GlfwBackend {
641
641
/// 2. Non-Printable.
642
642
///
643
643
/// Printable keys are dependent on layout. For example, `W` in `Qwerty` layout will map to `Z` in `Azerty` layout.
644
-
/// For text, we will always use the text event. But for "keys" (eg: game input), we will need to decide whether to consider the `W`` as `W`` or `Z`.
644
+
/// For text, we will always use the text event. But for "keys" (eg: game input), we will need to decide whether to consider the `W` as `W` or `Z`.
645
645
/// For all printable keys like `W`, we will use this fn to translate to egui's `Key`. So, we will translate it to `Z`.
646
646
/// For non-printable keys like `Enter` or `Backspace` or `F2`, we will translate in a layout independent way.
647
647
/// This is very useful for eg: keyboard shortcuts, as user expects to see `Z` when he uses it as shortcut on his keyboard.
648
648
///
649
649
/// You can directly use [layout_independent_glfw_to_egui_key] to just get the physical key location without caring about logical layout.
650
650
/// So, you will simply get `W` even if the user is using Azerty layout. This is important, as you want to preserve the "positions" irrespective of layouts.
651
651
/// So, pressing the key at `W` location will always move the character forward, even if it is `Z` according to layout.
0 commit comments