类型 CalendarCommand

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

type CalendarCommand struct {
	Kind   CalendarCommandKind
	Amount int
}

CalendarCommand is a request for the date the caller owns. The component has no date model, so it never applies one: the caller moves its focused date, changes the visible month if that leaves it, and replaces CalendarOptions.

构造函数

CalendarCommandForKey#

func CalendarCommandForKey(key ui.Key, modifiers ui.Modifiers) (CalendarCommand, bool)

CalendarCommandForKey maps the keys of a focused day to the move they ask for: the arrows move by day and week, PageUp and PageDown by month (by year with Shift), Home and End to the edges of the week. Left and Right follow the reading direction only if the caller flips them for right-to-left text.