// KeyEvent is a key action that synthesizes a keyDown, char, and keyUp event
// for each rune contained in keys along with any supplied key options.
//
// Only well-known, "printable" characters will have char events synthesized.
//
// See the SendKeys action to synthesize key events for a specific element
// node.
//
// See the chromedp/kb package for implementation details and list of
// well-known keys.
KeyEvent is a key action that synthesizes a keyDown, char, and keyUp event
for each rune contained in keys along with any supplied key options.

Only well-known, "printable" characters will have char events synthesized.

See the SendKeys action to synthesize key events for a specific element
node.

See the chromedp/kb package for implementation details and list of
well-known keys.
// KeyEvent is a key action that synthesizes a keyDown char and keyUp event // for each rune contained in keys along with any supplied key options . // // Only well - known " printable " characters will have char events synthesized . // // See the SendKeys action to synthesize key events for a specific element // node . // // See the chromedp / kb package for implementation details and list of // well - known keys .
func KeyEvent(keys string, opts ...KeyOption) KeyAction {
	return ActionFunc(func(ctx context.Context) error {
		for _, r := range keys {
			for _, k := range kb.Encode(r) {
				for _, o := range opts {
					o(k)
				}
				if err := k.Do(ctx); err != nil {
					return err
				}
			}
		}
		return nil
	})
}
func KeyEvent ( keys string , opts ... KeyOption ) KeyAction { return ActionFunc ( func ( ctx context . Context ) error { for _ , r := range keys { for _ , k := range kb . Encode ( r ) { for _ , o := range opts { o ( k ) } if err := k . Do ( ctx ) ; err != nil { return err } } } return nil } ) }
KeyEvent is a key action that synthesizes a keyDown, char, and keyUp event
for each rune contained in keys along with any supplied key options.
KeyEvent is a key action that synthesizes a keyDown char and keyUp event for each rune contained in keys along with any supplied key options .