Skip to content
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

UK ScanCodeSet 2 errors #25

Closed
thejpster opened this issue Feb 4, 2023 · 1 comment · Fixed by #27
Closed

UK ScanCodeSet 2 errors #25

thejpster opened this issue Feb 4, 2023 · 1 comment · Fixed by #27

Comments

@thejpster
Copy link
Member

thejpster commented Feb 4, 2023

On a PS/2 UK keyboard with 0.6.1:

  • The #~ key produces \|
  • The \| key produces #~
@thejpster
Copy link
Member Author

thejpster commented Feb 4, 2023

KeyCode::HashTilde => {
    if modifiers.is_shifted() {
        DecodedKey::Unicode('~')
    } else {
        DecodedKey::Unicode('#')
    }
}

should be

// Ok a UK keyboard, this is actually left of Z and has neither Hash nor Tilde on it
KeyCode::HashTilde => {
    if modifiers.is_shifted() {
        DecodedKey::Unicode('|')
    } else {
        DecodedKey::Unicode('\\')
    }
}
// This key is between Carriage Return and @
KeyCode::BackSlash => {
    if modifiers.is_shifted() {
        DecodedKey::Unicode('~')
    } else {
        DecodedKey::Unicode('#')
    }
}

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 a pull request may close this issue.

1 participant