+ 2

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.

18th May 2018, 4:46 AM
Vojtěch Novák
Vojtěch Novák - avatar
3 odpowiedzi
0
Assuming you want to write a code to get user input, you can use html form: https://www.w3schools.com/html/html_form_input_types.asp Keyboard will be called automatically when user provides input to textbox.
18th May 2018, 3:00 PM
Hanz
Hanz - avatar
0
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.
19th May 2018, 7:20 AM
Vojtěch Novák
Vojtěch Novák - avatar
0
Try this: https://javascript.info/keyboard-events 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).
20th May 2018, 5:07 AM
Hanz
Hanz - avatar