Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Accessibility improvements with keyboard shortcuts #1085

Closed
Surendrajat opened this issue Jan 16, 2021 · 7 comments
Closed

[feature] Accessibility improvements with keyboard shortcuts #1085

Surendrajat opened this issue Jan 16, 2021 · 7 comments
Labels
GUI Issues in jadx-gui module new feature
Milestone

Comments

@Surendrajat
Copy link
Contributor

Surendrajat commented Jan 16, 2021

Describe your idea:

So it took me a while to figure out that CTRL + Click is the shortcut for Go to declaration. It's common for IDEs but not so common among popular RE tools.
Cutter, JEB, IDA, Binary Ninja… etc. all use almost the same shortcuts, and it'll be nice to see these common shortcuts also present in Jadx.
A few of them are:

Action Shortcut(s) Status
Go to declaration Double-Click ✔️
Find Usage (cross-ref) X ✔️
Rename N ✔️
Back ESC ✔️
Forward ALT + ✔️
Smali ⇄ Java (Tab) ✔️
CFG ⇄ Java/Smali (Space) NYI
Add a comment ; ✔️
View all comments CTRL + ; ✔️
Save Project CTRL + S
Save Project as.. CTRL + SHIFT + S

✔️ ⇒ Done
NYI ⇒ (Feature) Not Yet Implemented

Hopefully, it will help users of other tools feel right at home using Jadx and I feel it's much faster to navigate read-only code with a single keystroke.

Please let me know what you think of it. Thanks.

@skylot
Copy link
Owner

skylot commented Jan 16, 2021

@Surendrajat thank you for this shortcuts list!
I don't have much experience in using RE tools, so I made most of the shortcuts the same as in IntelliJ IDEA.
I will try to add your shortcuts suggestions, but here several issues:

  • double-click action currently used to mark all occurrence of the symbol, not sure if it is useful, but it is default in the editor widget jadx used (RSyntaxTextArea). I need to check if this can be changed.
  • editor doesn't have a visible caret now, so there is no current symbol for shortcut action. It is possible to show caret or use a symbol under the mouse, not sure what is better.

Anyway, as you stated, jadx is missing a full list of all shortcuts. I made a short list as a jadx-gui features overview link in readme. But looks like it must be a simple list explicitly stated in readme.

@Surendrajat
Copy link
Contributor Author

Surendrajat commented Jan 16, 2021

@skylot Thanks for replying.

About issues:

  1. All RE tools(and IDEA) select and highlight a symbol on a single-click so double-click is free to use. I hope the library you use allows you to do that. Also note, they highlight symbol occurrences only in the symbol scope and not all occurrences in the file.
  2. You can do both if possible. So if you implement the first one(ie. single-click selects the symbol, double-click jumps to definition) single-click can bring the cursor to the symbol, and a moving cursor on a symbol will also select and highlight the symbol so that the selected symbol is always under the cursor.

See below screenshot from JEB (same in other tools too):

jeb_symbol_selection

Also, I found out that Jadx supports projects now (yey!) so I have added shortcuts for saving projects. I know Jadx have CTRL + S for 'Save All' but if you think projects work good, hope you can reassign it.

Also also, I saw an issue and found out that you will be adding support for adding comments in the source(thanks a lot), I've added comment related shortcuts too.

skylot pushed a commit that referenced this issue Jan 23, 2021
…) (PR #1090)

* Add shortcuts to TabbedPanel & enhance JumpPosition

* Update jadx-gui/src/main/java/jadx/gui/ui/codearea/RenameAction.java

Co-authored-by: tobias <tobias.hotmail.com>
@skylot skylot added this to the v1.3.0 milestone Jan 23, 2021
@skylot skylot added the GUI Issues in jadx-gui module label Jan 23, 2021
@Surendrajat
Copy link
Contributor Author

@skylot

Also, I found out that Jadx supports projects now (yey!) so I have added shortcuts for saving projects. I know Jadx have CTRL + S for 'Save All' but if you think projects work good, hope you can reassign it.

I was wondering if you have considered this. Most shortcuts for existing features are implemented now. If projects are in good shape, I want to default to projects.

@skylot
Copy link
Owner

skylot commented Jan 31, 2021

@Surendrajat
Sure, project shortcuts are good.
And for 'saving' actions, I think, we need to make a single export action with a new shortcut and options in dialog window like:

  • export as a Gradle project
  • don't save classes from excluded packages
  • don't save resources
  • ... etc

If projects are in good shape

Project is a little useless now because it only saved opened files and tree state, all other settings are global now.
I plan to save in projects also:

@Surendrajat
Copy link
Contributor Author

Surendrajat commented Jan 31, 2021

Sure, project shortcuts are good.

Cool.

And for 'saving' actions, I think, we need to make a single export action with a new shortcut..

We can reuse the same CTRL + E for that.?

I was thinking project stored renames and all, but now I see why that jobf file was hanging around :)

Anyway I think it's probably better to making the project feature the default for save option and incrementally add the missing bits.

@skylot
Copy link
Owner

skylot commented Jan 31, 2021

We can reuse the same CTRL + E for that.?

Yeah, it is ok

I think it's probably better to making the project feature the default for save option and incrementally the missing bits.

I agree :)

@skylot
Copy link
Owner

skylot commented Aug 3, 2023

Now is possible to customize shortcuts.
The feature was implemented by @Mino260806 in PR #1980.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues in jadx-gui module new feature
Projects
None yet
Development

No branches or pull requests

2 participants