Del Key Problem Solved!

10kHz is supposedly the most stable speed. I haven’t used picomite on mine so I don’t know anything related to that…

Updated the PicoCalc RC17 releases here to fix that timing issue. Thanks!

1 Like

There are still issues with the keyboard :
Left shift, right shift and Capslock add caracters on an input, ex :
First line : the string typed
Second line : printing the string

I don’t think it’s really a PicoCalc issue. The keyboard returns a displayable code for almost all keys, including Shift, Ctrl, Alt, CapsLK, etc. unlike on PCs and Macs. Since the code is returned, it shows up when you display the keys pressed.

I think it depends on how you are reading the keyboard from BASIC, if you are using INKEY$ or LINE INPUT then you shouldn’t be seeing keycodes for the modifier keys - you don’t on other MMBasics.

Does the PicoCalc even have a way to read the keyboard directly (and get the modifier keys) ? The standard PicoMite firmware doesn’t include the KEYDOWN, ON PS2 or MM.INFO(PS2) commands/functions that we use on the CMM2, MMB4L, MMB4W or PicoMite{VGA|USB|HDMI} platforms.

Tom

Using a single input command…

Input "Time"; t$
time$=t$

Typing 23:33:45
You get “Error : Expected closing bracket”…
If you print t$ you get 23@:33@:45

There is something wrong…

This will read the keycodes from the keyboard and display the hex codes

DO
A$=INKEY$
IF A$<>"" THEN PRINT HEX$(ASC(A$))
LOOP

I don’t think that’s valid syntax (with a semicolon)… This works:

Input "Time", t$
print t$

But yes, I get the same extra characters too. I checked against the official release that @guu made here and it has the same problem. Maybe create an issue over there on that github repo? It seems to be a problem with how the PicoCalc keyboard is being handled.

Both are ok :

Input "Time", t$

Gives you Time and you begin to type next to the “e”, without any space

Input "Time";t$

Gives you Time? and a space caracter after the “e”

I don’t have any github account…

Ah. I thought the “Error : Expected closing bracket” was caused by it since I wasn’t getting that. But I added in the assignment (Time$=t$) and I see that’s what throws the error.

I’ll create an issue and link to this discussion.

Hi folks,

I’ve had a look at Peter’s original I2C keyboard code vs. ClockworkPi’s patch and I have a hypothesis that the I2C keyboard hardware that Peter supports in the original PicoMite firmware (a “solderparty keyboard”) may not directly report codes for the Shift and Alt keys (they just serve as modifiers on the codes that the keyboard hardware sends for the other keys). Whereas the ClockworkPi keyboard is both modifying the codes that it sends for the other keys AND it is also sending codes for the modifier keys themselves. If that is the case then you need to filter out the latter in CheckI2CKeyboard() so they are not added to ConsoleRxBuf.

I believe this will solve the problem for INPUT and LINE INPUT (and I suspect INKEY$ has the same symptoms). However you will still be left with the problem that the PicoCalc has no equivalent of KEYDOWN() for directly reading the keyboard state … I don’t think Peter supported that for his I2C keyboard either.

Of course, I may be completely wrong :wink: .

Best wishes,

Tom

1 Like

Actually having briefly looked at the docs for one of the Solder Party I2C keyboards (not necessarily the correct one) I think they can be configured (by writing to a register) for various behaviours in this respect, but the default is to not separately report the Alt/Shift/Sym keys.

Best wishes,

Tom

I’m going to pause on this for now, but I’ll see about looking at it next time I go digging. I wouldn’t be upset if @guu ends up fixing it in the mean time though. :wink: And it makes sense that the various keyboard issues probably have the same root cause.

The ones I know about are:

These keyboard related bugs have already been fixed in my repo:

1 Like

Thanks for the issue on github :slightly_smiling_face:

1 Like

Great work
I’ve been working on something else these days

Now I added a patch based on your keyboard mapping fixes (DEL, ALT, etc.) into clockworkpi’s repo, to patch the stock PicoMite code ,which is the 5.x PicoMite

and I will use your fork to be the NEW official PicoMite firmware since your repo is much better

give me some time, I will put/sync new PicoMite 6.x uf2 files into PicoCalc’s github repo and will indicate the source

hope you will like it ,too

3 Likes

I’m still missing a CRLF at the end of a line of input.

Input "What is your name?";n$
Print "Hi ";n$

What is your name?TomHi Tom

I’m sure you’re already aware, but just to update the forum thread here…

The end of line input bug was fixed in one of the recent RC updates, in case anyone reads this thread and was wondering. :slight_smile:

2 Likes