(Teletype) Tracker Input Improvement

Addressing issue #63, I have created a patch that changes the data entry model in the tracker.

Now, data entry in Tracker mode is buffered, only applying the change to the cell when you press the Enter key. Additionally, while in data entry mode, the keystokes for negate, increment, and backspace still function. Any other keystrokes will abandon data entry.

Design Choices

  1. The entry mode for non-zero cells is append, like the existing model, but the cell could be cleared first. I’m in favour of clearing the cell first, personally.
  2. The increment and decrement wrap around, but it could be changed to clamp them at the limits (-32768 to 32767).
  3. There is no visual difference between a select mode cell and an data entry mode cell. Maybe reverse the video?
  4. Pressing the minus key on a non-zero cell in select mode is still an instantaneous change, not engaging the edit buffer. It could be changed so that pressing the minus key enters data entry mode, requiring the Enter keystroke to confirm the negation.
  5. If you enter a value greater than the limits, the previous input is discarded, e.g.: If you type 33000 (over the 32767 limit), the third zero becomes the new value. If you typed -32769, then -9 would remain. The only sane alternative I can think of would be to block the keystroke, which might be preferable.

I’d like to know which choices you prefer.

Also, let me know if you have any questions or comments about the functionality.

3 Likes

this would be a huge improvement, agreed. my preferences below:

  1. yes, clear cell
  2. wrap
  3. needs a visual difference, but doesn’t necessarily need to be reverse
  4. seems to me that minus/plus should stay instantaneous, adding the enter would make certain types of performance-editing slower. perhaps shift-plus/minus could enter data-entry mode?
  5. blocking seems more intuitive
5 Likes

Added a PR that conforms to your preference for 1,2, and 5.

3 will require me to learn a bit more of the screen draw / region routines.
4 I left as-is, as users can always hit a numeral + backspace and then negate + enter if they want to buffer a negative for now.

2 Likes

totally floored that you got on this so quick! away from hardware until tomorrow, will pull then (unless @sam gets there first!)

thank you!

2 Likes

I’m off to the Zoo today, and tomorrow is the last day of the summer holidays.

Hopefully I’ll be able to get through any PRs that are left on Wednesday or Thursday.

11 and counting :wink:

All of them merge together just fine but you’ll be editing state.h/.c a few times.

Eek. While I appreciate your enthusiasm, can I ask you to slow down a little… otherwise, please accept my apologies that it might take me a while to work my way through them all.