diff --git a/README.md b/README.md index 84a73c0..86fec61 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,11 @@ This is the mapping of `KeyCode` to a 102/105-key ISO keyboard: The 102-key is missing `LWin`, `RWin`, and `Menu`. +(Reference: ) + ### 101/104 key ANSI -This is the mapping of `KeyCode` to a 101/104-key ANSI keyboard: +This is the mapping of `KeyCode` to a 101/104-key ANSI keyboard: ```text ┌────┐ ┌────┬────┬────┬────┐ ┌────┬────┬────┬────┐ ┌────┬────┬────┬────┐ ┌────┬────┬────┐ @@ -91,7 +93,7 @@ This is the mapping of `KeyCode` to a 101/104-key ANSI keyboard: ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬─────────┐ ┌────┬────┬────┐ ┌────┬────┬────┬────┐ │Oem8│Key1│Key2│Key3│Key4│Key5│Key6│Key7│Key8│Key9│Key0│Oem─│Oem+│Backspace│ │Inse│Home│PgUp│ │NumL│Num/│Num*│Num─│ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬────────┤ ├────+────+────┤ ├────┼────┼────┼────┤ -│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Oem4│Oem6│ Oem5 │ │Dele│End │PgDo│ │Num7│Num8│Num9│ │ +│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Oem4│Oem6│ Oem7 │ │Dele│End │PgDo│ │Num7│Num8│Num9│ │ ├─────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────────┤ └────┴────┴────┘ ├────┼────┼────┤Num+│ │CapsLo│ A │ S │ D │ F │ G │ H │ J │ K │ L │Oem1│Oem3│ Enter │ │Num4│Num5│Num6│ │ ├──────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴────────────┤ ┌────┐ ├────┼────┼────┼────┤ @@ -101,10 +103,12 @@ This is the mapping of `KeyCode` to a 101/104-key ANSI keyboard: └─────┴─────┴─────┴──────────────────────────────┴─────┴─────┴──────┴──────┘ └────┴────┴────┘ └─────────┴────┴────┘ ``` -Note that the `Oem7` key is missing on the 104-key ANSI keyboard. +Note that the `Oem5` key is missing on the 104-key ANSI keyboard. The 101-key is also missing `LWin`, `RWin`, and `Menu`. +(Reference: ) + ### 106/109 key JIS This is the mapping of `KeyCode` to a 106/109-key JIS keyboard: @@ -129,7 +133,9 @@ This is the mapping of `KeyCode` to a 106/109-key JIS keyboard: Note that the `Oem5` is missing on the 109-key JIS layout, but `Oem9` (Muhenkan), `Oem10` (Henkan/Zenkouho), `Oem11` (Hiragana/Katakana), `Oem12` (Backslash) and `Oem13` (¥) are added. -The 106-key is also missing `LWin`, `RWin`, and `Menu`. +The 106-key is missing `LWin`, `RWin`, and `Menu`. + +(Reference: ) ### Conversion Table diff --git a/src/layouts/us104.rs b/src/layouts/us104.rs index 9f2a04b..6bcf85f 100644 --- a/src/layouts/us104.rs +++ b/src/layouts/us104.rs @@ -214,7 +214,7 @@ impl KeyboardLayout for Us104Key { DecodedKey::Unicode(']') } } - KeyCode::Oem5 => { + KeyCode::Oem7 => { if modifiers.is_shifted() { DecodedKey::Unicode('|') } else { @@ -522,7 +522,7 @@ mod test { (0x19, 'p'), (0x1a, '['), (0x1b, ']'), - (0x56, '\\'), + (0x2b, '\\'), (0x1e, 'a'), (0x1f, 's'), (0x20, 'd'),