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

Delete key not working on Mac #152

mohanpb opened this issue Apr 26, 2019 · 4 comments


None yet
3 participants
Copy link

commented Apr 26, 2019

Describe the bug
I am not able to delete a wrong annotation in Mac using Chrome.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Open an image
  2. Click on Polygon. Try to make an annotation. And then try to delete it.
  3. It fails


Even after pressing delete key multiple times, it is not working.

Console Errors


Device detail
(please complete the following information):

  • OS: [e.g. Ubuntu] Mac
  • Browser [e.g. chrome, firefox] Chrome

Additional context

Watch for changes, or Bookmark for easy discovery.
Fund this project for new features and maintenance.
[Showcase] your project with us by raising an issue

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.


This comment has been minimized.

Copy link

commented Apr 28, 2019

Thanks for reporting the issue. Unfortunately, I don't have mac to test it so this fix may take time. However, if you're a developer I'll appreciate if you can debug and fix the issue.

In addition of this, can you please share the console logs? It may help us to fix the issue without having mac.


This comment has been minimized.

Copy link

commented May 7, 2019

There are two issues.

  1. The Mac does NOT have an alt-key. (It has an "option" key in which some applications sometimes treat as an alt key. However, IMHO, it's better to allow the user to generate non-ascii characters.) . This means that there is no Alt-A to do the select-all command on the Mac. (I didn't bother fixing the other Alt-key short cuts.)

  2. The key that is labeled "delete" on the Mac generates a backspace.

These two fixes can be applied to the file workarea.tag.html which fixes the problem for me.

change line 31:
if ( (e.keyCode == 46) || (e.keyCode == 8) ) {// del key is 46, backspace key is 8 (for Mac)

change line 54 (adds Ctl-A as a synonym for Alt-A)
} else if ( (e.key === 'a' && e.altKey) || (e.key === 'a' && e.ctrlKey) ) {//TODO change this


This comment has been minimized.

Copy link

commented May 8, 2019

Ctrl key is used by browser for most of the operations and Alt key is used for some of the operations like opening the menu, access plugins etc. Hence, we'll have to write some modules which effectively manages keys across browsers and devices.


This comment has been minimized.

Copy link

commented May 24, 2019

I found this library, which seems like it will solve the various OS keyboard compatibility issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.