Terminal Guide

Restore Mode

ESC1B[5B ?3f [ mode ]1+ r72
repeated (one or more times):
mode = none

Restore mode mode to the last state saved with save mode.

This sequence only applies to modes prefixed with ?3f .

The effect is generally the same as setting or resetting the mode depending of the state when the save sequence was used (i.e. restoring cursor origin will move the cursor on each restore even if the restore does not change the current state of the mode)

alt buf: p47, p1047, p1049 all restore the alt buf active state but don't have the other side effects of the modes. They share storage.

Modes p9, p1000, p1001, p1002, p1003 and are grouped together and only one of them can be active at a time. Saving and restoring with any of these modes will restore the actually active mouse mode. All of those except p9 share storage.

Similarly the modes for extended mouse coordinates (e.g. p1005, p1006, p1015) also form a similar group. They all share storage.

The modes for the keyboard type (e.g. p1050, p1051, p1052, p1053, p1060, p1061) also form a group and share storage.

p1048 always restores the cursor on mode restore. it always saves the cursor on mode save.

urxvt ( ✓ )

🛆 The grouping behavior is not supported.

vte ( ✓ )

🛆 The grouping behavior is not supported. 🛈 restore can only be used once after save was used. A further restore will always restore to "reset" state.

konsole ( ✓ )

🛆 Only modes p1, p6, p7, p25, p47, p1000, p1002, p1003, p1006, p1007, p1015, p1047, p2004 support restore/save. 🛆 The grouping behavior is not supported.