Skip to content

start of Azerty layout scancode set2 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 19, 2020

Conversation

le0kar0ub1
Copy link
Contributor

Basic Azerty layout handling.
The method used for other layouts occult the azerty meaning.

@vinc
Copy link
Contributor

vinc commented Jul 3, 2020

Hi, I have a French azerty keyboard on my laptop so I tested your branch on my little OS (https://github.com/vinc/moros), and the letters and numbers work fine but I had trouble with some other keys.

For example the < key at the bottom left of the keyboard doesn't work, while the * key on the right behave as if it was the < key. Are they working correctly for you? The issue could very well come from my OS though.

@le0kar0ub1
Copy link
Contributor Author

le0kar0ub1 commented Jul 3, 2020 via email

@le0kar0ub1
Copy link
Contributor Author

le0kar0ub1 commented Jul 4, 2020 via email

@vinc
Copy link
Contributor

vinc commented Jul 4, 2020

The US Qwerty keyboard layout is 104 keys, and the UK one is 105 keys. I think the common French Azerty keyboard is 105 keys like the UK one, so it might help to reuse Uk105Key and code only what is changing between those two.

https://upload.wikimedia.org/wikipedia/commons/d/da/KB_United_States.svg
https://upload.wikimedia.org/wikipedia/commons/d/da/KB_United_Kingdom.svg

That's what I did when I implemented the Dvorak layout from Us104Key as you can see here: https://github.com/rust-embedded-community/pc-keyboard/pull/6/files#diff-ec45777dbfe740feab6d8d88592c97d1R297

@vinc
Copy link
Contributor

vinc commented Jul 4, 2020

You made me realize that actually I should also have started from Uk105Key to have the bottom left key working on a Dvorak 105 keys keyboard!

@le0kar0ub1
Copy link
Contributor Author

le0kar0ub1 commented Jul 5, 2020 via email

@le0kar0ub1
Copy link
Contributor Author

le0kar0ub1 commented Jul 5, 2020 via email

Copy link
Contributor

@vinc vinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested all the ASCII chars on my OS, and everything is working perfectly except 2 keys (! and =) where the lowercase and uppercase chars should be swapped.

}
KeyCode::Slash => {
if modifiers.is_shifted() {
DecodedKey::Unicode('!')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DecodedKey::Unicode('!')
DecodedKey::Unicode('§')

}
KeyCode::Equals => {
if modifiers.is_shifted() {
DecodedKey::Unicode('=')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DecodedKey::Unicode('=')
DecodedKey::Unicode('+')

} else if modifiers.alt_gr {
DecodedKey::Unicode('}')
} else {
DecodedKey::Unicode('+')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DecodedKey::Unicode('+')
DecodedKey::Unicode('=')

if modifiers.is_shifted() {
DecodedKey::Unicode('!')
} else {
DecodedKey::Unicode('§')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DecodedKey::Unicode('§')
DecodedKey::Unicode('!')

Copy link
Contributor

@vinc vinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@le0kar0ub1
Copy link
Contributor Author

let's go :)

@vinc
Copy link
Contributor

vinc commented Jul 9, 2020

@thejpster could you have a look at this PR?

It would be great to publish a new version of the crate after that with the new layouts 🎉

@thejpster
Copy link
Member

I no longer have write access to this repo I'm afraid.

@thejpster
Copy link
Member

I see I am the only person who can push to crates.io though - who would like to be added to that, and can I add a Github group to a crate?

@thejpster
Copy link
Member

OK, once rust-embedded-community/meta#2 is sorted, I can set the owner of pc-keyboard to be that team, and anyone in that team can push you a new release.

@vinc
Copy link
Contributor

vinc commented Jul 17, 2020

That seems great 👍

@thejpster thejpster merged commit 6fe3616 into rust-embedded-community:master Jul 19, 2020
@vinc vinc mentioned this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants