I think I may see the issue. In my initial post, I quoted the wrong file name that I was giving me issues. It is “text editor.py” that won’t let me enter any shifted characters. I just tried the python editor “editor.py” and it does let me enter shifted special characters except ~ and |.
First off, Really nice work on picoware! Impressive stack!
I really have been enjoying coding directly on the device in MMbasic, but I’m now hooked on the key bindings.
When using picoware’s editor the biggest pain point is the “backspace” becomes “back”. Maybe it could be escape instead?
I’ll look into putting together a few other tweaks that might make it more familiar for users coming from the MMbasic editor, such as F1 to save and close and adding options for page up/down.
Would it be realistic to have a F2 Run option directly from The editor?
let me know if you think these would be worthwhile changes to the existing editor or better as a fork into a different editor app! I know changing major things like the back behaviour might affect your other platforms and existing docs.
All of the current apps use the BACK button to return back to the previous app, so it’s not appropriate to change the key bindings for a specific app, especially since not all of the supported devices have an ESC key.
I think an F2 key for running the app directly could be realistic for sure, though users can currently just back out of the editor and run their app from the Applications menu.
Nice to hear that I’m not the only one who doesn’t like Back(space) key to exit current action. Picoware seems to not make good use of full PicoCalc keyboard, especially with that onscreen keyboard, so one cannot enter text with Enter key as it repeats the last key instead.
I think for now we’ll have to resort to some form of a patch for official Picoware release.
Well what key do you think is appropriate? The LEFT d-pad key? The ESC isn’t practical, other than on the PicoCalc. For users with custom boards, Picoware requires 6 buttons only (or a Touch Sceeen), so the system is built around that.
If you’re using the MicroPython version, Picoware does make full use of the PicoCalc’s keyboard. Using the on-screen keyboard is optional, you can instead just type using the keyboard. The on-screen keyboard is mandatory because of Picoware’s support of custom boards with only 6 buttons. With the on-screen keyboard, you used the d-pad to move to the character you want, and then click ENTER to add it to the response. It also has a SAVE key which when hit will trigger the keyboard callback.
Contributions are well welcomed! Please submit a pull request with your requested/suggested changes and I will review them.
I would recommend supporting different sets of key mappings for different devices, because while I understand wanting Picoware to support a wider variety of devices, using Back(space) to exit out of something is non-optimal when other keys are available IMO.
That’d be something I’d be happy to support actually! Contributions are welcomed. It’s just not as straightforward as changing one file, since every app currently uses the BACK key, and developers are allowed to choose their buttons with their app(s)
I mean it is labeled BACK. In my opinion, the (space) is just inferred and since the Calc has a DEL (for delete), it makes more sense to use it for deleting and the BACK key for backing out of views
I’m still dying waiting for mine to arrive, but was wondering about the on screen keyboard. I saw that another user wanted an option to disable it and I am wanting the same feature.
Would it be possible to map the F keys to contextual app functions? Then you could use just slice at the bottom of the screen to indicate what the F keys are currently bound to, I feel it would open the door to more sophisticated functions being only 1 key press away. It would also solve the Backspace, Delete, and Back key problems as you’d just map an F key to back out of menus/apps/views.
With regards to the keyboard use in Picoware: the most important perspective is the one of the end user. Let’s imagine a user who got a PicoCalc and they want to use some software running under Picoware. And there is a strange looking onscreen keyboard that obscures all the view. And when they made a typo and press Back key to erase last character and they are being thown out of an entry field, on a previous screen, with whole text lost - would they accept an explanation that “there are some other devices that don’t have a full keyboard so you have to re-learn using your device keyboard”?
I get that there is a programmer perspective as well and platform fragmentation is a problem. So what I think should be done is for Picoware to expose mechanisms for easy developing software once for several pico-based platforms.
Specifically, I would (and I will if time allows):
Define key codes for arrows, back, ok as constants, so that for Picocalc its D-pad, Esc, Enter and for non-keyboard devices it’s whatever they have
Define a constant that tells whether the device has full keyboard or not, so that the developer may have their code behave accordingly
Define some constant for the key names, so that e.g. the software prints “press Enter” or “press CENTER” according to the device characteristics
Have a standardized text entry function that displays onscreen keyboard only when the device doesn’t have it. Application developer wouldn’t need to think about that, they would just call the text entry function
It would be pretty straightforward in C: a bunch of #defines or const definitions.
For Python it would require a small class that would hold device characteristics, I’m not completely sure.
By the way - don’t treat my post as a criticism to Picoware - you are doing a great job and the whole thing is more and more useful in each release. I just thing that Picoware could be expanded to allow developer to write once and run on several device types.