ayufan-rock64 / pinebook-pro-keyboard-updater

A keyboard/touchpad firmware updater tool
47 stars 21 forks source link

Support SuperKey+Arrow #7

Open simson opened 4 years ago

simson commented 4 years ago

It seems that with the updated firmware (and the old one) we can't produced arrow event when superkey is pressed

I'm not the only one bothered by this https://forum.pine64.org/showthread.php?tid=8265

Could we do something about that ?

MarcusE1W commented 4 years ago

What would have to be done to make this happne? Is this a mapping missing in a table or is some 8051 assembler required ?

Silur commented 4 years ago

works fine with an external keyboard so it's definitely a firmware issue Is there some doc available for the *.hex files?

jackhumbert commented 4 years ago

I think I have a fix for this that disables the privacy toggles - if you clone my fork, compile, and run sudo ./updater flash-kb-gui-fix ansi (or iso), it should fix it. I was able to test the ANSI version, but not the ISO. No reboot is needed for this.

e: this works by changing a compare value for the GUI key (0x08 to 0x09) so that it doesn't get handled differently than the other mods. I'm not sure yet why this was handled differently in the first place, but will report back if I find something. It was the privacy switches :/

Maldus512 commented 4 years ago

I think I have a fix for this - if you clone my fork, compile, and run sudo ./updater flash-kb-gui-fix ansi (or iso), it should fix it. I was able to test the ANSI version, but not the ISO. No reboot is needed for this.

Should I be mindful of anything while doing this? I remember reading on the forums that mistakes in the procedure could brick the keyboard.

MarcusE1W commented 4 years ago

Happy to report that it also works for ISO. The trackpad was a bit wonky after the update, but that was solved with a reboot. :-D

jackhumbert commented 4 years ago

Should I be mindful of anything while doing this? I remember reading on the forums that mistakes in the procedure could brick the keyboard.

I haven't fully explored this yet, but I hope to have an answer eventually - one of my goals is to be able to run custom firmware on these controllers, and part of that is fully understanding the flashing process.

jackhumbert commented 4 years ago

Well shoot - the GUI fix disables the toggling of the privacy switches. I'm finding another work around for this, but be aware of this if you're flashing it.

jackhumbert commented 4 years ago

Sorry for the spam - I have a fix that doesn't affect the privacy switches. More info about that is here: https://github.com/jackhumbert/pinebook-pro-keyboard-updater#revised-firmware

Silur commented 4 years ago

can confirm @jackhumbert 's binary works. May I ask whether you had some metadata about the firmware or completely reversed it?

jackhumbert commented 4 years ago

I was able to find the datasheet for the microcontroller, and we have the binaries for the working firmware, so it was just disassembling those and walking through the instructions. I have a lot of it documented in the firmware/ folder, and in the firmware/src/main.c.