Skip to content

Commit 94247ed

Browse files
committed
feat: add SupportsKeyDisambiguation to KeyboardEnhancementsMsg
1 parent 3780c0e commit 94247ed

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

keyboard.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ type KeyboardEnhancementsMsg struct {
2828
Flags int
2929
}
3030

31+
// SupportsKeyDisambiguation returns whether the terminal supports key
32+
// disambiguation (e.g., distinguishing between different modifier keys).
33+
func (k KeyboardEnhancementsMsg) SupportsKeyDisambiguation() bool {
34+
return k.Flags > 0
35+
}
36+
3137
// SupportsEventTypes returns whether the terminal supports reporting
3238
// different types of key events (press, release, and repeat).
3339
func (k KeyboardEnhancementsMsg) SupportsEventTypes() bool {

0 commit comments

Comments
 (0)