Post Reply 
04-July-2017 Virtual Keys - Virtual Keyboard v1.3b [Updated]
01-04-2022, 08:32 PM (This post was last modified: 01-05-2022 01:07 AM by IHarwell.)
Post: #27
RE: 04-July-2017 Virtual Keys - Virtual Keyboard v1.3b [Updated]
(01-04-2022 02:23 AM)mushman Wrote:  Here's a patched version with some changes:
- Textbox follows selected color theme as well as light/dark theme.
- Removed box with layout info and moved shift/alpha icons to the right (more screen is visible).
- Toggle keyboard with [On] button instead of Alpha+Dot.

Cheers!

Thanks for the update!

I'm relatively new here, so please forgive me if this isn't where this should go.

I'm getting an error on line 205. Did you mean to use the "time" system variable, or the "ticks" function?

I also noticed a few things that could use improvement (IMO, others' preferences may vary):
  1. Perhaps draw icons on the title bar like the Prime does when you press the appropriate button?
  2. Detect whether the current font size rather than making everything large enough to handle the largest font. (See Easy Sto II code for an example of this that works pretty well. It took some time to get it running reliably, so I wouldn't recommend writing it from scratch unless you know of a better way to do it.)
  3. Use the "Shift" key to move to capital letters instead of "Alpha" (How the Prime does it natively)
  4. Perhaps add a "Backspace" and/or "Enter" button on the keyboard?
  5. If the user holds down either the "Shift" or "Alpha" keys, exit the mode when they're released and don't exit the mode while it's "Del" key with the "Shift" key down, which should delete the next character and leave the Shift mode on.
  6. Perhaps add an option for it to remember the last mode it was in between calls?
  7. Add pass-through support for the Apps, Home, Cas, Symb, Plot, Num, Help, View, and Menu buttons. Most built-in features exit whatever mode they're in and execute those buttons directly when they're pressed.
  8. Take the lower commands on the screen on entry and redraw them above the keyboard when running it. This would only apply to the Home and CAS views, I think.
  9. Move to Python for much faster drawing routines? It can be done here since it looks like they aren't trying to interact with the command line directly or read screen pixels from within the input loop. The Python methods for reading key states is quite efficient, but would require a poll loop rather than reading the key buffer. It would introduce a roughly fixed 15-20 ms latency on entry, but would get the execution loop to run significantly faster if my testing is any indication.
  10. Change the exit routine to leave when the "On" key is released rather than when it's pressed, as it currently exits, the calculator sees that "On" is pressed, and immediately runs it again.


I can take a look at making those changes if any of them sound good to other people. Most of them are really simple to do from what I've seen of the code. Just let me know the numbers that sound worthwhile? I'd prefer to avoid making unwanted changes if I can avoid it.

** EDIT: I just checked a few things out, and it looks like the touchscreen reliably registers taps that are just outside the screen area. If people think it's a reasonable thing to do, it should be feasible to leave the current layout as-is, and just add the backspace button to one of the half-keys on the right edge of the keyboard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 04-July-2017 Virtual Keys - Virtual Keyboard v1.3b [Updated] - IHarwell - 01-04-2022 08:32 PM



User(s) browsing this thread: 1 Guest(s)