seawarrior181/PasswordPump_II

Keyboard-Layout wrong/not changeable?

Closed this issue · 21 comments

DHA81 commented

I'm in Germany and using german keyboard-layout,
passwords etc. are saved ok,
but they're sent wrong, could this be changed somewhere?
Had a look into keyboard-part of arduino, but can't find a way.

I'm sorry to hear you are having a problem. I have tried to add support for the German keyboard today. Please follow the instructions in the users manual to burn https://github.com/seawarrior181/PasswordPump_II/blob/master/v2_0_4/PasswordPumpGerman_v_2_0.ino.bin firmware to your ItsyBitsy M4. Remember to download also the corresponding PasswordPumpGUI file: https://github.com/seawarrior181/PasswordPump_II/blob/master/v2_0_4/PassPumpGUI/PassPumpGUI_v2_0.py . Kindly let me know if it works.

If you are compiling and uploading from the Arduino IDE, download the latest version of PasswordPump_v_2_0.ino and uncomment the "German" pre-compiler directive on line 789. Install this library: https://github.com/seawarrior181/PasswordPump_II/blob/master/Libraries/Arduino-German-Keyboard-master.zip

DHA81 commented

Tried the bin file first, didn't work (nothing on screen, LED stays off), will try via arduino too.

DHA81 commented

Works via arduino.
Y isn't changed to Z anymore, but now the @ is a q...

DHA81 commented

Seems to be wrong in the german library, is simply sent as q instead of sending with "alt gr" (could be right alt).

DHA81 commented

Oh, have read again, have forgotten to run the script...

Did you purchase this on Tindie or are you building it on your own?

DHA81 commented

No, that didn't work too, seems to be really wrong in the library...

DHA81 commented

Tindie ;-)

DHA81 commented

That's right ;-)

Ok I will issue a refund to you on the Tindie site. I did create another binary file (in the same place) that you might want to try to burn: PasswordPumpGerman2_v_2_0.ino.bin if you're up for it let me know how it goes. I don't have a German keyboard here or any German language skills so it is difficult to troubleshoot.

DHA81 commented

You don't have to refund it, I think we could find a way 😉 Will try the binary as soon as I can.

DHA81 commented

New bin file starts, but also has " instead of @, tried the experimental Keyboard_DE, seems to work right, but there will be some missing ">","<" etc.
Yet i don't know what the finishGermanLayout.py script does, but something isn't done right, but it's a starting point for a solution ;-)
I don't have a problem if some developed devices don't work 100% from start, as long as there is no hardware-problem everything could get better.
So we'll see how it could be done better, i don't worry yet about some missing characters, just have to leave them away at new passwords yet.

DHA81 commented

Oh, additional, works on a huawei p30 pro via otg too, so will be using it on every device.
Currently i mostly use ubuntu, some experience with python and arduino, so i think i'll have a look if i could find a way too to get all characters, not that fast, but i think i'll find a way.

Hi DHA81,

The first .bin file I posted was built with Keyboard_DE.cpp, but I guess that file has some problem. I think I may have built it with the wrong board selected in the Arduino IDE, so I will build it again and re-post it. I also fail to understand the purpose of finishGermanLayout.py. I definitely think that the solution is to get ...\arduino\libraries\Keyboard-master\src\Keyboard.cpp set up correctly. I have versions of that file for Czech, Danish, Swedish, Norwegian, Finnish, French, German, Spanish and the US. I guess the German version still needs some work. If you get it straightened out please send me the Keyboard.cpp (and possibly Keyboard.h) file that works for you so that we can share it with others. I greatly appreciate your help & patience. If you change your mind about the refund don't hesitate to contact me, I am happy to oblige.

Also, see https://github.com/Necr0tizing/ArduinoKeyboardLayouts for all of the other keyboard layouts.

Best,
Dan Murphy
dan-murphy@comcast.net
5volts.org

I've re-added PasswordPumpGerman1_v_2_0.ino.bin, which was build using Keyboard_DE.cpp and Keyboard_DE.h. This one should burn without any problems.

DHA81 commented

Found a workaround for all problems, changed the version by besoberlin a little bit, so all ascii-characters should work.
Uploaded the changed Version to https://pastebin.com/xhUFnu6M
Workaround at 237-247 and 297-309, commented some ascii-Chars.
Main-Problem is that the key for <>| has the hid-code 0x64, but besoberlin used 0x40 (alt-gr on german keyboard) in the table, so it would be detected wrong.
Changed it so if char is ascii 60, 62 or 124 then it would be handled outside of the table.
I don't know if there is a better way, but works ;-)

DHA81 commented

Oh, and your changed version of the bin-file had also the known problems with wrong chars, but now we have the workaround ;-)
And learned a bit more about it too ;-)

DHA81 commented

So yet this workaround could work for other languages with same keyboard-layout, i think it should be switchable inside the firmware, because if someone travels it could be possible that he has to use a pc with different layout.

Exceptional! Thank you VERY MUCH for addressing this issue, you've done all of us a service. I agree it should be switchable inside of the firmware and I need to figure out how to do that, it is on my list. I will update the library and all of the documentation to explain how to get things to work with a German keyboard. Well done!

Users' Guide is updated to explain how to compile with Keyboard_DE.h and Keyboard_DE.cpp into the product, yielding a solution to the original problem.