Skip to content

Added Dvorak keyboard layout. #73

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

Closed
wants to merge 1 commit into from
Closed

Conversation

kerthale
Copy link

Redid the ASCII to keycode table to support a Dvorak key layout. It mostly is a verbatim copy from the existing KeyboardLayoutUS.

@dhalbert
Copy link
Collaborator

Hi, thanks for your PR. Two comments:

What is your use case for this layout? Are you building a homebrew Dvorak keyboard? Are you telling the host computer that your keyboard is Dvorak? In that case it will do the remapping. In general I would not recommend using a KeyboardLayout to send keypresses, because you don't have the fine control you need for modifier keys, etc. Instead send the Keycodes directly.

The adafruit_hid library is already large, and we've decided not to add further keyboard layouts to it. See #46, #54, #60, #61. A new layout could be added as a new library, and #61 is aimed at making that easier.

@kerthale
Copy link
Author

Hi,

my host computer uses a Dvorak layout with a Qwerty keyboard. I am using this for automatic text entry. I'm indeed also using Keycodes directly but there too also using the KeyboardLayout to translate from the letter to the keycode, it's more convenience switching between the various layouts.

I totally understand that, I had some doubts about it too as there was a high duplication between the layouts, practically everything is copy-pasted while I'm actually only modifying the ASCII table. I'll keep an eye on PR #61 as it seems to address these concerns. I'll refactor when that is merged.

Thank you for the consideration though! I'll close the PR and make a new one when #61 is merged if that's okay.

@Neradoc
Copy link
Contributor

Neradoc commented Aug 4, 2021

FYI I'm in the process of building up a keyboard layouts repository/bundle, to make it easier to find and download keyboard layouts independently, while not requiring to create a new repository for each layout. It uses a modified KeyboardLayout class from PR 61.

I converted and added your Dovrak keyboard layout to it.
I haven't tested it with a real keyboard.

https://github.com/Neradoc/Circuitpython_Keyboard_Layouts

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