6

I want to keep the keyboard displayed at the bottom by default without using a text input which the user needs to tap.

I need to keep the keyboard at the bottom at all times.

Then I need to listen to the events of the keyboard.

How can I do this?

3 Answers 3

7

The workaround I implemented was adding an invisible text box somewhere on the screen and then set it as focused manually.

Sign up to request clarification or add additional context in comments.

Comments

5

Just in case someone else might stumble upon this, OP's self answer works. In order to set focus manually, you'll need to get the ref to the hidden input.

<TextInput
    ref={input => (this.textinput = input)}
    style={{ display: 'none' }}
/>

then elsewhere in the code, you focus manually by

if (this.textinput) {
    this.textinput.focus();
}

Comments

2

This answer is way too late to do the OP any good, but for others:

You can't do this. In iOS, the operating system, keyboards simply don't/can't work this way. iOS never shows a keyboard without an active text input focus, and there is no way for even a native iOS app to override this OS-level behavior. The OS itself prevents this from happening.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.