[Previous] [Contents] [Next]


QNX Console driver (QNX)


Dev.con [options...] &


Start in ANSI terminal mode. (See Dev.ansi.)
-C number
The size of the canonical input buffer (default is 256 bytes).
Enable hardware scrolling.
Disable hardware scrolling. (Default)
-I number
The size of the raw input buffer (default is 256 bytes).
Disable Japanese keyboard mapping.
-k rate[,delay]
Specify keyboard autorepeat rate (in Hz) and, optionally, delay (in milliseconds). (default: 30Hz, 500ms)
-n number
The maximum number of virtual consoles (default is 1).
-N name
Use this prefix for the device name. If a full path (i.e. one which includes the directory under which the device should be registered) is not specified, the name will implicitly be registered under /dev. (default is /dev/con)
-O number
The size of the output buffer (default is 2048 bytes).
Start in QNX terminal emulation mode. (default)


The Dev.con driver manages console devices in a QNX system.

Remember that Dev.con can be started only after the Device Manager (Dev) has been started.


Dev.con is a link to Dev.ansi. The two drivers have identical capabilities, but differ in their default terminal emulation modes. (Dev.con = Dev.ansi -Q and Dev.ansi = Dev.con -A). See Dev.ansi for information about changing terminal emulation modes on-the-fly on a particular console device.

Control codes

ASCII Hex Description
LF 0A move the cursor down one line (if the cursor is positioned on the last line of the screen, the screen scrolls up one line)
CR 0D move the cursor to the first column of the current row
BS 08 enter a nondestructive backspace (wraps to the end of the previous line when at the beginning of the line; wraps to the bottom right corner of the screen when at the top left corner of screen)
FF 0C clear the entire screen to spaces (uses the fill color specified with ESC ! and moves the cursor to the top left corner)
BEL 07 generate a short tone on the system console or ring the bell on a terminal

Escape sequences

ASCII Hex Description
ESC ( 1B 28 turn on inverse video mode (if a terminal supports color, this also swaps the foreground and background colors set by the ESC @ sequence)
ESC ) 1B 29 turn off inverse video
ESC [ 1B 5B turn on underline mode (PC monochrome text adapters only)
ESC ] 1B 5D turn off underline mode
ESC { 1B 7B turn on blinking mode
ESC } 1B 7D turn off blinking mode
ESC < 1B 3C turn on high-intensity mode
ESC > 1B 3E turn off high-intensity mode
ESC y c 1B 79 (30-32) define cursor type to be c, where ASCII 0 (Hex 30) is no cursor, 1 (Hex 31) is a normal cursor, and 2 (Hex 32) is a block cursor.
ESC = r c 1B 3D (20-39) (20-70) position the cursor at the screen coordinates r and c, where r is the row and c is the column; both r and c are offset by 20 hex (a space).
ESC Yr c 1B 59 (20-39) (20-70) synonymous to ESC =
ESC A 1B 41 move cursor up one line without wrap or scrolling
ESC B 1B 42 move cursor down one line without wrap or scrolling
ESC C 1B 43 move cursor right one column without wrap
ESC D 1B 44 move cursor left one column without wrap
ESC H 1B 48 move cursor to the top left corner of the screen
ESC h 1B 68 turn auto line wrapping on
ESC i 1B 69 turn auto line wrapping off
ESC a 1B 61 move cursor up with wrap
ESC b 1B 62 move cursor down with wrap
ESC c 1B 63 move cursor right with wrap
ESC d 1B 64 move cursor left with wrap
ESC I 1B 49 reverse linefeed (the screen scolls down when the cursor is positioned on the top line of the screen)
ESC E 1B 45 insert line at cursor location
ESC F 1B 46 delete line at cursor location
ESC J 1B 4A clear to end of screen with spaces (uses the fill color specified with the ESC ! sequence on color terminals)
ESC K 1B 4B clear to end of line with spaces (uses the fill color specified with ESC ! on color terminals)
ESC e 1B 65 insert space at cursor position
ESC f 1B 66 delete character at cursor position
ESC g n c 1B 67 (20-ff) (0-ff) repeat the character c the number of times specified by n, where n is offset by 20 hex
ESC S 1B 53 save color and attribute information (This overrides any previously saved information. The cursor position isn't saved. QNX programs, such as editors that change the colors, assume that a default has been set on entry and use ESC R to restore the default on exit.)
ESC R 1B 52 restore the color and attribute information saved with ESC S (the cursor position isn't affected)
ESC @ fc bc 1B 40 (30-37) (30-37) define the foreground and background color of displayed characters, where fc is the color of the cursor, and bc is the fill color. Both fc and bc represent a single character ASCII digit (0 thru 7) taken from the color table, below.
ESC ! fc bc 1B 21 (30-37) (30-37) set the fill color that is used both for blank lines created by scrolling and for the entire screen when clearing with a form feed.

Color codes

ASCII Character Color
0 Black
1 Blue
2 Green
3 Cyan
4 Red
5 Magenta
6 Brown
7 White


Start Dev.con; use defaults:

    Dev.con &

Allow 4 virtual consoles:

    Dev.con -n 4 &


Dev.con closes its standard input, standard output and standard error immediately upon startup.

Dev.con will cause Dev to adopt a number of character special files under its directory (/dev). Usually these will be named conn, where n will range from 1 to the number of console devices specified by the Dev.con -n option. The base filename (con) will be different if the -N is specified with an alternate name.

Exit status:

Dev.con will terminate only upon receipt of a signal or upon encountering a problem during startup.

received a SIGTERM signal and performed a clean shutdown
Failed to initialize display
Failed to mount driver with Dev
Failed to arm driver with Dev
Failed to register driver with Dev


A common cause of failure on startup is that Dev has hit its maximum number of devices and rejects the driver's attempt to register. If this happens, increase the value of Dev's -n option.

See also:

Dev, Dev.ansi, Dev.*, cfont, kbd, stty, tinit

QNX Installation & Configuration

[Previous] [Contents] [Next]