This PR implements the following keyboard shortcuts:
Symbol list view:
Enter or Space or Mouse5: Enter the diff view for the symbol that is currently highlighted.
Up/Down or W/S: Select the symbol above/below the currently selected symbol. If no symbol is highlighted, select the topmost symbol.
PageUp/PageDown: Scroll up/down by the window height.
Home/End: Scroll to the top/bottom.
Ctrl+F: Give focus to the object filter input. (Note: egui's builtin Tab/Shift+Tab/Enter shortcuts already work fine for selecting an object from the filtered list, so I didn't need to add new ones for that.)
Ctrl+S: Give focus to the symbol filter input.
Function/data/extab diff view:
Backspace or Escape or Mouse4: Go back to the symbol list.
Up/Down or W/S: Scroll up/down by 10% of the window height.
PageUp/PageDown: Scroll up/down by the window height.
Home/End: Scroll to the top/bottom.
Function diff view only:
Ctrl+T: Change target function mapped to this base function.
Ctrl+B: Change base function mapped to this target function.
I also wanted to add a shortcut to open the context menus via the keyboard, but I don't think it's possible in egui :/
Most of these are pretty self-explanatory, but the shortcuts to select the symbol above/below the current one in the listing required a few changes to how objdiff handles the highlighted symbols.
The short version is that the highlighted symbols pair is now treated more like a permanent cursor that you can use to navigate around without the mouse.
Long version:
The highlighted symbol is no longer cleared when backing out of a diff view. This is to make it easier to re-enter the same symbol you were just diffing, or to go to the one above it, etc.
When the highlighted symbol is changed via the keyboard, the newly selected symbols will both be scrolled into view one time. When using the mouse, this is not done.
Using the mouse to highlight a symbol that has no counterpart on the opposite side now gives it a blue (permanent) highlight like other symbols, instead of just a grey (temporary) highlight. This is so you can start by selecting a symbol with the mouse, and then move the cursor around with the keyboard to continue selecting other symbols.
Also, the "split view" where half the window is the function view and the other half is the symbol list view is supported. The symbol list's shortcuts work normally here, while the function diff half has the up/down shortcuts disabled so it doesn't scroll accidentally while navigating the symbol list, but the PageUp/PageDown/Home/End shortcuts are still enabled in case you do want to scroll the function diff in the split view.
Keyboard-only navigation demonstration:
https://github.com/user-attachments/assets/6abf4824-ca4d-490a-b259-650a9a096e3e
This PR implements the following keyboard shortcuts:
Symbol list view:
Function/data/extab diff view:
Function diff view only:
I also wanted to add a shortcut to open the context menus via the keyboard, but I don't think it's possible in egui :/
Most of these are pretty self-explanatory, but the shortcuts to select the symbol above/below the current one in the listing required a few changes to how objdiff handles the highlighted symbols. The short version is that the highlighted symbols pair is now treated more like a permanent cursor that you can use to navigate around without the mouse. Long version:
Also, the "split view" where half the window is the function view and the other half is the symbol list view is supported. The symbol list's shortcuts work normally here, while the function diff half has the up/down shortcuts disabled so it doesn't scroll accidentally while navigating the symbol list, but the PageUp/PageDown/Home/End shortcuts are still enabled in case you do want to scroll the function diff in the split view.
Let me know if anything could be improved!