trustcrypto / OnlyKey-Firmware

The OnlyKey Firmware runs on the OnlyKey itself and provides the core functionality of OnlyKey.
https://docs.crp.to/firmware.html
212 stars 40 forks source link

Add Dvorak layout based on US International. Untested. See Issue #85. #96

Closed derekelkins closed 3 years ago

onlykey commented 4 years ago

@derekelkins Thanks much appreciated! I don't have a Dvorak keyboard handy if I generate the firmware with this change and sent you an OnlyKey with this loaded would you be able to test it out?

derekelkins commented 4 years ago

I don't have a hardware Dvorak keyboard either. It should be enough to set your keyboard layout in software to Dvorak temporarily, e.g. via loadkeys or setxkbmap in Linux or via the Language options in Windows. Then, as a first pass, checking the whether the instructions you get from holding down 1 get typed out correctly when your keyboard layout is set to Dvorak. Ideally, you'd want to have a little debug keygen function that would type out all the extended ASCII characters from 0 to 255 and a script that checks that they are received as expected.

eternaltyro commented 4 years ago

Correct, you could use setxkbmap dvorak to switch to Dvorak on Linux. No hardware KBD necessary.

igorline commented 3 years ago

Waiting for this to be merged!

onlykey commented 3 years ago

@igorline The reason it wasn't merged is the changes were not working fully. Also its not clear if the best way to support Dvorak is to add this to OnlyKey or just to instruct user to change their keyboard layout in the OS. Usually you can have a different layout assigned to multiple keyboards, so Dvorak assigned to your keyboard and US assigned to OnlyKey. Thoughts?

igorline commented 3 years ago

@onlykey I'm using arch and I don't know if I can set a specific keyboard layout per device that is connected rather x session. Thus it makes annoying to de-dvorak all my entries to be typed correctly.

igorline commented 3 years ago

I'm up for testing dvorak layout firmware if you need assistance

eternaltyro commented 3 years ago

Also its not clear if the best way to support Dvorak is to add this to OnlyKey or just to instruct user to change their keyboard layout in the OS.

I would prefer that OnlyKey can be set to assume a specific keyboard layout rather than changing my OS settings everytime I use OnlyKey. This in my (strongly held) opinion is the way to go.

Usually you can have a different layout assigned to multiple keyboards, so Dvorak assigned to your keyboard and US assigned to OnlyKey. Thoughts?

This is too hack-y and makes the use of OnlyKey less accessible to non-tech-savvy people like me.

chaomodus commented 3 years ago

Just to echo other comments here, it is impractical for me to switch layouts for the login box or other things, especially since my systems are dvorak at bootup so using only key to type the disk password or whatever wouldn't work at all.

onlykey commented 3 years ago

@chaomodus Understood, it's not possible for a USB device to autodetect what keyboard layout to use. The only way to automatically switch profiles would be for software on the computer to set OnlyKey's layout (a script that runs like udev) or for software on the computer to change the layout for that device @derekelkins mentioned using loadkeys or setxkbmap.

onlykey commented 3 years ago

I am going to close this issue as we have added the Dvorak layout to the latest released firmware