Copyright © 1999-2000 Jonathan Singer
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
KHexEdit is a hexadecimal editor for the KDE environment.
Table of Contents
Type khexedit at a command prompt or select Binary Editor from the Utilities group in the KDE start menu.
The standard Qt™ and KDE command line options are available, and can be listed by entering khexedit --help.
Other command line options are:
<file> - open the specfied file
--offset <offset> jump to position <offset> in the opened file.
The main KHexEdit window has the following components: menubar, toolbar, offset column, data editor window, text field, searchbar, conversion field and status bar.
When a document is opened, the bytes are displayed in hexadecimal format in the data editor window. The data can be edited, cut, copied, pasted, dragged and dropped much as text is in an text editor or word processor. A cursor marks the current position. Pressing the Insert key toggles between overwrite and insert text entry modes. The data can also be displayed as octal, binary or decimal values, by choosing the desired format in the View menu.
The offset column on the left indicates the position of a particular byte in the file. The text field on the right displays the ASCII encoding of the file. The cursor position and edits in the data editor window are reflected in the text field. The text field can also be edited, and those changes are reflected in the data editor window.
The searchbar allows the user to search for a specific value -- hexadecimal, octal, binary, decimal or text.
The conversion field displays the value of the byte at the cursor position in a variety of bases. It also displays the value of all standard data types starting at the cursor.
Multiple documents can be open at the same time but only one can be active. Use the Documents menu to select which document will be active.
Note that most menu commands also have a keyboard shortcut.
Open a new file.
Open an existing file.
Insert an exiting file in the current document.
Choose from a list of the last opened files.
Return edited document to the last saved state.
Save document.
Save document with a new name.
Close the current document.
Print the current document.
Export the selected document or a portion of it.
Opens a dialog box with these options:
Plain text, HTML table, rich text format, C array. Use the Options tab to select details for a C array or an HTML table.
The file to which the data will be exported
Selects which data will be exported -- the entire document, the selected portion or the range between two specified offsets.
Stop the current operation
Set write privileges:
When set, changes may not be made to the displayed file.
When off, individual bytes may be edited but the total number of bytes may not be changed.
Open an additional KHexEdit window
Close the current KHexEdit window
Close all KHexEdit windows
Undo the last action.
Redo the last undone action.
Delete the selected bytes and copy them to the clipboard.
Copy the selected bytes to the clipboard.
Insert the cut or copied bytes in the clipboard.
Variations on Copy and Paste:
Copy as Text: Copies the selected bytes as ASCII characters.
Paste into New File.
Paste into new window.
Select entire document.
Unselect entire document.
Find a specified pattern in the document. Hexadecimal,decimal, octal, binary or text patterns can be searched for.
Options in the dialog box allow you to specify the starting point, direction and range of the search.
Find the next instance of the Find pattern.
Find the previous instance of the Find pattern.
Replace the find pattern with a different pattern.
Move the cursor to a specified offset.
Insert a specified string of bytes.
Options in the dialog box allow you to specify the length of the pattern, its format (hexadecimal, decimal, octal, binary or text) and the insertion point.
If Repeat pattern is checked, the specified pattern will be inserted repeatedly to reach the length set in Size.
The first five choices select the format displayed in the data editor window: hexadecimal, decimal, octal, binary or text. When text display is selected, the extra text field is not displayed.
Toggles display of offset column on and off.
Toggles display of text field on and off.
When set, all offsets are displayed and interpreted as decimal numbers rather than as hexadecimals.
When set, hexadecimal digits in the data are displayed in upper case.
When set, hexadecimal digits in the offset value are displayed in upper case.
Select the encoding used for display in the text field. Alternative encodings like EBCDIC and 7-bit ASCII can be used. Additional encodings can be added by the user (not implemented yet.)
Bookmark a location within the document.
Multiple bookmarks can be set for a single document. Each document has its own set of bookmarks and the appropriate set is displayed at the bottom of the Bookmarks menu when a document is selected. Choose a bookmark from the menu to go to it.
Reset an existing bookmark to the current cursor location. A dialog will be opened with the list of available bookmarks; select the one you wish to change.
Remove an existing bookmark. A dialog will be opened with a list of available bookmarks; select the one you wish to remove.
Clear the bookmark list.
Move the cursor to the next bookmark.
Move the cursor to the previous bookmark.
Locate ASCII strings in the data. Minimum string length, case sensitivity and a pattern to match can be specified.
Perform a binary operation on the data. The operation (AND, OR, ROTATE..) and an operand can be specified in the dialog box. Checkboxes in the dialog allow the operation to be limited to selected bytes or the region before or after the cursor.
Open a list of values and their ASCII equivalents and insert the selected value at the cursor.
Enter a value in any of the fields and see its equivalent in hexadecimal, decimal, octal, binary or text. A check box allows viewing of the value at the cursor instead.
Display the frequency of occurrence of values in the document.
Toggle display of the toolbar below the menubar.
Toggle display of the statusbar
Toggle display of the full file path in the titlebar
Change display of tabs for all current documents. The tab can be displayed above or below the editor window, or hidden. You may find the tabs more convenient than the document menu for switching documents.
Change display of the value conversion field. It can be embedded in the main window, made a floating window or hidden.
Change display of the value searchbar. It can be displayed above or below the editor window, or hidden.
Save the current state of the options.
Change these settings:
Line and column size (in bytes). These can be set separately for different modes. Fixed number of bytes per line. Lock column at end of line. Gridlines between rows and columns. Width of field separators, spacing and margins.
Blink rate and shape of the cursor. Behavior of the cursor when the window loses focus.
Font name, style and size. Character used to display nonprinting characters in the text field.
All colors in KHexEdit can be customized, including odd and even lines and columns, bookmarks, separators and grid lines. The one exception is the selection color, which uses the setting chosen in the KDE Control Center.
Opening of the last, or all recent documents on startup. Restoration of cursor position. Write protection enabled by default. Make a backup upon saving files. Saving of “Recent Documents” list on exit. The “Recent Documents” list can also be cleared in this dialog.
Automatic copy to clipboard upon selection. Startup in insert mode, rather than overwrite. Confirmation required for wrapping to the beginning or end during searches. Cursor jumps to nearest byte when moved in binary mode. Sound on typing input or fatal failure. Display of bookmarks in the offset column and editor fields. Warning when number of printable pages exceeds a settable limit. Maximum number of undos.
Invokes the KDE Help system starting at the KHexEdit help pages. (this document).
Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KHexEdit will open a help window (if one exists for the particular item) explaining the item's function.
Opens the Bug report dialog where you can report a bug or request a ‘wishlist’ feature.
This will display version and author information.
This displays the KDE version and other basic information.
The toolbar contains icons for the following commands:
(Except for Drag document and Toggle write protection, all behave identically to the menu command.)
Drag document -- Click this button and drag to a text editor or a new KHexEdit window.
New
Open
Revert
Save
Find
Find Next
Find Previous
Cut
Copy
Paste
Undo
Redo
Cancel Operation
Help
..and at the right of the toolbar..
Toggle write protection - switch between read-only and read/write modes.
The searchbar is used to locate a specific value in the document. Enter a value in the box, select the desired representation (hexadecimal, octal, binary, decimal or text) and hit the Find button. Check the Backwards box to search backwards from the cursor point or check Ignore case for a case-insensitive text search. Click the button on the right of the bar (X) to hide the searchbar; go to Searchbar in the Settings menu to restore it.
The conversion field displays the values of various datatypes at the selected byte. For 8 bit types, it displays the value of the byte under the cursor; for larger types, it displays the value starting at that byte. The rightmost column displays various encodings of the current byte. Options in the conversion field are:
When checked, causes multibyte types to be calculated using the little-endian method used by x86 and Alpha processors. In this scheme, the first byte represents the least significant part of the value. (0a 4e = 0x4e0a = 19978) When unchecked, causes multibyte types to be calculated using the big-endian method used by PowerPC and Sparc processors. (0a 4e = 0x0a4e = 2638)
When checked, causes unsigned types to be displayed in hexadecimal, rather than decimal format.
Determines the number of bits used to calculate the values in the fields above it.
The status bar displays the following information:
When there is no selection, this field shows the encoding option used. (See View->Document Encoding for more information on encoding.) The start point and the length of the selection are shown.
A ! in this box indicates the current file was modified.
Indicates whether values entered at the keyboard are inserted at the cursor point (INS) or overwrite the existing data starting at the cursor(OVR). Use the Insert key to toggle betwen the two modes.
Displays the total size of the current document.
Indicates the position of the cursor within the document.
Indicates whether data editor window is diplaying values in hexadecimal, octal, binary, decimal or text mode. Switch between modes with the View menu.
Indicates whether the document can be edited (RW) or is being viewed read-only (R). Switch between modes with the button on the far-right of the toolbar or the Permissions command in the File menu.
KHexEdit
Program copyright 1999-2000 Espen Sand <espensa@online.no>
Contributors:
Leon Lessing <leon@irlabs.com>
Craig Graham <c_graham@hinge.mistral.co.uk>
Dima Rogozin <dima@mercury.co.il>
Edward Livingstone-Blade <sbcs@bigfoot.com>
Documentation copyright 2000 Jonathan Singer <jsinger@leeta.net>
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the GNU General Public License.
KHexEdit is part of the KDE project http://www.kde.org/.
KHexEdit can be found in the kdeutils package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.
In order to compile and install KHexEdit on your system, type the following in the base directory of the KHexEdit distribution:
% ./configure % make % make install
Since KHexEdit uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.