diff --git a/ell/term.h b/ell/term.h
index 66059212b436..caf84e2b71dc 100644
--- a/ell/term.h
+++ b/ell/term.h
@@ -18,6 +18,150 @@
 extern "C" {
 #endif
 
+enum {
+	L_TERM_CONTROL_CODE_ASCII_C0_NUL	= 0x00,
+	L_TERM_CONTROL_CODE_ASCII_C0_SOH	= 0x01,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC1	= L_TERM_CONTROL_CODE_ASCII_C0_SOH,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_A = L_TERM_CONTROL_CODE_ASCII_C0_SOH,
+	L_TERM_CONTROL_CODE_ASCII_C0_STX	= 0x02,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC2	= L_TERM_CONTROL_CODE_ASCII_C0_STX,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_B = L_TERM_CONTROL_CODE_ASCII_C0_STX,
+	L_TERM_CONTROL_CODE_ASCII_C0_ETX	= 0x03,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC3	= L_TERM_CONTROL_CODE_ASCII_C0_ETX,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_C = L_TERM_CONTROL_CODE_ASCII_C0_ETX,
+	L_TERM_CONTROL_CODE_ASCII_C0_EOT	= 0x04,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC4	= L_TERM_CONTROL_CODE_ASCII_C0_EOT,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_D = L_TERM_CONTROL_CODE_ASCII_C0_EOT,
+	L_TERM_CONTROL_CODE_ASCII_C0_ENQ	= 0x05,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC5	= L_TERM_CONTROL_CODE_ASCII_C0_ENQ,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_E = L_TERM_CONTROL_CODE_ASCII_C0_ENQ,
+	L_TERM_CONTROL_CODE_ASCII_C0_ACK	= 0x06,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC6	= L_TERM_CONTROL_CODE_ASCII_C0_ACK,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_F = L_TERM_CONTROL_CODE_ASCII_C0_ACK,
+	L_TERM_CONTROL_CODE_ASCII_C0_BEL	= 0x07,
+	L_TERM_CONTROL_CODE_ASCII_C0_BS		= 0x08,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE0	= L_TERM_CONTROL_CODE_ASCII_C0_BS,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_H = L_TERM_CONTROL_CODE_ASCII_C0_BS,
+	L_TERM_CONTROL_CODE_ASCII_C0_HT		= 0x09,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE1	= L_TERM_CONTROL_CODE_ASCII_C0_HT,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_I = L_TERM_CONTROL_CODE_ASCII_C0_HT,
+	L_TERM_CONTROL_CODE_ASCII_C0_LF		= 0x0A,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE2	= L_TERM_CONTROL_CODE_ASCII_C0_LF,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_J = L_TERM_CONTROL_CODE_ASCII_C0_LF,
+	L_TERM_CONTROL_CODE_ASCII_C0_VT		= 0x0B,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE3	= L_TERM_CONTROL_CODE_ASCII_C0_VT,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_K = L_TERM_CONTROL_CODE_ASCII_C0_VT,
+	L_TERM_CONTROL_CODE_ASCII_C0_FF		= 0x0C,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE4	= L_TERM_CONTROL_CODE_ASCII_C0_FF,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_L = L_TERM_CONTROL_CODE_ASCII_C0_FF,
+	L_TERM_CONTROL_CODE_ASCII_C0_CR		= 0x0D,
+	L_TERM_CONTROL_CODE_ASCII_C0_FE5	= L_TERM_CONTROL_CODE_ASCII_C0_CR,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_M = L_TERM_CONTROL_CODE_ASCII_C0_CR,
+	L_TERM_CONTROL_CODE_ASCII_C0_SO		= 0x0E,
+	L_TERM_CONTROL_CODE_ASCII_C0_LS0	= L_TERM_CONTROL_CODE_ASCII_C0_SO,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_N = L_TERM_CONTROL_CODE_ASCII_C0_SO,
+	L_TERM_CONTROL_CODE_ASCII_C0_SI		= 0x0F,
+	L_TERM_CONTROL_CODE_ASCII_C0_LS1	= L_TERM_CONTROL_CODE_ASCII_C0_SI,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_O = L_TERM_CONTROL_CODE_ASCII_C0_SI,
+	L_TERM_CONTROL_CODE_ASCII_C0_DLE	= 0x10,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC7	= L_TERM_CONTROL_CODE_ASCII_C0_DLE,
+	L_TERM_CONTROL_CODE_ASCII_C0_DC0	= L_TERM_CONTROL_CODE_ASCII_C0_DLE,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_P = L_TERM_CONTROL_CODE_ASCII_C0_DLE,
+	L_TERM_CONTROL_CODE_ASCII_C0_XON	= 0x11,
+	L_TERM_CONTROL_CODE_ASCII_C0_DC1	= L_TERM_CONTROL_CODE_ASCII_C0_XON,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_Q = L_TERM_CONTROL_CODE_ASCII_C0_XON,
+	L_TERM_CONTROL_CODE_ASCII_C0_TAPE	= 0x12,
+	L_TERM_CONTROL_CODE_ASCII_C0_DC2	= L_TERM_CONTROL_CODE_ASCII_C0_TAPE,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_R = L_TERM_CONTROL_CODE_ASCII_C0_TAPE,
+	L_TERM_CONTROL_CODE_ASCII_C0_XOFF	= 0x13,
+	L_TERM_CONTROL_CODE_ASCII_C0_DC3	= L_TERM_CONTROL_CODE_ASCII_C0_XOFF,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_S = L_TERM_CONTROL_CODE_ASCII_C0_XOFF,
+	L_TERM_CONTROL_CODE_ASCII_C0_DC4	= 0x14,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_T = L_TERM_CONTROL_CODE_ASCII_C0_DC4,
+	L_TERM_CONTROL_CODE_ASCII_C0_NAK	= 0x15,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC8	= L_TERM_CONTROL_CODE_ASCII_C0_NAK,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_U = 0x15,
+	L_TERM_CONTROL_CODE_ASCII_C0_SYN	= 0x16,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC9	= L_TERM_CONTROL_CODE_ASCII_C0_SYN,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_V = 0x16,
+	L_TERM_CONTROL_CODE_ASCII_C0_ETB	= 0x17,
+	L_TERM_CONTROL_CODE_ASCII_C0_TC10	= L_TERM_CONTROL_CODE_ASCII_C0_ETB,
+	L_TERM_CONTROL_CODE_ASCII_C0_CTRL_W = L_TERM_CONTROL_CODE_ASCII_C0_ETB,
+	L_TERM_CONTROL_CODE_ASCII_C0_CAN	= 0x18,
+	L_TERM_CONTROL_CODE_ASCII_C0_EM		= 0x19,
+	L_TERM_CONTROL_CODE_ASCII_C0_SUB	= 0x1A,
+	L_TERM_CONTROL_CODE_ASCII_C0_ESC	= 0x1B,
+	L_TERM_CONTROL_CODE_ASCII_C0_FS		= 0x1C,
+	L_TERM_CONTROL_CODE_ASCII_C0_IS4	= L_TERM_CONTROL_CODE_ASCII_C0_FS,
+	L_TERM_CONTROL_CODE_ASCII_C0_GS		= 0x1D,
+	L_TERM_CONTROL_CODE_ASCII_C0_IS3	= L_TERM_CONTROL_CODE_ASCII_C0_GS,
+	L_TERM_CONTROL_CODE_ASCII_C0_RS		= 0x1E,
+	L_TERM_CONTROL_CODE_ASCII_C0_IS2	= L_TERM_CONTROL_CODE_ASCII_C0_RS,
+	L_TERM_CONTROL_CODE_ASCII_C0_US		= 0x1F,
+	L_TERM_CONTROL_CODE_ASCII_C0_IS1	= L_TERM_CONTROL_CODE_ASCII_C0_US,
+	L_TERM_CONTROL_CODE_ASCII_C0_DEL	= 0x7F,
+
+	L_TERM_CONTROL_CODE_ASCII_C1_PAD	= 0x80,
+	L_TERM_CONTROL_CODE_ASCII_C1_HOP	= 0x81,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_A	= L_TERM_CONTROL_CODE_ASCII_C1_HOP,
+	L_TERM_CONTROL_CODE_ASCII_C1_BPH	= 0x82,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_B	= L_TERM_CONTROL_CODE_ASCII_C1_BPH,
+	L_TERM_CONTROL_CODE_ASCII_C1_NBH	= 0x83,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_C	= L_TERM_CONTROL_CODE_ASCII_C1_NBH,
+	L_TERM_CONTROL_CODE_ASCII_C1_IND	= 0x84,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_D	= L_TERM_CONTROL_CODE_ASCII_C1_IND,
+	L_TERM_CONTROL_CODE_ASCII_C1_NEL	= 0x85,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_E	= L_TERM_CONTROL_CODE_ASCII_C1_NEL,
+	L_TERM_CONTROL_CODE_ASCII_C1_SSA	= 0x86,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_F	= L_TERM_CONTROL_CODE_ASCII_C1_SSA,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESA	= 0x87,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_G	= L_TERM_CONTROL_CODE_ASCII_C1_ESA,
+	L_TERM_CONTROL_CODE_ASCII_C1_HTS	= 0x88,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_H	= L_TERM_CONTROL_CODE_ASCII_C1_HTS,
+	L_TERM_CONTROL_CODE_ASCII_C1_HTJ	= 0x89,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_I	= L_TERM_CONTROL_CODE_ASCII_C1_HTJ,
+	L_TERM_CONTROL_CODE_ASCII_C1_VTS	= 0x8A,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_J	= L_TERM_CONTROL_CODE_ASCII_C1_VTS,
+	L_TERM_CONTROL_CODE_ASCII_C1_PLD	= 0x8B,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_K	= L_TERM_CONTROL_CODE_ASCII_C1_PLD,
+	L_TERM_CONTROL_CODE_ASCII_C1_PLU	= 0x8C,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_L	= L_TERM_CONTROL_CODE_ASCII_C1_PLU,
+	L_TERM_CONTROL_CODE_ASCII_C1_RI		= 0x8D,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_M	= L_TERM_CONTROL_CODE_ASCII_C1_RI,
+	L_TERM_CONTROL_CODE_ASCII_C1_SS2	= 0x8E,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_N	= L_TERM_CONTROL_CODE_ASCII_C1_SS2,
+	L_TERM_CONTROL_CODE_ASCII_C1_SS3	= 0x8F,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_O	= L_TERM_CONTROL_CODE_ASCII_C1_SS3,
+	L_TERM_CONTROL_CODE_ASCII_C1_DCS	= 0x90,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_P	= L_TERM_CONTROL_CODE_ASCII_C1_DCS,
+	L_TERM_CONTROL_CODE_ASCII_C1_PU1	= 0x91,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_Q	= L_TERM_CONTROL_CODE_ASCII_C1_PU1,
+	L_TERM_CONTROL_CODE_ASCII_C1_PU2	= 0x92,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_R	= L_TERM_CONTROL_CODE_ASCII_C1_PU2,
+	L_TERM_CONTROL_CODE_ASCII_C1_STS	= 0x93,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_S	= L_TERM_CONTROL_CODE_ASCII_C1_STS,
+	L_TERM_CONTROL_CODE_ASCII_C1_CCH	= 0x94,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_T	= L_TERM_CONTROL_CODE_ASCII_C1_CCH,
+	L_TERM_CONTROL_CODE_ASCII_C1_MW		= 0x95,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_U	= L_TERM_CONTROL_CODE_ASCII_C1_MW,
+	L_TERM_CONTROL_CODE_ASCII_C1_SPA	= 0x96,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_V	= L_TERM_CONTROL_CODE_ASCII_C1_SPA,
+	L_TERM_CONTROL_CODE_ASCII_C1_EPA	= 0x97,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_W	= L_TERM_CONTROL_CODE_ASCII_C1_EPA,
+	L_TERM_CONTROL_CODE_ASCII_C1_SOS	= 0x98,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_X	= L_TERM_CONTROL_CODE_ASCII_C1_SOS,
+	L_TERM_CONTROL_CODE_ASCII_C1_SGC	= 0x99,
+	L_TERM_CONTROL_CODE_ASCII_C1_SGCI	= L_TERM_CONTROL_CODE_ASCII_C1_SGC,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_Y	= L_TERM_CONTROL_CODE_ASCII_C1_SGC,
+	L_TERM_CONTROL_CODE_ASCII_C1_SCI	= 0x9A,
+	L_TERM_CONTROL_CODE_ASCII_C1_ESC_Z	= L_TERM_CONTROL_CODE_ASCII_C1_SCI,
+	L_TERM_CONTROL_CODE_ASCII_C1_CSI	= 0x9B,
+	L_TERM_CONTROL_CODE_ASCII_C1_ST		= 0x9C,
+	L_TERM_CONTROL_CODE_ASCII_C1_OSC	= 0x9D,
+	L_TERM_CONTROL_CODE_ASCII_C1_PM		= 0x9E,
+	L_TERM_CONTROL_CODE_ASCII_C1_APC	= 0x9F;
+};
+
 struct l_term;
 
 struct l_term *l_term_new(void);
