Repository: charmbracelet/bubbletea
File: kitty.go (Go)

Code before:
//	1:  Disambiguate escape codes
//	2:  Report event types
//	4:  Report alternate keys
//	8:  Report all keys as escape codes
//	16: Report associated text
//
// See https://sw.kovidgoyal.net/kitty/keyboard-protocol/ for more information.
func EnableKittyKeyboard(flags int) Cmd {
	return func() Msg {
		return setKittyKeyboardFlagsMsg(flags)
	}
}

// DisableKittyKeyboard is a command to disable Kitty keyboard progressive
// enhancement protocol.
func DisableKittyKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(0)
}

// requestKittyKeyboardFlagsMsg is a message to request the current Kitty keyboard
// progressive enhancement protocol flags.
type requestKittyKeyboardFlagsMsg struct{}

// RequestKittyKeyboardFlags is a command to request the current Kitty keyboard
// progressive enhancement protocol flags from the terminal.
func RequestKittyKeyboardFlags() Msg {
	return requestKittyKeyboardFlagsMsg{}
}

// EnableEnhancedKeyboard is a command to enable enhanced keyboard features.
// This unambiguously reports more key combinations than traditional terminal
// keyboard sequences. This will also enable reporting of release key events.
func EnableEnhancedKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(3)
}

// DisableEnhancedKeyboard is a command to disable enhanced keyboard features.
func DisableEnhancedKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(0)
}

// KittyKeyboardMsg represents Kitty keyboard progressive enhancement flags message.
type KittyKeyboardMsg int

// HasDisambiguateEscapeCodes returns true if the DisambiguateEscapeCodes flag is set.
func (e KittyKeyboardMsg) HasDisambiguateEscapeCodes() bool {
	return e&ansi.KittyDisambiguateEscapeCodes != 0
}

// HasReportEventTypes returns true if the ReportEventTypes flag is set.
func (e KittyKeyboardMsg) HasReportEventTypes() bool {

Review comment (suggestion):
Should this be to make it align more with current bubbletea commands?

```suggestion
func KittyKeyboardFlags() Msg {
```

CC/ @caarlos0 @meowgorithm @bashbunni 

Code after:
//	2:  Report event types
//	4:  Report alternate keys
//	8:  Report all keys as escape codes
//	16: Report associated text
//
// See https://sw.kovidgoyal.net/kitty/keyboard-protocol/ for more information.
func EnableKittyKeyboard(flags int) Cmd {
	return func() Msg {
		return setKittyKeyboardFlagsMsg(flags)
	}
}

// DisableKittyKeyboard is a command to disable Kitty keyboard progressive
// enhancements.
func DisableKittyKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(0)
}

// kittyKeyboardMsg is a message that queries the current Kitty keyboard
// progressive enhancement flags.
type kittyKeyboardMsg struct{}

// KittyKeyboard is a command that queries the current Kitty keyboard
// progressive enhancement flags from the terminal.
func KittyKeyboard() Msg {
	return kittyKeyboardMsg{}
}

// EnableEnhancedKeyboard is a command to enable enhanced keyboard features.
// This unambiguously reports more key combinations than traditional terminal
// keyboard sequences. This will also enable reporting of release key events.
func EnableEnhancedKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(3)
}

// DisableEnhancedKeyboard is a command to disable enhanced keyboard features.
func DisableEnhancedKeyboard() Msg {
	return setKittyKeyboardFlagsMsg(0)
}

// KittyKeyboardMsg represents Kitty keyboard progressive enhancement flags message.
type KittyKeyboardMsg int

// Kitty Keyboard Protocol flags.
const (
	KittyDisambiguateEscapeCodes KittyKeyboardMsg = 1 << iota
	KittyReportEventTypes
	KittyReportAlternateKeys
	KittyReportAllKeys
	KittyReportAssociatedKeys
)