Documentation ¶
Overview ¶
Package keyboard exposes access to displaying and hiding the keyboard.
input := textinput.New(ctx, "input") input.Text = v.text input.KeyboardType = keyboard.URLType input.KeyboardAppearance = keyboard.DarkAppearance input.KeyboardReturnType = keyboard.GoogleReturnType input.Responder = v.responder button := ... button.OnTap = func() { v.responder.Dismiss() }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appearance ¶
type Appearance int
Appearance defines the appearance of the keyboard.
const ( // Default keyboard appearnce DefaultAppearance Appearance = iota // Light keyboard appearance LightAppearance // Dark keyboard appearance DarkAppearance )
func (Appearance) MarshalProtobuf ¶
func (a Appearance) MarshalProtobuf() keyboard.Appearance
type Responder ¶
type Responder struct {
// contains filtered or unexported fields
}
Responder is a model object that represents the keyboard's state. To use Responder it must be attached to a textinput.View.
type ReturnType ¶
type ReturnType int
ReturnType defines the keyboard return key style
const ( DefaultReturnType ReturnType = iota GoReturnType GoogleReturnType JoinReturnType NextReturnType RouteReturnType SearchReturnType SendReturnType YahooReturnType DoneReturnType EmergencyCallReturnType ContinueReturnType )
func (ReturnType) MarshalProtobuf ¶
func (t ReturnType) MarshalProtobuf() keyboard.ReturnType
type Type ¶
type Type int
Type defines the kind of keyboard.
const ( // Default DefaultType Type = iota // Numbers NumberType // Numbers + Punctuation NumberPunctuationType // Numbers + '.' DecimalType // Numbers + Phone keys PhoneType // Ascii ASCIIType // Ascii + '@' + '.' EmailType // Ascii + '.' + '/' + '.com' URLType // Ascii + '.' + 'go' WebSearchType // Ascii + Phone NamePhoneType )
func (Type) MarshalProtobuf ¶
Click to show internal directories.
Click to hide internal directories.