You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Marks in Cutter are now visual and easier to manage with tooltips, colors, and overlapping support in the Hexdump. Read about the new feature implemented by Emad Sohail, an RSoC student"
10
10
---
11
11
12
-
As a second project of my RSoC internship, I worked on integrating the Rizin Mark API into Cutter to visually show the prescence of marks in the `Hexdump` widget.
12
+
As a second project of my RSoC internship, I worked on integrating the Rizin Mark API into Cutter to visually show the presence of marks in the `Hexdump` widget.
@@ -23,7 +23,7 @@ Refer to [RSoC 2025 - Adding Mark API](https://rizin.re/posts/rsoc-2025-mark-api
23
23
24
24
## **Implementation**
25
25
26
-
For now **Marks** are only available in the **Hexdump** widget
26
+
For now,**Marks** are only available in the **Hexdump** widget
27
27
28
28
### **Adding, Editing and Removing Marks**
29
29
@@ -53,7 +53,7 @@ struct MarkDescription
53
53
};
54
54
```
55
55
56
-
Each mark is then rendered in its assigned color, and finally the **Data bytes** and **ASCII** characters are drawn on top, so the marks integrate smoothly into the **Hexdump** view.
56
+
Each mark is then rendered in its assigned color, and finally the **Data bytes** and **ASCII** characters are drawn on top so the marks integrate smoothly into the **Hexdump** view.
Here the **overlapping** region is highlighted by a subtle green color.
66
+
Here, the **overlapping** region is highlighted by a subtle green color.
67
67
68
68
### **Tooltip**
69
69
@@ -91,22 +91,22 @@ To solve this, the **Remove** and **Edit** actions in the context menu now list
91
91
92
92
Everything worked fine until we hit an issue: whenever the cursor moved inside a highlighted mark range, the background reverted to Cutter’s default color instead of staying with the mark’s highlight. This happened because the cursor redraw overwrote the background each time it moved.
93
93
94
-
If there was only one mark at the cursor address, fixing this would be easy, just query the mark and repaint the background with its color. But since multiple marks can overlap at the same address, we needed a smarter approach. To solve this, we introduced a helper function `getBlendedMarksColorAt()` inside `CutterCore`, which calculates the final blended color for all marks at a given address.
94
+
If there was only one mark at the cursor address, fixing this would be easy: just query the mark and repaint the background with its color. But since multiple marks can overlap at the same address, we needed a smarter approach. To solve this, we introduced a helper function `getBlendedMarksColorAt()` inside `CutterCore`, which calculates the final blended color for all marks at a given address.
95
95
96
-
## **Future Improvments**
96
+
## **Future Improvements**
97
97
98
98
A cool idea for future work could be to create another tab alongside the **Parsing** and **Information** tabs in the right panel, dedicated to **Marks**.
99
-
This tab would display all added marks in a table-like view with their names, and allow quick interaction.
99
+
This tab would display all added marks in a table-like view with their names and allow quick interaction.
100
100
101
-
Clicking on a mark would open its details (such as comment, color, etc.) and provide options to directly edit or remove it, without needing to use the right-click context menu.
101
+
Clicking on a mark would open its details (such as comment, color, etc.) and provide options to directly edit or remove it without needing to use the right-click context menu.
102
102
Additionally, double-clicking on a row could automatically move the **cursor** and **viewpoint** to the starting address of the selected mark, making navigation much faster and more intuitive.
103
103
104
104

105
105
106
-
And also extending**Marks** support to different widgets (Disassembly, Graph etc).
106
+
And also extend**Marks** support to different widgets (Disassembly, Graph, etc.).
107
107
108
108
## **Conclusion**
109
109
110
-
The integration of the Rizin Mark API in Cutter enables adding, editing, and managing overlapping marks directly in the Hexdump. With tooltips and context menu actions, it streamlines annotating binaries while leaving room for future enhancements.
110
+
The integration of the Rizin Mark API in Cutter enables adding, editing, and managing overlapping marks directly in the Hexdump. With tooltips and context menu actions, it streamlines annotating binaries while leaving room for future enhancements.
111
111
112
-
This was no doubt a great learning experience and at the end I would like to thank [@xvilka](https://github.com/notxvilka) for this amazing oppurtunity and also [@karliss](https://github.com/karliss),[@deroad](https://github.com/wargio) for the help and guidance.
112
+
This was no doubt a great learning experience, and at the end I would like to thank [@xvilka](https://github.com/notxvilka) for this amazing opportunity and also [@karliss](https://github.com/karliss) and[@deroad](https://github.com/wargio) for the help and guidance.
Copy file name to clipboardExpand all lines: _posts/2025-10-04-shortcut-manager-rsoc.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,23 @@ description: "Introducing a centralized Shortcut Manager in Cutter for improved
13
13
14
14
Greetings! I'm Emad Sohail (aka PremadeS), a 2nd-year CS undergraduate student at Information Technology University - Lahore. You can find me on [Github](https://github.com/PremadeS) and [LinkedIn](https://www.linkedin.com/in/emad-sohail-130b3b265/).
15
15
16
-
This summer I worked on improving the user experience of Cutter.
16
+
This summer I worked on improving the user experience of Cutter.
17
17
18
-
This was the first project. The main objective of this project was to introduce a universal **Shortcut Manager** in Cutter and to provide a flexible setup that can support custom shortcuts in the future with minimal additions.
18
+
This was the first project. The main objective of this project was to introduce a universal **Shortcut Manager** in Cutter and provide a flexible setup that can support custom shortcuts in the future with minimal additions.
19
19
20
-
You can find the write-up of my second project [here](https://cutter.re/integrating-the-rizin-mark-api-rsoc)
20
+
You can find the write-up of my second project [here](https://cutter.re/integrating-the-rizin-mark-api-rsoc).
21
21
22
22
## **Why a Shortcut Manager**
23
23
24
-
Default key sequences, *also referred to here as shortcuts*, were previosuly defined in their respective classes. While this approach works if the codebase is small. However, it gets exceptionally difficult to manage as the project grows, making it hard to keep track of which shortcuts are assigned to which functions. On top of that, as the key sequences were scattered in different files there was no way to create a centralized view that allows the user to see the default shortcuts and their respective actions.
24
+
Default key sequences, *also referred to here as shortcuts*, were previously defined in their respective classes. While this approach works if the codebase is small, it becomes exceptionally difficult to manage as the project grows, making it hard to keep track of which shortcuts are assigned to which functions. On top of that, because the key sequences were scattered across different files, there was no way to create a centralized view that allows the user to see the default shortcuts and their respective actions.
25
25
26
26
## **Design Goals**
27
27
28
28
The **Shortcut Manager** was designed with three key goals:
29
29
30
-
1)**Consistency:** Shortcuts should behave uniformly across the application, regardless of whether they originate from a `QAction` or a `QShortcut`
31
-
2)**Maintainablity:** All of the default shortcuts must be at the same place, which allows the developers to quickly add, remove or edit key sequences without needing to look through multiple files
32
-
3)**Extensibility:** The system should provide a solid foundation that can be expanded in the future, enabling features like custom user-defined shortcuts
30
+
1)**Consistency:** Shortcuts should behave uniformly across the application, regardless of whether they originate from a `QAction` or a `QShortcut`.
31
+
2)**Maintainability:** All default shortcuts must be in the same place, allowing developers to quickly add, remove, or edit key sequences without needing to look through multiple files.
32
+
3)**Extensibility:** The system should provide a solid foundation that can be expanded in the future, enabling features like custom user-defined shortcuts.
33
33
34
34
## **Implementation**
35
35
@@ -41,7 +41,7 @@ The `ShortcutManager` then looks up the corresponding entry in the default short
41
41
42
42

43
43
44
-
To make the process even simpler, the `ShortcutManager` also provides utility methods that return fully configured `QAction` or `QShortcut` objects based on the given ID. This not only streamlines shortcut creation but also hides away the underlying complexity, keeping the codebase clean and consistent.
44
+
To make the process even simpler, the `ShortcutManager` also provides utility methods that return fully configured `QAction` or `QShortcut` objects based on the given ID. This not only streamlines shortcut creation but also hides the underlying complexity, keeping the codebase clean and consistent.
45
45
46
46
A Default Shortcuts widget has also been introduced, allowing users to easily view all default key sequences alongside their corresponding actions. It also includes a search bar, making it simple to quickly find specific shortcuts or actions. [PR #3504](https://github.com/rizinorg/cutter/pull/3504/)
0 commit comments