From 970fd6fa396951587a714deb61df13b1a4c35d95 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 1 Nov 2026 03:31:51 +0000 Subject: [PATCH] keymap: test the UK ISO key; the Turkish Q item applies to Windows and Linux --- crates/keymap/tests/layout.rs | 8 ++++++++ docs/language-testing.md | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/keymap/tests/layout.rs b/crates/keymap/tests/layout.rs index 0f13f810..e2e7f2b2 100644 --- a/crates/keymap/tests/layout.rs +++ b/crates/keymap/tests/layout.rs @@ -256,4 +256,12 @@ fn the_iso_key_next_to_left_shift_keeps_shift_and_shows_the_layouts_character() // The key's name is no character, so a position that types `I` does not hide the label. let typed_i = Layout::new().with_char(Key::IntlBackslash, '<').with_char(Key::Quote, 'I'); assert_eq!(label(&typed_i, "IntlBackslash", p), "<"); + + // UK: the key types `\` and `|`, keys egui has, so it runs the `\` bindings. + let uk = Layout::new(); + let backslash = at("\\", Key::IntlBackslash); + let pipe = at("Shift+|", Key::IntlBackslash); + assert_eq!(uk.resolve(&backslash), Some(chord("\\"))); + assert!(uk.matches(&chord("\\"), &backslash, p)); + assert!(uk.matches(&chord("Shift+\\"), &pipe, p)); } diff --git a/docs/language-testing.md b/docs/language-testing.md index d5642a65..d7cd2e08 100644 --- a/docs/language-testing.md +++ b/docs/language-testing.md @@ -117,10 +117,10 @@ shortcut as listed. On macOS read Ctrl as Cmd. Q position, which types `'`, does not run Ctrl+Q. - [ ] **QWERTZ** (German). Ctrl+Z undoes and Ctrl+Y redoes, on the keys labelled Z and Y. Ctrl+⇧7 runs Ctrl+/. The menu shows Ctrl+[ as Ctrl+Ü. -- [ ] **Turkish Q.** The Keyboard Shortcuts dialog records the key next to left Shift, which - types `<`, as `IntlBackslash`, and with Shift held as `Shift+IntlBackslash`. Each runs its - command, and neither runs a `\` or Shift+, binding. Once `<` has been typed, the menu shows - Ctrl+IntlBackslash as Ctrl+<. +- [ ] **Turkish Q** (Windows and Linux; macOS reports this key as `` ` ``). The Keyboard + Shortcuts dialog records the key next to left Shift, which types `<`, as `IntlBackslash`, + and with Shift held as `Shift+IntlBackslash`. Each runs its command, and neither runs a `\` + or Shift+, binding. Once `<` has been typed, the menu shows Ctrl+IntlBackslash as Ctrl+<. - [ ] **Dvorak – QWERTY ⌘** (macOS). Typing gives Dvorak letters. With Cmd held, the keys follow QWERTY: Cmd on the QWERTY C position copies, and the menus show ⌘C.