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

How to add shortcut keyboard to delete the annotation #1223

Open
lampts opened this issue Mar 29, 2017 · 1 comment
Open

How to add shortcut keyboard to delete the annotation #1223

lampts opened this issue Mar 29, 2017 · 1 comment

Comments

@lampts
Copy link

lampts commented Mar 29, 2017

I wanted to add a shortcut to delete wrong annotation faster. Is this possible to add more configuration now?

Thank you for creating this tool.
Laam

@andrewhead
Copy link

Hi @lampts! Not sure if this is still relevant to you, though if you're willing to tweak the code, you can add a shortcut for deleting the annotation with the "Backspace" button with a few lines of JavaScript.

Here's the small diff in a personal fork I used to do that.

If you want to listen for other keys being pressed, you should be able to replace $.ui.keyCode.BACKSPACE in the lines reading

keymap[$.ui.keyCode.BACKSPACE] = 'span_form_delete';

with other key codes either defined for special keys by jQuery UI, or other arbitrary single keys (without modifiers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants