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

Allow hitting 'ESC' to cancel a file drag operation #719

Closed
frankmilliron opened this issue Nov 8, 2022 · 3 comments
Closed

Allow hitting 'ESC' to cancel a file drag operation #719

frankmilliron opened this issue Nov 8, 2022 · 3 comments
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements ToolKits MouseGraphics, Icon, Button, Line Edit, List Box, etc.
Milestone

Comments

@frankmilliron
Copy link
Contributor

Modern macOS allows users to hit Escape to cancel a file drag operation while the mouse is down. In A2D, you have to drag the items back into the original folder instead to cancel, once selected files have been moved out of the original folder.

@frankmilliron frankmilliron added DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements labels Nov 8, 2022
@inexorabletash inexorabletash added the ToolKits MouseGraphics, Icon, Button, Line Edit, List Box, etc. label Nov 9, 2022
@inexorabletash
Copy link
Collaborator

This is tricky - MGTK doesn't check for keyboard events while the mouse is down:

a2d/mgtk/mgtk.s

Line 5228 in 5845045

bcs end ; minus = is down

If that were to change, then the fix would be in toolkits/icontk.s circa

not_drag:

  • call XdrawOutline (same as today)
  • if highlight_icon_id is non-zero, call UnhighlightIcon (same as today, but don't jump away yet...)
  • GetEvent (so it's consumed)
  • If event_kind is EventKind::key_down, then set highlight_icon_id to 0 (to cancel) and exit via L9C63
  • otherwise, if highlight_icon_id is non-zero, exit via L9C63 (same as today)
  • otherwise, same logic as currently

@inexorabletash inexorabletash added this to the 1.3 milestone Nov 9, 2022
@inexorabletash
Copy link
Collaborator

As a workaround, you can drop the files on an empty spot on the desktop.

@inexorabletash
Copy link
Collaborator

Just bypass MGTK. Not too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements ToolKits MouseGraphics, Icon, Button, Line Edit, List Box, etc.
Projects
None yet
Development

No branches or pull requests

2 participants