ljubo wrote: ↑
Sat Jan 29, 2022 12:01 pm
Current implementation of pcm is working, however, it is quite a hack (quick and dirty) - I never really fully understood keyboard handling and even menu handing is a bit of mystery
- in other words, some code review and hints how to do it better (properly) would be great.
I feel the same way, actually! The keyboard and menu handling code is a big pile of one special case piled on top of the other, I never really made an effort to clean it up and make it rule-based. As long as I was only aiming to re-create the HP-42S, that approach made sense and flowed kind of naturally, but once I started adding a lot of new functionality, it became more and more apparent that this is not a very nice piece of code to work with. I am a bit reluctant to go in and clean it up, though, because it does work...
Maybe I'll spend some time this summer to clean things up. If I ever decide to add more types, it would really be nice to have more structured logic to work with, since adding types right now just creates more and more complexity.
It for now, maybe I could merge the permanent-CUSTOM code base into master, if it can be done in a way that it is an option that can be turned on and off at any time, with a switch in the Preferences dialog. I'm not familiar at all with the SwissMicros code, but if I could look at a diff between their version and your patched one, I could probably get a good idea of whether it makes sense to transplant, and if there are things that could be improved.