Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

To communicate with a serial-type device over a telnet socket, I need to type the null character (ASCII 0) and all other non-printable ASCII characters.

On Windows, you hold ALT and type the ASCII code.

How do I do this on Mac OS X?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Ctrl-Space sends ASCII NUL. For the general case, System Preferences > Personal > Language and Text > Input Sources, scroll down the list and select Unicode Hex Input. You can then use Shift-Cmd-Space (and, if you disable Spotlight's use of it, Cmd-Space) to switch between input modes or assign it a keyboard shortcut of its own (and presumably another to switch back) in System Preferences > Hardware > 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, Option-e e to type é).

share|improve this answer
1  
Great, thanks! Note to others: on my system, the default shortcut key was Option Cmd Space. –  davidcann Mar 17 '11 at 18:55
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.