Custom Keyboard Map, Case Change Issue

Changing from lower (abc) to upper case (ABC), or reverse is not functioning correctly.
Special characters (1#) works perfectly.

simulator link…
https://sim.lvgl.io/v9.0/micropython/ports/javascript/index.html?script_startup=https://raw.githubusercontent.com/lvgl/lvgl/73de6a2e94378450ff7ceb13d0919ac085fd9925/examples/header.py&script=https://raw.githubusercontent.com/lvgl/lvgl/73de6a2e94378450ff7ceb13d0919ac085fd9925/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py&script_direct=3d73f032bd58a5a897607e3b8b5012fad601a213

Hi, could you explain what is not working? It’s not clear to me.
Clicking on abc/ABC switches lower/upper case keyboard as I would expect.

Clicking abc/ABC toggles keyboard many times.
Not a single flip to new map. It is a hit or miss getting correct map.

What is… LV_KEYBOARD_CTRL_BTN_FLAGS |
Do I need to add… “LV_KEYBOARD_CTRL_BTN_FLAGS |” to my control map?

Visitors… are you seeing the issue described ??? (31 as of to day)
I have trested the simulator code with my workstation and laptop,
and both exhibit the same rapid toggling of uc and lc maps.

Hello, I’m not sure what’s going wrong here.
Even stranger is that the text not only flips, but the Z key is pressed before the L key each time too.
L will be triggered AFTER caps lock, and Z before.

What LVGL version is this? The simulator says it’s v9, which is still under development. That might be part of the issue.

yea…
I don’t under stand why btn_text(btn_id) L and z are even registering as button presses.
If anything you would think “ABC” and “abc” would be returned.
I 'm not as concerned about key returns as much as not being able to
click “ABC” or “abc” ONCE to change keyboard layout.

Other input greatly appreciated !!!

This sounds like the “repeat” feature, when you click on a button continuously.
See LV_BTNMATRIX_CTRL_NO_REPEAT in the docs (lv.btnmatrix.CTRL.NO_REPEAT in Python)
Did you try it?

https://docs.lvgl.io/master/widgets/btnmatrix.html#control-buttons

I am not holding down button… just a SINGLE CLICK fires event multiple times.
This does not happen with the standard keyboard…
but if maps are changed this rapid fire of a singe “abc” or “ABC” button click appears
and the ability to just go from lower case to upper case keyboard layout is a hit or miss issue.
You dont see this in the simulator link ???

I did the following experiment: I moved the forth line (the one that starts with abc/ABC) to the first line and enabled CTRL.NO_REPEAT - now everything works as expected!

See: LVGL/MicroPython Simulator

You’ll also see “abc was pressed” / “ABC was pressed” prints correctly.

I think this is a bug in LVGL, unrelated to Micropython.
If you want this addressed, I suggest you open a GitHub issue on LVGL.
If you are able to reproduce this on C you might improve the chances that this will be addressed.

OK…
That was an interesting find !
So I removed " | lv.btnmatrix.CTRL.NO_REPEAT " from your simulator scrip and keyboard still functions.
This means there is no issue with button pressed time.
It appears that " abc / ABC " are location dependant on something in order to function correctly.
I will post on LVGL and hope someone will attempt to recreate in C.

FROM…
image

TO…
image

WORKS !!!

Why does it matter where the abc/ABC button is ???
No one has responded to my post in How-To…

Updated simulator link

I removed 1 button (?) from the top row and all is working.
Didn’t realise I had a ? on the special map so all is fine.
Still does not explain why the issue though.