How to type non-printable ASCII characters in Mac OS X Terminal?

CtrlSpace sends ASCII NUL.

For the general case, System Preferences > Keyboard > Input Sources, scroll down the list and select Unicode Hex Input.

You can then use CmdShiftSpace (and, if you disable Spotlight's use of it, CmdSpace) to switch between input modes or assign it a keyboard shortcut of its own (and presumably another to switch back) in System Preferences > Keyboard > Keyboard Shortcuts.

Once Unicode Hex Input is enabled, you hold down Option and type the 4 digit hex code; on releasing Option it should be typed. You could stay in that mode as long as you don't need any characters beyond U+007F (or of course type them all with hex input instead of, say, Optione e to type é).


In many CLI/TUI applications you can press CtrlV in order to tell the application to accept the next keypress as raw character codes instead of invoking its normal function.