The K Desktop Environment

Next Previous Table of Contents

3. Onscreen Fundamentals

The figure below shows khexedit in a fairly default setup. As can be seen the editor area is divided into three components. The name of the area below the editor area and above the status bar is called the Conversion Field. This area displays, using various representation, the data value at the cursor position.

  1. The offset area is placed in leftmost area of the editor. The offset values can be displayed as hexadecimal or decimal numbers. This area can be hidden if required.

  2. The primary view is placed a the center of the editor. It can display data using hexadecimal, octal, binary or text representations. This area can never be hidden.

  3. The secondary view or Text field is placed in the rightmost area of the editor. It can only display a text representation of the data.This area can be hidden if required.

  4. The Conversion area shows the data value at the cursor position using a number of representations. The Show little endian decoding toggles the displayed data between big and little endian format. Little endian format is used on Intel CPU based computers.

3.1 Data representation and screen layout

The primary view can display data using one out of four available mode: Hexadecimal, Octal, Binary and Text Only. If the latter is selected the secondary view is automatically hidden.

The secondary view will always display a "Text only" replica of what is displayed in the primary view. This field can be hidden if selected from the View menu ("Show text field"). Since not every character code can be displayed as a printable character, the text view takes care of transforming the code into a symbol that can be displayed. The non-printable character codes are shown as a red dot in the editor image). The character code can its color can be selected in the Customize dialog box.

3.2 Progress indicator and management

The left section of the status bar contains a progress indicator. This indicator is used to inform the user what is taking place for certain operations. It displays the kind of operation by printing a text string in the bar (eg, reading...) and a progress value.

Any operation that uses the indicator can be interrupted by the user. This is done by one of the following operations:

The user will then be prompted to confirm the cancellation.

3.3 Drag and Drop

KHexEdit supports Drag and Drop. This means that you can drag and drop files from the Desktop or kfm or some remote site that you have open in one of kfm's windows on to KHexEdit.

If you have multiple KHexEdit windows open you can drag the active document from one window to the other. Start the drag by clicking on the leftmost icon in the toolbar with the left mouse button.

3.4 Command line arguments

KHexEdit recognizes a few command line arguments. The arguments must be arranged as described below: as follows:

khexedit <options> <files>

-offset <value>

Moves the cursor in the active document to offset. The offset value can be decimal or hexadecimal. A hexadecimal value is recognized by the 0x sign in front (eg, 0x100). The 0x sign is not required if the string contains the hexadecimal characters a..f,A..F.

<files>

This can be one or more files. You can use wildcards if that is supported the the shell interpreter you use. A file can be specified with the "http://FQDN/path", "ftp://FQDN/path" or "file:/path". The latter refers to a local file and one can simply use "path" instead. FQDN is shorthand for "Fully Qualified Domain Name".

3.5 Editing files on the Internet

You can open and save files on the Internet. Try the the following at the command line prompt to see an example of this.

% khexedit http://www.kde.org/logotp3.gif

(note: this web page contents might change so the specification can be outdated)

3.6 Document list

The Documents entry in the menubar stores a list of open documents. The displayed document is defined as the active document. A document becomes active when it has been picked from the document list. There is no limit on how many documents there can be in the list. The first 9 documents can be accessed with the keyboard shortcut <Ctrl>+<Number> making it easy to switch between active documents.

3.7 Copy and paste

KHexEdit can copy data as pure binary data or as formatted text. The formatted text is stored as seen on screen. Binary data is sent to the clipboard as a MIME message using base64 encoding. KHexEdit can decode this kind of message making it possible to copy and paste data between KHexEdit editor windows or documents. Note that if you paste the MIME encoded clipboard data into an external editor (such as kwrite or Emacs) you will see the MIME message and not the binary data. It might be better to copy as text in this case.

A copy operation can take place either automatically each time a selection has been made or delayed until the user decides to do so (Ctrl-C from the keyboard or from the Edit pulldown menu). The latter mode has the advantage to avoid unnecessary copy operations which can take time on large selections. This behavior is an option and can be selected in the option dialog box.

3.8 Key bindings

KHexEdit honors the following key bindings.

Next Previous Table of Contents