rust-embedded-community / pc-keyboard

PS/2 Keyboard Decoder in Rust
Apache License 2.0
96 stars 28 forks source link

Fix CTRL codes on AZERTY #23

Closed vinc closed 1 year ago

vinc commented 1 year ago

I looked at the AZERTY code again and found other issues related to #10 that needed more changes.

Some CTRL codes associated with the letter keys were the same as on a QWERTY keyboard instead of being remapped to where they should be on an AZERTY keyboard.

I tested the changes on the text editor of MOROS where some shortcuts (^Q and ^W for example) where not working before the fix.

All the codes from 0x0001 to 0x001A are here without duplicates:

> grep "Unicode.'.u{" src/layouts/azerty.rs | sort
                    DecodedKey::Unicode('\u{0001}')
                    DecodedKey::Unicode('\u{0002}')
                    DecodedKey::Unicode('\u{0003}')
                    DecodedKey::Unicode('\u{0004}')
                    DecodedKey::Unicode('\u{0005}')
                    DecodedKey::Unicode('\u{0006}')
                    DecodedKey::Unicode('\u{0007}')
                    DecodedKey::Unicode('\u{0008}')
                    DecodedKey::Unicode('\u{0009}')
                    DecodedKey::Unicode('\u{000A}')
                    DecodedKey::Unicode('\u{000B}')
                    DecodedKey::Unicode('\u{000C}')
                    DecodedKey::Unicode('\u{000D}')
                    DecodedKey::Unicode('\u{000E}')
                    DecodedKey::Unicode('\u{000F}')
                    DecodedKey::Unicode('\u{0010}')
                    DecodedKey::Unicode('\u{0011}')
                    DecodedKey::Unicode('\u{0012}')
                    DecodedKey::Unicode('\u{0013}')
                    DecodedKey::Unicode('\u{0014}')
                    DecodedKey::Unicode('\u{0015}')
                    DecodedKey::Unicode('\u{0016}')
                    DecodedKey::Unicode('\u{0017}')
                    DecodedKey::Unicode('\u{0018}')
                    DecodedKey::Unicode('\u{0019}')
                    DecodedKey::Unicode('\u{001A}')
thejpster commented 1 year ago

Thanks!