Page 1 of 1

Disable Onscreen Console Keyboard During TextBox Focus

Posted: 30 Oct 2023, 23:08
by stonstad
Is there a way to disable a console's onscreen keyboard from appearing when a TextBox gains focus? My game has a hidden console window with a TextBox to view game state, and I'd like to continue using a keyboard with it. (The keyboard is attached to the console).

Re: Disable Onscreen Console Keyboard During TextBox Focus

Posted: 31 Oct 2023, 18:48
by jsantos
Is this coming from a mouse event? I am not sure if we should open the Onscreen keyboard when the input even is coming from a mouse or keyboard.

From now, you can hack this (NoesisUnity.cs TouchKeyboard.Open method) for example filtering the UIElement focused by name or something like that.

Re: Disable Onscreen Console Keyboard During TextBox Focus

Posted: 31 Oct 2023, 22:34
by stonstad
I programmatically focus the TextBox when the window opens. This causes the console on-screen keyboard to appear. Since this console supports a keyboard this isn't always a correct default behavior. I don't intend to advertise keyboard support... but it is something I am wanting to use today to simplify testing. The workaround you suggested looks great. Thank you!

Re: Disable Onscreen Console Keyboard During TextBox Focus

Posted: 01 Nov 2023, 10:29
by jsantos
UWP has TextBox.PreventKeyboardDisplayOnProgrammaticFocus for exactly your scenario.

Could you please open a ticket about this?

Re: Disable Onscreen Console Keyboard During TextBox Focus

Posted: 01 Nov 2023, 15:08
by stonstad