Numpad keyboard rtl false not working when document direction rtl is true

My document direction is rtl.
That making problems with the new numpad keyboard direction:

   = "rtl";
            const label = new Label("").pos(0, 100, CENTER);
            const keyboard = new Keyboard({
                labels: label,
                numPadScale: .75,
                numPadOnly: true,
                numPadAdvanced: true,
                rtl: false
  , 120);

The numpad keyboard rtl is false but I entered 2*(5-1) and the text rtl.
Also the brackets buttons are rtl.
Thank you!

should the rtl:false of the keyboard override the rtl of the document and make the keyboard work as if there were not rtl set anywhere? And welcome @herut - I do not think we have met yet! Glad you are here.

Herut is a new developer that works with us and last month she joined Zim :hugs:
We tried playing with the RTL and it didn't help

1 Like

Can you please tell us what we should see for rtl on the numpad?

  1. Should the brackets still look like this ( )?

  2. Should the numbers work like non-RTL numbers work?

Thanks - sorry, just not sure what should happen.

Hi Dr. Abstract,
Thank you for the warm welcome.
I am happy to join the ZIM community.

The elements in the document should be RTL, except for the numpad which should be LTR.

  1. Yes.
  2. Yes.

Thank you!

1 Like

Hi @herut,

We have adjusted ZIM 016 to show the brackets reversed back if rtl is set on the HTML page.

We have an idea to solve the typing of numbers but perhaps you guys can do a test. The idea is that we can set the document to rtl false when we want to type numbers and set it back again when we are not typing numbers. We also added events in the patched ZIM 016 for the NumPad being opened and closed.

keyboard.on("numpadopen", ()=>{
	zog("numpadopen"); = "ltr";
keyboard.on("numpadclose", ()=>{
	zog("numpadclose"); = "rtl";

Can you see if this helps? Make sure to refresh to get the new ZIM 016.

Thank you very much for the fix!
Everything is working great now.

1 Like