User avatar
stonstad
Topic Author
Posts: 241
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Disable Onscreen Console Keyboard During TextBox Focus

30 Oct 2023, 23:08

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).
 
User avatar
jsantos
Site Admin
Posts: 3925
Joined: 20 Jan 2012, 17:18
Contact:

Re: Disable Onscreen Console Keyboard During TextBox Focus

31 Oct 2023, 18:48

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.
 
User avatar
stonstad
Topic Author
Posts: 241
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Re: Disable Onscreen Console Keyboard During TextBox Focus

31 Oct 2023, 22:34

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!
 
User avatar
jsantos
Site Admin
Posts: 3925
Joined: 20 Jan 2012, 17:18
Contact:

Re: Disable Onscreen Console Keyboard During TextBox Focus

01 Nov 2023, 10:29

UWP has TextBox.PreventKeyboardDisplayOnProgrammaticFocus for exactly your scenario.

Could you please open a ticket about this?
 
User avatar
stonstad
Topic Author
Posts: 241
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Re: Disable Onscreen Console Keyboard During TextBox Focus

01 Nov 2023, 15:08

Who is online

Users browsing this forum: Bing [Bot] and 5 guests