We still need full keyboard protocol for @ send-text

This commit is contained in:
Kovid Goyal 2023-01-23 16:33:08 +05:30
parent 97467acb1f
commit 11f98592f7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 12 additions and 0 deletions

View File

@ -27,6 +27,9 @@ func is_stream_response(serialized_response []byte) bool {
func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) { func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) {
serialized_response = make([]byte, 0) serialized_response = make([]byte, 0)
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.OnlyDisambiguateKeys) lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.OnlyDisambiguateKeys)
if io_data.on_key_event != nil {
lp.FullKeyboardProtocol()
}
if err != nil { if err != nil {
return return
} }

View File

@ -133,6 +133,15 @@ func OnlyDisambiguateKeys(self *Loop) {
self.terminal_options.kitty_keyboard_mode = 0b1 self.terminal_options.kitty_keyboard_mode = 0b1
} }
func (self *Loop) FullKeyboardProtocol() *Loop {
self.terminal_options.kitty_keyboard_mode = 0b11111
return self
}
func FullKeyboardProtocol(self *Loop) {
self.terminal_options.kitty_keyboard_mode = 0b11111
}
func (self *Loop) MouseTrackingMode(mt MouseTracking) *Loop { func (self *Loop) MouseTrackingMode(mt MouseTracking) *Loop {
self.terminal_options.mouse_tracking = mt self.terminal_options.mouse_tracking = mt
return self return self