Editing files
Toggling the hex or ASCII panes
File can be edited in GHex from either the hex pane or the ASCII pane.
To focus either pane to accept your keystrokes, you may click on the appropriate pane, or:
Press Alt+Left to focus the hex pane, and
Press Alt+Right to focus the ASCII pane.
Editing the file using the hex or ASCII pane
Edit the ASCII format in the same way you edit a normal text file.
To edit the hexadecimal format, use the values 0 to 9 and a to f. This operation is not case-sensitive.
ใช้วิธีใดวิธีหนึ่งต่อไปนี้เพื่อเลื่อนเคอร์เซอร์ไปมาในแฟ้ม:
Use the scrollbar on the window and the mouse to select a byte by clicking on it.
Use the arrow keys, Home, End, PageUp or PageDown on the keyboard.
Choose Jump to Byte from the (Main menu) or press Ctrl+J, and enter the cursor offset as a decimal or hexadecimal value. The format of the hexadecimal value must be 0x followed by the offset, for example 0x3.
To delete or zero-out data, use either the Delete or Backspace keys. Cut operations will also have the side-effect of removing or zeroing-out data. This behaviour is different depending on whether or not Insert Mode is enabled. For more information, please review the section below.
Insert mode
Insert Mode can be toggled on or off by pressing Insert, or by clicking the Toggle insert mode button in the status bar.
When Insert Mode is enabled, this means data will be added to the file as opposed to replacing existing data.
Unlike traditional text editors, having Insert Mode off is considered the default state in GHex, given that hex editors are routinely used to edit existing data in binary files that are very specifically laid out. In some cases, such files may be of a fixed size and increasing or decreasing their size may cause undefined or unwanted behaviour in applications that open them.
Along these lines, delete operations work differently depending upon whether or not Insert Mode is enabled.
If Insert Mode is enabled, delete operations (eg, by pressing Delete, Backspace, or by a cut operation) will alter the file length, by removing the data from the file.
If Insert Mode is not enabled, delete operations will instead zero-out affected bytes within the file, so as to avoid changing the length of the file.