mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app, io: [wasm, android] add support for numeric/email keyboard mode
Previously, the on-screen keyboard always displays the text keyboard, (QWERTY or equivalent). For optimal user experience, it's possible to specify the keyboard type using `InputHint`. The on-screen keyboard will provide shortcuts or restrict what the user can input. Due to some limitations (gio#116), only numeric and text keyboards are supported on Android. Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -6,6 +6,7 @@ package wm
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"gioui.org/io/key"
|
||||
"image/color"
|
||||
|
||||
"gioui.org/gpu"
|
||||
@@ -84,8 +85,12 @@ type Driver interface {
|
||||
// SetAnimating sets the animation flag. When the window is animating,
|
||||
// FrameEvents are delivered as fast as the display can handle them.
|
||||
SetAnimating(anim bool)
|
||||
|
||||
// ShowTextInput updates the virtual keyboard state.
|
||||
ShowTextInput(show bool)
|
||||
|
||||
SetInputHint(mode key.InputHint)
|
||||
|
||||
NewContext() (Context, error)
|
||||
|
||||
// ReadClipboard requests the clipboard content.
|
||||
|
||||
Reference in New Issue
Block a user