Skip to content

Open Virtual Keyboard / On-Screen Keyboard (OSK) #274

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
ekasetiawans opened this issue Sep 30, 2019 · 8 comments · Fixed by #282
Closed

Open Virtual Keyboard / On-Screen Keyboard (OSK) #274

ekasetiawans opened this issue Sep 30, 2019 · 8 comments · Fixed by #282
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ekasetiawans
Copy link

Does application will show virtual keyboard automatically on touch screen computer that dont have phisical keyboard?

Or, how to catch open keyboard request? I'll trying to open virtual keyboard manually.

@pchampio pchampio added the enhancement New feature or request label Oct 1, 2019
@pchampio pchampio changed the title Virtual Keyboard Open Virtual Keyboard / On-Screen Keyboard (OSK) Oct 1, 2019
@pchampio
Copy link
Member

pchampio commented Oct 1, 2019

go-flutter side

Currently, nothing is done on the go-flutter side when the engine sends show and hide keyboards events.

go-flutter/textinput.go

Lines 54 to 56 in 87e0b2f

// Ignored: Desktop's don't have a virtual keyboard, so there is no need to show or hide it
p.channel.HandleFuncSync("TextInput.show", func(_ interface{}) (interface{}, error) { return nil, nil })
p.channel.HandleFuncSync("TextInput.hide", func(_ interface{}) (interface{}, error) { return nil, nil })

In the future, those events coming form the internal flutter/textinput MethodChannel could be expose to end-developers through a new Options hooks.
The golang code quite straightforward to write, I'll leave this issue open for first-time contributor!


end dev side (hover users)

After a bit on googleing, the windows exe to open the on-screen keyboard seems to be Tabtip.exe.
For now, I don't want to add this functionality into the go-flutter code, I'll be much better if those special use cases are handled by hover users. Nonetheless, a quick and temporary Tips-and-tricks section can be written.


edit: miss-clicked the closed button 🥇 , reopening this valid request.

@pchampio
Copy link
Member

pchampio commented Oct 17, 2019

https://github.com/go-flutter-desktop/go-flutter/wiki/Tips-and-tricks#3-open-the-virtual-keyboard-on-text-edit

For windows and OSX, it's up to the community to adapt the above tip&trick.

@ekasetiawans
Copy link
Author

woow, thanks @Drakirus

@ekasetiawans
Copy link
Author

ekasetiawans commented Oct 25, 2019

I create this for showing windows virtual keyboard.

Link

@ekasetiawans
Copy link
Author

I have try
exec.Command("osk") or exec.Command("tabtip.exe") but not working.

@pchampio
Copy link
Member

I do not run on windows so I can't help you.
If it is not possible to open the virtual keyboard in go, maybe try to craft a .bat file that opens the virtual keyboard, and call it from go?

@ekasetiawans
Copy link
Author

ekasetiawans commented Oct 25, 2019

@Drakirus , yes it's not possible to open the virtual keyboard in go. I got the requested operation requires elevation. But, now I have solution. I use user32.dll to showing virtual keyboard from tray icon instead of execute osk.exe or tabtip.exe. But this only works on windows 10 and you have to show touch screen keyboard on tray icon.

This is the link

Maybe someone can review my work.

@pchampio
Copy link
Member

Thanks for sharing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

2 participants