News for hackers. Stuff that matters.
Re:What happens when you press a key in your terminal? by aap_ on Thursday July 21, 2022 @04:23AM (#32176980)
Ctrl clears the highest two bits. E.g. @ (ascii 0x40) turns into ^@/NUL (ascii 0x00). Similarly C (0x43) -> ^C/ETX (0x03).

Older terminals (like the VT05) used bit-pairing also with shift. They just flipped some bits depending on the upper two bits. Compare column 2 with 3 in the linked graphic, and 4,5 with 6,7.

Re:What happens when you press a key in your terminal? by gnubison on Thursday July 21, 2022 @01:09PM (#32181924)
Closer to toggling in the case of ^?.
Re:What happens when you press a key in your terminal? by aap_ on Thursday July 21, 2022 @04:31PM (#32184608)
good point!