Digital keyboard does not appear when Using INKEY

Discussions specifically related to the Android and iOS editions of BBCSDL
User avatar
zachnoland
Posts: 22
Joined: Sat 07 Dec 2024, 15:22
Location: somewhere in Southeast Asia

Digital keyboard does not appear when Using INKEY

Post by zachnoland »

I know you want to keep the UI visuals minimalistic on bbcsdl mobile, I don't really mind that. But I found a problem if I use input statements like INKEY and INKEY$(), where the digital keyboard does not appear (this also applies to library nowait.bbc). But the keyboard functioning and appears if you use INPUT, GET, and GET$. I hope you can fix it. :)
Richard Russell
Posts: 457
Joined: Tue 18 Jun 2024, 09:32

Re: Digital keyboard does not appear when Using INKEY

Post by Richard Russell »

zachnoland wrote: Mon 08 Sep 2025, 06:25 I found a problem if I use input statements like INKEY and INKEY$() where the digital keyboard does not appear
This is by design. INKEY (and INKEY$) wait for a certain specified maximum time, and they are very commonly used in programs purely to introduce a delay or to monitor for a keypress in order (for example) to abort a loop which otherwise runs indefinitely. Obviously you would not want the on-screen keyboard to appear in such circumstances, and if it did it could make the program unusable.

So if you are using INKEY or INKEY$ in a circumstance when you do want the on-screen-keyboard to appear then show it explicitly using the *OSK ON command. The *OSK command is the primary way of showing the on-screen-keyboard; statements like GET and INPUT do so automatically, as a convenience, but they do not replace *OSK.
I hope you can fix it.
There is nothing to fix, it must work this way.