Using the command line
Like UNIX, and DOS, the BlackBerry 10 OS is based on a command-line interface that you might want or need to use instead of the GUI.
For developing software, you don't always have to use the command line; on Linux and Windows, you can use our Integrated Development Environment (IDE) that provides a graphical way to write, build, and test code. The IDE frequently uses BlackBerry 10 OS utilities, but hides the command line from you. For more information, see Build, test, and deploy your app.
Processing a command
When you type a command, several different processes interpret it in turn.
- The driver for your character device interprets such keys as Backspace and Ctrl C .
- The command interpreter or shell breaks the command line into tokens, interprets them, and then invokes any utilities.
- The utilities parse the command line that the shell passes to them, and then they perform the appropriate actions.
When you type a command, the first process that interprets it is the character-device driver. The driver that you use depends on your hardware; for more information, see the entries for the devc-* character I/O drivers in Utilities.
Some keys may behave differently from how they're described here, depending on how you configure your system.
Character-device drivers run in either raw input mode, or canonical (or edited input) mode. In raw input mode, each character is submitted to an application process as it's received; in edited input mode, the application process receives characters only after a whole line has been entered (usually signalled by a carriage return).
Some programs, such as vi, need to know just what your terminal can do, so that they can move the cursor, clear the screen, and so on. The TERM environment variable indicates the type of terminal that you're using, and the /usr/lib/terminfo directory is the terminal database. In this directory, you can find subdirectories (a through z) that contain the information for specific terminals. Some applications use /etc/termcap, the older single-file database model, instead of /usr/lib/terminfo.
The default terminal is qansi-m, the QNX version of an ANSI terminal.
f you're using telnet to communicate between two QNX machines (QNX 4, QNX Neutrino), use the -8 option to enable an eight-bit data path. If you're connecting to a BlackBerry 10 OS box from some other operating system, and the terminal isn't behaving properly, quit from telnet and start it again with the -8 option.
To telnet from Windows to a BlackBerry 10 OS machine, use ansi or vt100 for your terminal type.
The keyboard at a glance
The table below describes how the character-device drivers interpret various keys and keychords (groups of keys that you press simultaneously). The drivers handle these keys as soon as you type them.
Your keyboard might not behave as indicated if:
- The driver is in raw input mode instead of edited input mode.
- You're working with an application that has complex requirements for
user interaction (for example, the application might take control over how the
- You're working at a terminal that has keyboard limitations.
|If you want to:||Press:|
|Move the cursor to the left||← (left arrow)|
|Move the cursor to the right||→ (right arrow)|
|Move the cursor to the start of a line||Home|
|Move the cursor to the end of a line||End|
|Delete the character left of the cursor||Backspace|
|Delete the character at the cursor||Del|
|Delete all characters on a line||Ctrl U|
|Toggle between insert and typeover modes (if an application supports them)||Ins|
|Submit a line of input or start a new line||Enter|
|Recall a command||↑ or ↓ (up or down arrow)|
|Suspend the displaying of output||Ctrl S|
|Resume the displaying of output||Ctrl Q|
|Attempt to kill a process||Ctrl C or Ctrl Break|
|Indicate end of input (EOF)||Ctrl D|
|Clear the terminal||Ctrl L|
When you use the up or down arrow, the character-device driver passes a back or forward command to the shell, which recalls the actual command.
Last modified: 2015-03-31