misc-protocol.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Miscellaneous protocol extensions
  2. ==============================================
  3. These are a few small protocol extensions kitty implements, primarily for use
  4. by its own kitten, they are documented here for completeness.
  5. Simple save/restore of all terminal modes
  6. --------------------------------------------
  7. XTerm has the XTSAVE/XTRESTORE escape codes to save and restore terminal
  8. private modes. However, they require specifying an explicit list of modes to
  9. save/restore. kitty extends this protocol to specify that when no modes are
  10. specified, all side-effect free modes should be saved/restored. By side-effects
  11. we mean things that can affect other terminal state such as cursor position or
  12. screen contents. Examples of modes that have side effects are: `DECOM
  13. <https://vt100.net/docs/vt510-rm/DECOM.html>`__ and `DECCOLM
  14. <https://vt100.net/docs/vt510-rm/DECCOLM.html>`__.
  15. This allows TUI applications to easily save and restore emulator state without
  16. needing to maintain lists of modes.
  17. Independent control of bold and faint SGR properties
  18. -------------------------------------------------------
  19. In common terminal usage, bold is set via SGR 1 and faint by SGR 2. However,
  20. there is only one number to reset these attributes, SGR 22, which resets both.
  21. There is no way to reset one and not the other. kitty uses 221 and 222 to reset
  22. bold and faint independently.
  23. kitty specific private escape codes
  24. ---------------------------------------
  25. These are a family of escape codes used by kitty for various things including
  26. remote control. They are all DCS (Device Control String) escape codes starting
  27. with ``\x1b P @ kitty-`` (ignoring spaces present for clarity).