mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
...
This commit is contained in:
parent
0e41c937ac
commit
b16d199c54
2 changed files with 6 additions and 6 deletions
|
|
@ -384,15 +384,15 @@ func (self *KeyEvent) AsCSI() string {
|
|||
ans.Grow(32)
|
||||
ans.WriteString("\033[")
|
||||
if key != 1 || self.Mods != 0 || shifted_key != 0 || alternate_key != 0 || self.Text != "" {
|
||||
ans.WriteString(fmt.Sprint(key))
|
||||
fmt.Fprint(&ans, key)
|
||||
}
|
||||
if shifted_key != 0 || alternate_key != 0 {
|
||||
ans.WriteString(":")
|
||||
if shifted_key != 0 {
|
||||
ans.WriteString(fmt.Sprint(shifted_key))
|
||||
fmt.Fprint(&ans, shifted_key)
|
||||
}
|
||||
if alternate_key != 0 {
|
||||
ans.WriteString(fmt.Sprint(":", alternate_key))
|
||||
fmt.Fprint(&ans, ":", alternate_key)
|
||||
}
|
||||
}
|
||||
action := 1
|
||||
|
|
@ -405,9 +405,9 @@ func (self *KeyEvent) AsCSI() string {
|
|||
if self.Mods != 0 || action > 1 || self.Text != "" {
|
||||
m := uint(self.Mods)
|
||||
if action > 1 || m != 0 {
|
||||
fmt.Fprintf(ans, ";%d", m+1)
|
||||
fmt.Fprintf(&ans, ";%d", m+1)
|
||||
if action > 1 {
|
||||
fmt.Fprintf(ans, ":%d", action)
|
||||
fmt.Fprintf(&ans, ":%d", action)
|
||||
}
|
||||
} else if self.Text != "" {
|
||||
ans.WriteString(";")
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ func (self *TerminalStateOptions) SetStateEscapeCodes() string {
|
|||
sb.WriteString("\033[>u")
|
||||
case NO_KEYBOARD_STATE_CHANGE:
|
||||
default:
|
||||
fmt.Fprintf(sb, "\033[>%du", self.kitty_keyboard_mode)
|
||||
fmt.Fprintf(&sb, "\033[>%du", self.kitty_keyboard_mode)
|
||||
}
|
||||
if self.mouse_tracking != NO_MOUSE_TRACKING {
|
||||
sb.WriteString(MOUSE_SGR_PIXEL_MODE.EscapeCodeToSet())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue