Dont turn on disambiguate keys when receiving th XTMODKEYS escape code
See #4075
This commit is contained in:
parent
cfeeec95fa
commit
d6a43a7729
@ -69,6 +69,11 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
applying to all windows, not just the initially created ones. Note that
|
||||
``--watcher`` now also applies to all windows, not just initially created ones.
|
||||
|
||||
- **Backward incompatibility**: No longer turn on the kitty extended keyboard
|
||||
protocol's disambiguate mode when the client sends the XTMODKEYS escape code.
|
||||
Applications must use the dedicated escape code to turn on the protocol.
|
||||
(:iss:`4075`)
|
||||
|
||||
|
||||
0.23.1 [2021-08-17]
|
||||
----------------------
|
||||
|
||||
@ -277,13 +277,6 @@ oldest entry from the stack must be evicted.
|
||||
the editor would have to somehow know what the keyboard mode of the main
|
||||
screen is and restore to that mode on exit.
|
||||
|
||||
.. note:: In the interests of interoperation, the XTerm specific sequences
|
||||
``CSI > 4; x m`` and ``CSI > 4; 0 m`` are treated as ``CSI > 1 u`` and ``CSI
|
||||
< 1 u``. Here ``x`` can be either ``1`` or ``2``. These codes cause XTerm
|
||||
to use the CSI u encoding for more keys and are therefore treated as similar
|
||||
to the disambiguate progressive enhancement.
|
||||
|
||||
|
||||
.. _disambiguate:
|
||||
|
||||
Disambiguate escape codes
|
||||
|
||||
@ -998,7 +998,11 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
||||
break;
|
||||
case 'm':
|
||||
if (start_modifier == '>' && !end_modifier) {
|
||||
CALL_CSI_HANDLER2(screen_xtmodkeys, 0, 0);
|
||||
REPORT_ERROR(
|
||||
"The application is trying to use XTerm's modifyOtherKeys."
|
||||
" This is superseded by the kitty keyboard protocol: https://sw.kovidgoyal.net/kitty/keyboard-protocol/"
|
||||
" the application should be updated to use that"
|
||||
);
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
|
||||
@ -1062,16 +1062,6 @@ screen_pop_key_encoding_flags(Screen *self, uint32_t num) {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
screen_xtmodkeys(Screen *self, uint32_t p1, uint32_t p2) {
|
||||
// this is the legacy XTerm escape code for modify keys
|
||||
// https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-gt-Pp-m.1DB2
|
||||
// we handle them as being equivalent to push and pop 1 onto the keyboard stack
|
||||
if ((!p1 && !p2) || (p1 == 4 && p2 == 0)) screen_pop_key_encoding_flags(self, 1);
|
||||
else if (p1 == 4 && (p2 == 1 || p2 == 2)) screen_push_key_encoding_flags(self, 1);
|
||||
}
|
||||
|
||||
|
||||
// }}}
|
||||
|
||||
// Cursor {{{
|
||||
|
||||
@ -240,7 +240,6 @@ void screen_push_key_encoding_flags(Screen *self, uint32_t val);
|
||||
void screen_pop_key_encoding_flags(Screen *self, uint32_t num);
|
||||
uint8_t screen_current_key_encoding_flags(Screen *self);
|
||||
void screen_report_key_encoding_flags(Screen *self);
|
||||
void screen_xtmodkeys(Screen *self, uint32_t p1, uint32_t p2);
|
||||
bool screen_detect_url(Screen *screen, unsigned int x, unsigned int y);
|
||||
int screen_cursor_at_a_shell_prompt(const Screen *);
|
||||
bool screen_fake_move_cursor_to_position(Screen *, index_type x, index_type y);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user