Skip to content

Commit 05e9148

Browse files
committed
Add keybindings example and finalize preset bindings and docs
1 parent 2a13355 commit 05e9148

7 files changed

Lines changed: 172 additions & 636 deletions

File tree

docs/files/ghidra-keybindings.json

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
"Close Pane": "Ctrl+W",
44
"Close Tab": "",
55
"Copy Address": "Ctrl+Shift+C",
6-
"Create Structure...": "",
7-
"Display as\\Character Constant": "R",
8-
"Display as\\Enum Member": "M",
9-
"Edit Function Properties...": "Shift+E",
10-
"Enter Comment...": ";",
6+
"Create Structure...": "Shift+[",
117
"Find...": "S",
128
"Focus Log": "~",
13-
"Go to Address...": "G",
149
"Keybindings": "F4",
10+
"Make Code": "D",
1511
"Make Function at This Address\\Default": "F",
1612
"Navigate Back": "Alt+Left",
1713
"Navigate Forward": "Alt+Right",
@@ -20,26 +16,17 @@
2016
"New Project": "Ctrl+N",
2117
"New Window": "Ctrl+Alt+N",
2218
"Open URL...": "",
23-
"Patch\\Edit Current Line": "E",
19+
"Pin Cross References": "Ctrl+Shift+F",
2420
"Project Browser\\Import Files...": "Ctrl+I",
2521
"Project Browser\\Import Folder...": "Ctrl+Shift+I",
26-
"Redo": "Ctrl+Shift+Z",
2722
"Rename Type...": "L",
2823
"Rename...": "L",
2924
"Save Contents As...": "O",
30-
"Show Cross References at Selection...": "X",
31-
"Toggle Decompiled View": "F5",
32-
"Toggle Disassembly View": "Ctrl+E",
33-
"Type\\Cycle Float Size": "Shift+F",
25+
"Toggle Decompiled View": "Ctrl+E",
3426
"Type\\Cycle Integer Size": "B",
35-
"Type\\Invert Integer Sign": "-",
3627
"Type\\Make Array": "[",
3728
"Type\\Make C String": "'",
3829
"Type\\Make Pointer": "P",
39-
"Undo": "Ctrl+Z",
4030
"Undefine": "C",
41-
"Undefine Type...": "C",
42-
"View in Hex Editor": "H",
43-
"View in Linear Disassembly": "Space",
44-
"Zoom to Fit": "W"
31+
"Undefine Type...": "C"
4532
}

docs/files/ida-keybindings.json

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"Add Bookmark": "Ctrl+M",
33
"Add Tag...": "Alt+M",
4-
"Assemble...": "Ctrl+Alt+A",
5-
"Change Type...": "Y",
64
"Close Pane": "Ctrl+W",
75
"Close Tab": "",
8-
"Command Palette\\Search Actions...": "Ctrl+P",
6+
"Create Stack Variable...": "K",
97
"Display as\\Unsigned Hexadecimal": "H",
10-
"Edit Function Properties...": "Shift+E",
11-
"Enter Comment...": ":",
8+
"Enter Comment...": ";; :",
129
"Find Next": "Ctrl+T",
1310
"Find...": "Alt+T",
1411
"Focus Cross References": "Shift+X",
@@ -19,28 +16,16 @@
1916
"Focus Symbols": "Shift+F3",
2017
"Focus Tags": "Alt+F11",
2118
"Focus Types": "Shift+F9",
22-
"Go to Address...": "G",
2319
"Go to Entry Point": "Ctrl+E",
2420
"Import Header File...": "Ctrl+F9",
2521
"Kill": "Ctrl+F2",
26-
"Make Function at This Address\\Default": "P",
27-
"Navigate Back": "Escape",
22+
"Merge Variables Here": "=",
2823
"Navigate Forward": "Ctrl+Enter",
2924
"Patch\\Convert to NOP": "Ctrl+Alt+N",
3025
"Pin Cross References": "X",
31-
"Rename...": "N",
32-
"Resume": "F9",
33-
"Run To Here": "F4",
34-
"Step Into": "F7",
35-
"Step Over": "F8",
26+
"Set Stack Adjustment...": "Alt+K",
27+
"Show Type Casts": "\\",
28+
"Split Variable": "Shift+S",
3629
"Step Return": "Ctrl+F7",
37-
"Toggle Breakpoint": "F2",
38-
"Toggle Decompiled View": "F5",
39-
"Type\\Cycle Integer Size": "B",
40-
"Type\\Make C String": "A",
41-
"Type\\Make Pointer": "O",
42-
"Undefine": "U",
43-
"View in Graph": "Space",
44-
"View in Hex Editor": "Shift+F4",
45-
"View in Linear Disassembly": "Space"
30+
"View in Hex Editor": "Shift+F4"
4631
}

