Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
927 stars 209 forks source link

Save reminder alert should put a focus ring on "Don't Save" #3443

Closed saagarjha closed 2 years ago

saagarjha commented 2 years ago

Version and Platform (required):

Bug Description: On macOS, it is typical for the "hey do you want to save before closing this" alert to have three options: "Save", "Don't Save", and "Cancel". With full keyboard access, the keyboard shortcuts for each of these is enter, space, and escape respectively. It would be nice for Binary Ninja to offer these too.

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open a binary.
  2. Try to close the window.

Expected Behavior: There's a focus ring around "Don't save" that lets me select that option with the spacebar.

Screenshots:

Screenshot 2022-08-27 at 19 32 36

(Focus is on the "Save" option, which means both enter and space select it)

Additional Information:

Screenshot 2022-08-27 at 19 33 34

(A more standard accelerator set, in this case from Hopper)

psifertex commented 2 years ago

Ohh boy, if only you knew the amount of internal discussion we've had around this particular topic. Far, for more than most would expect. 😉

In short, the current behavior has been carefully chosen after lots of analysis of many different applications as well as the desire to remain as cross-platform as possible while still doing our best to follow local conventions and it is unlikely to change again soon.

That said -- if you want to select "don't save", use the CMD-D hotkey (CTRL-D on non-MacOS installs of BN). Believe it or not this actually used to be default hotkey across all native apple apps and it happens to play nicely across other OS's once you get used to it.

saagarjha commented 2 years ago

Cool, that works for me.

saagarjha commented 1 year ago

Can we revisit this issue now that the dialog looks like this?

image