GSoC'22 - Final Work Product: Global Shortcuts
GSoC’22 has finally come to an end. It was an extremely fun experience learning and implementing technologies as and when they were needed. In this blog I will try to explain all the major objectives that were brought about by this project.
My work is divided among quite a lot of PRs : All Pull Requests during GSoC period
However, some of them are fixes for some other PRs.
Overall, my work consists of 4 major PRs.
Toolbar Shortcuts
First is the Toolbar UI shortcut assignment (PR #12265), which was the MVP of this project. This PR allows you to right-click any toolbar item and assign it the shortcut of your choice. It is simply to reduce the need to open a preferences panel for most of the commonly used tools.
Missing Shortcuts and Shortcut Contexts
This part (PR #12414) of the project was a big overhaul fix towards how shortcuts are handled in the preferences page of the application. Before, shortcuts that did not have any default shortcuts were not displayed in the shortcuts list. The reason for this was that the shortcuts list was filled up from the xml file used for storing the default shortcuts. This causes the before-mentioned issue. I fixed this by reading the actions available in the program directly and checking if they have a shortcut in the mentioned XML.
Shortcut Categories
Here (PR #12752), I have categorized each shortcut as per the given sheet by the team and each of these titles also show up in their section of the preferences page. There are some issues with this, namely that currently I have disabled animations for opening/closing of these sections since stuttering was making the animation lose the reason it was there, to make the UI feel smoother.
Secondly the category titles by themselves are prone to changes and can be modified.
Palette Shortcuts
This is a proof-of-concept PR (PR #12850) that shows the same functionality as toolbar shortcuts but on palette items. The reason this was different is because palette cell items are not action-based, hence, this PR involved creating actions dynamically at runtime and naming them based on each item’s pointer value. This meant that action names of each cell would change every time you run the program, which meant that you wouldn’t be able to export shortcuts for these actions since there is no common identifier for each cell that persists across each session. After some discussion, I saved the shortcuts alongside other palette cell attributes (like name etc.). However, this has consequences for resolving potential conflicts between the roughly 1000 palette shortcuts and the other 500 or so regular shortcuts, which will require careful consideration from a design perspective before the palette shortcut concept can be explored further.