mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
themes kitten: fix some keybaord shortcuts not working with weird IME systems on Linux that convert key events into text events
This commit is contained in:
@@ -306,6 +306,20 @@ func (self *KeyEvent) MatchesPressOrRepeat(spec string) bool {
|
||||
return self.MatchesParsedShortcut(ParseShortcut(spec), PRESS|REPEAT)
|
||||
}
|
||||
|
||||
func (self *KeyEvent) MatchesCaseSensitiveTextOrKey(spec string) bool {
|
||||
if self.MatchesParsedShortcut(ParseShortcut(spec), PRESS|REPEAT) {
|
||||
return true
|
||||
}
|
||||
return self.Text == spec
|
||||
}
|
||||
|
||||
func (self *KeyEvent) MatchesCaseInsensitiveTextOrKey(spec string) bool {
|
||||
if self.MatchesParsedShortcut(ParseShortcut(spec), PRESS|REPEAT) {
|
||||
return true
|
||||
}
|
||||
return strings.ToLower(self.Text) == strings.ToLower(spec)
|
||||
}
|
||||
|
||||
func (self *KeyEvent) MatchesRelease(spec string) bool {
|
||||
return self.MatchesParsedShortcut(ParseShortcut(spec), RELEASE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user