1
\$\begingroup\$

Background

I'm working on a word game and I found it kind of nice to use a hidden LineEdit as my text input. I hide it off screen, force focus on it, and then connect to its text_changed and text_entered signals to allow the player to type in and submit words. It works cross-platform and allows the user to use their keyboard for input instead of me having to build one myself.

Problem

On mobile, the auto-correct of my keyboard causes some unwanted behavior in my game. It seems that when it offers spelling suggestions, it will mutate the contents of the text box in some ways I'm not expecting. It doesn't mess things up too much, but I'd like to just disable it.

Research

I found that HTML has some attributes for inputs that appear to disable auto-correct. And I know from my personal experience that text inputs on some apps don't let me use auto correct like password fields.

I tried using the LineEdit#secret property, since it seemed like password fields might prefer to not use auto-correct, and it doesn't appear to make a difference.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I don't think the option you are looking for is implemented in Godot. Be welcome to write a proposal.

I'm not sure what you are trying to build, but you might find useful to invoke the virtual keyboard with OS.show_virtual_keyboard (this method does nothing in desktop platforms).

\$\endgroup\$
1
  • \$\begingroup\$ Yeah I'm already aware of the OS.show_virtual_keyboard method, and am using it :) I'll consider drafting a proposal, thanks! \$\endgroup\$ Commented Jan 18, 2022 at 2:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .