类型 InputOTPCommand

API 文档由 Go 源码生成,内容为英文。

type InputOTPCommand uint8

InputOTPCommand is a request for the caller-owned one-time-code editor. Printable text and IME input continue through the platform text service.

常量

const (
	InputOTPCommandNone InputOTPCommand = iota
	InputOTPCommandMovePrevious
	InputOTPCommandMoveNext
	InputOTPCommandMoveFirst
	InputOTPCommandMoveLast
	InputOTPCommandDeleteBackward
	InputOTPCommandDeleteForward
)

构造函数

InputOTPCommandForKey#

func InputOTPCommandForKey(snapshot InputOTPSnapshot, key ui.Key) (InputOTPCommand, bool)

InputOTPCommandForKey maps normalized non-text keys to editor requests. It deliberately does not synthesize digits, paste, selection extension, or IME.