Change on-screen keyboard's orientation

When using Z.Keyboard.show(), is it possible to change the on-screen keyboard’s orientation? It’s always in portrait, so I can’t make a landscape layout if the keyboard’s orientation won’t change.

1 Like

Hi @marcus ,

Unfortunately, this is not currently something that is possible in Studio.

Z.Prompt and Z.Keyboard are automatically adjusted to be in the portrait state when initiated.

Hope this doesn’t cause to much inconvenience!

All the best,
George

1 Like

Do you consider implementing this? I can’t have a responsive registration screen without it…

1 Like

Hi @marcus,

Sorry for the late reply, we have been working on something to overcome this issue!

You’ll be happy to know, we have developed a re-usable keyboard subsymbol that automatically rotates with the device.

You can download the subsymbol here - Keyboard.zip (291.2 KB)

And a simple example project showing how it works here - Keyboard example.zip (293.8 KB)

After downloading the keyboard subsymbol, you drag the ZPP directly into the Symbol Definitions panel and then follow the instructions in the notes below.

Keyboard Subsymbol

This is an interactive keyboard that can be used in a project by simply dragging the symbol from the symbol definitions, into the Hierarchy .


When the user touches the enter button, the ‘EnterPressed’ event is emitted. To make something happen when the enter button is touched, create a reference to the Keyboard in a script (Drag from Hierarchy directly into the script) and add this ->

Keyboard.on("EnterPressed", (e) =>{

    let finalInp = e;

    //Your string is now saved to the variable finalInp

});

Hope this helps and if there are any questions about the keyboard subsymbol or example, please do let us know! :slight_smile:

George

3 Likes