Control, escape, and meta tricks
Some of this is not quite right, or right by accident of a particular virtual terminal&#x27;s features and configuration.<p>Having the Alt&#x2F;Option modifier send a prefix ESC is usually a terminal configuration option, though often the default. The most common alternative (other than doing nothing) is to set the 8th bit, which was useful in the ISO8859 days but not so much with UTF-8.<p>The vim section of this article depends on the prefix-ESC behaviour, but vim and neovim (and probably other non-ancient editors) will put a capable terminal into modifyOtherKeys mode. In this state the terminal sends a more detailed escape sequence for modifier key combinations, which permits binding combinations that are not distinguishable in the default ‘plain ASCII’ mode. For example, Control-D will send ESC [ 27 ; 5 ; 100 ~ while Control-Shift-D will send ESC [ 27 ; 6 ; 68 ~ (rather than EOT for both) and Alt-D will send ESC [ 27 ; 6 ; 68 ~ rather than ESC D.<p>(Oddly, the author seems to use vim as an editor but emacs editing mode rather than vi editing mode in the shell.)<p>The ‘special case’ control combinations are explained by the <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bit-paired_keyboard" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bit-paired_keyboard</a> where Control does merely flip a bit, originally electromechanically.