docs/guide/migration/ghidra/index.md

Lines changed: 2 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -24,87 +24,15 @@ See [the Ghidra export documentation](./ghidraexport.md)
2424

2525
## Keybindings
2626

27-
To quickly set up Ghidra-like keybindings, open the First Run dialog from the Help menu (Help → First Run...) and select the Ghidra preset. The First Run dialog will apply Ghidra-style keybindings and UI settings for you. This dialog also appears automatically when you launch Binary Ninja for the first time.
27+
To quickly set up Ghidra-like keybindings, open the First Run dialog from the Help menu (Help → First Run...) and select the Ghidra preset. The First Run dialog will apply Ghidra-style keybindings and UI settings for you. It appears automatically the first time you launch Binary Ninja, but it is always available from Help → First Run... — so if you dismissed it initially, or later want to (re)apply the Ghidra preset or switch between presets, you can change your keybindings and settings from there at any time.
2828

2929
<!-- TODO: Add screenshot of the First Run dialog showing the Ghidra preset selection -->
3030

3131
Alternatively, you can manually replace your [keybindings](../../index.md#custom-hotkeys) file in your [user folder](../../index.md#user-folder) with [this file](../../../files/ghidra-keybindings.json) to have the most seamless experience when changing to Binary Ninja.
3232

3333
Binary Ninja's default keybindings are very different from Ghidra. Thankfully, [Binary Ninja's action system](https://binary.ninja/2024/02/15/command-palette.html) allows you to easily find actions and view the keybindings extremely easily. It'll also save you from digging through unfamiliar right-click menus while helping you learn any new keybindings. All actions can have their keybinding set, changed, or removed in the [keybindings menu](../../index.md#default-hotkeys).
3434

35-
Some of the most useful Ghidra-preset keybindings are as follows:
36-
37-
<!-- BEGIN GENERATED KEYBINDING TABLES -->
38-
Analysis Keybindings:
39-
40-
| Action | Shortcut |
41-
| --- | --- |
42-
| Change Type | `Ctrl/Cmd+L` |
43-
| Copy Address | `Ctrl/Cmd+Shift+C` |
44-
| Edit Function Properties | `Shift+E` |
45-
| Enter Comment | `;` |
46-
| Make Function | `F` |
47-
| Edit Current Line (Patch) | `E` |
48-
| Redo | `Ctrl/Cmd+Shift+Z` |
49-
| Rename Type | `L` |
50-
| Rename | `L` |
51-
| Show Cross References | `X` |
52-
| Undefine | `C` |
53-
| Undefine Type | `C` |
54-
| Undo | `Ctrl/Cmd+Z` |
55-
56-
Navigation Keybindings:
57-
58-
| Action | Shortcut |
59-
| --- | --- |
60-
| Go to Address | `G` |
61-
| Navigate Back | `Alt+Left` |
62-
| Navigate Forward | `Alt+Right` |
63-
| Navigate to Selection | `Enter` |
64-
65-
Types Keybindings:
66-
67-
| Action | Shortcut |
68-
| --- | --- |
69-
| Display as Character | `R` |
70-
| Display as Enum | `M` |
71-
| Cycle Float Size | `Shift+F` |
72-
| Cycle Integer Size | `B` |
73-
| Invert Integer Sign | `-` |
74-
| Make Array | `[` |
75-
| Make C String | `'` |
76-
| Make Pointer | `P` |
77-
78-
Views & Panels Keybindings:
79-
80-
| Action | Shortcut |
81-
| --- | --- |
82-
| Focus Log | `~` |
83-
| Keybindings | `F4` |
84-
| Toggle Decompiled View | `F5` |
85-
| Toggle Disassembly View | `Ctrl/Cmd+E` |
86-
| View in Hex Editor | `H` |
87-
| View in Linear Disassembly | `Space` |
88-
| Zoom to Fit | `W` |
89-
90-
Search Keybindings:
91-
92-
| Action | Shortcut |
93-
| --- | --- |
94-
| Find | `S` |
95-
96-
File Operations Keybindings:
97-
98-
| Action | Shortcut |
99-
| --- | --- |
100-
| Close Pane | `Ctrl/Cmd+W` |
101-
| New Binary Data | `Ctrl/Cmd+Shift+N` |
102-
| New Project | `Ctrl/Cmd+N` |
103-
| New Window | `Ctrl/Cmd+Alt+N` |
104-
| Import Files | `Ctrl/Cmd+I` |
105-
| Import Folder | `Ctrl/Cmd+Shift+I` |
106-
| Save Contents As | `O` |
107-
<!-- END GENERATED KEYBINDING TABLES -->
35+
For the complete list of shortcuts the Ghidra preset configures, see [`ghidra-keybindings.json`](../../../files/ghidra-keybindings.json).
10836

10937
## UI Settings
11038

docs/guide/migration/migrationguideida.md

Lines changed: 8 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -33,95 +33,23 @@ The following data will be imported:
3333

3434
## Keybindings
3535

36-
To quickly set up IDA-like keybindings, open the First Run dialog from the Help menu (Help → First Run...) and select the IDA preset. The First Run dialog will apply IDA-style keybindings and UI settings for you. This dialog also appears automatically when you launch Binary Ninja for the first time.
36+
To quickly set up IDA-like keybindings, open the First Run dialog from the Help menu (Help → First Run...) and select the IDA preset. The First Run dialog will apply IDA-style keybindings and UI settings for you. It appears automatically the first time you launch Binary Ninja, but it is always available from Help → First Run... — so if you dismissed it initially, or later want to (re)apply the IDA preset or switch between presets, you can change your keybindings and settings from there at any time.
3737

3838
<!-- TODO: Add screenshot of the First Run dialog showing the IDA Pro preset selection -->
3939

4040
Alternatively, you can manually replace your [keybindings](../index.md#custom-hotkeys) file in your [user folder](../index.md#user-folder) with [this file](../../files/ida-keybindings.json) to have the most seamless experience when changing to Binary Ninja.
4141

4242
Most of the default keybindings you're used to are the same. Any "actions" (renaming, setting types, opening cross-references, etc) you might want to perform can be found in the [command palette](../index.md#command-palette), which will save you from digging through unfamiliar right-click menus and help you learn any new keybindings. You can even [add your own actions](https://binary.ninja/2024/02/15/command-palette.html#how-do-i-register-actions-with-the-command-palette-myself) with ease. All actions can have their keybinding set, changed, or removed in the [keybindings menu](../index.md#default-hotkeys).
4343

44+
For the complete list of shortcuts the IDA preset applies, see [`ida-keybindings.json`](../../files/ida-keybindings.json).
45+
4446
Some major exceptions are:
4547

46-
<!-- BEGIN GENERATED KEYBINDING TABLES -->
47-
Analysis Keybindings:
48-
49-
| Action | Shortcut |
50-
| --- | --- |
51-
| Add Bookmark | `Ctrl/Cmd+M` |
52-
| Add Tag | `Alt+M` |
53-
| Assemble | `Ctrl/Cmd+Alt+A` |
54-
| Change Type | `Y` |
55-
| Edit Function Properties | `Shift+E` |
56-
| Enter Comment | `:` |
57-
| Focus Cross References | `Shift+X` |
58-
| Make Function | `P` |
59-
| Convert to NOP | `Ctrl/Cmd+Alt+N` |
60-
| Pin Cross References | `X` |
61-
| Rename | `N` |
62-
| Undefine | `U` |
63-
64-
Navigation Keybindings:
65-
66-
| Action | Shortcut |
67-
| --- | --- |
68-
| Go to Address | `G` |
69-
| Go to Entry Point | `Ctrl/Cmd+E` |
70-
| Navigate Back | `Escape` |
71-
| Navigate Forward | `Ctrl/Cmd+Enter` |
72-
73-
Types Keybindings:
74-
75-
| Action | Shortcut |
76-
| --- | --- |
77-
| Display as Hex | `H` |
78-
| Cycle Integer Size | `B` |
79-
| Make C String | `A` |
80-
| Make Pointer | `O` |
81-
82-
Views & Panels Keybindings:
83-
84-
| Action | Shortcut |
85-
| --- | --- |
86-
| Focus Log | `~` |
87-
| Focus Memory Map | `Shift+F7` |
88-
| Focus Stack Trace | `Ctrl/Cmd+Alt+S` |
89-
| Focus Strings | `Shift+F12` |
90-
| Focus Symbols | `Shift+F3` |
91-
| Focus Tags | `Alt+F11` |
92-
| Focus Types | `Shift+F9` |
93-
| Toggle Decompiled View | `F5` |
94-
| View in Graph | `Space` |
95-
| View in Hex Editor | `Shift+F4` |
96-
| View in Linear Disassembly | `Space` |
97-
98-
Search Keybindings:
99-
100-
| Action | Shortcut |
101-
| --- | --- |
102-
| Command Palette | `Ctrl/Cmd+P` |
103-
| Find Next | `Ctrl/Cmd+T` |
104-
| Find | `Alt+T` |
105-
106-
Debugger Keybindings:
107-
108-
| Action | Shortcut |
109-
| --- | --- |
110-
| Kill | `Ctrl/Cmd+F2` |
111-
| Resume | `F9` |
112-
| Run To Here | `F4` |
113-
| Step Into | `F7` |
114-
| Step Over | `F8` |
115-
| Step Return | `Ctrl/Cmd+F7` |
116-
| Toggle Breakpoint | `F2` |
117-
118-
File Operations Keybindings:
119-
120-
| Action | Shortcut |
121-
| --- | --- |
122-
| Close Pane | `Ctrl/Cmd+W` |
123-
| Import Header File | `Ctrl/Cmd+F9` |
124-
<!-- END GENERATED KEYBINDING TABLES -->
48+
- Save is `[CTRL/⌘-S]`.
49+
- The "subviews" keybindings are:
50+
- `T` for Types
51+
- `[SHIFT-F4]` to toggle to/from Hex View
52+
- `[TAB]` to toggle to/from disassembly
12553

12654
## UI Settings
12755

python/examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ These plugins require the UI to be running
3535
* hellosidebar.py - example [Sidebar](https://api.binary.ninja/cpp/group__sidebar.html) UI element (like the Symbol list)
3636
* jump_table.py - heuristic based jump table detection for when the data-flow based computation fails, triggered by right-clicking on the location where the jump value is computed
3737
* linear_mlil.py - deprecated (now supported internally, left purely as a code example) plugin generating a custom linear MLIL view
38+
* list_keybindings.py - enumerate every registered (keybindable) action and its current/default key sequence via `UIAction.getAllRegisteredActions()`; useful for discovering valid action names, validating a keybindings.json, or exporting a keybindings.json skeleton
3839
* make_code.py - plugin to render hex as disassembly without creating a function using a [DataRenderer](https://api.binary.ninja/binaryninja.datarender-module.html#binaryninja.datarender.DataRenderer)
3940
* mapped_view.py - example view showing how to map regions in memory in a custom [BinaryView](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView)
4041
* ui_notification_callbacks.py - example showing multiple UI notification callbacks

0 commit comments

Comments
 (0)