Virtual keyboard | Sololearn: Learn to code for FREE!


Virtual keyboard

Hello. I looking for a way to open keyboard on mobile. I found some trick with jQuery, but it not works: if (checkMobileOrTablet) { document.write("<input>"); $("input").trigger("focus"); $("input").trigger("click"); } After that I run this code on mobile, I have only foncued on input, but none keyboard.

5/18/2018 4:46:29 AM

Vojtěch Novák

3 Answers

New Answer


Assuming you want to write a code to get user input, you can use html form: Keyboard will be called automatically when user provides input to textbox.


I don't want write code with some input. I want open virtual keyboard to call onkeyup event. On computer don't need this, because keyboard is hardware.


Try this: Anyway, if you don't need user to key in something, I would suggest you to create some buttons with onclick events (instead of calling the keyboard).