mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00: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:
parent
a81fd3b1c2
commit
62d5e13cbd
2 changed files with 24 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue