# On double click/Enter, i want to finish marking of annotation where the last point was set and not where the cursor is present

**URL:** <https://pdfjs.community/t/on-double-click-enter-i-want-to-finish-marking-of-annotation-where-the-last-point-was-set-and-not-where-the-cursor-is-present/446>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [January 18, 2021, 10:43am UTC](https://pdfjs.community/t/on-double-click-enter-i-want-to-finish-marking-of-annotation-where-the-last-point-was-set-and-not-where-the-cursor-is-present/446 "2021-01-18T10:43:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kiran.patil](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kiran.patil](https://pdfjs.community/u/kiran.patil)\
**Post date:** [February 22, 2021, 1:26pm UTC](https://pdfjs.community/t/on-double-click-enter-i-want-to-finish-marking-of-annotation-where-the-last-point-was-set-and-not-where-the-cursor-is-present/446/3 "2021-02-22T13:26:14Z")

</div>

Hi Logan,

This works somewhat close to what I expected but I want to trigger this only on ENTER keyboard event (Changed requirement). On double click, it doesn’t work properly so only on ‘ENTER’ it should go back to one point back.

Also from this, its is not working,  
` this.viewerInstance.hotkeys.on('enter', e => { this.toolSelected.mouseDoubleClick(e); });`

How can I trigger this feature only on enter and not on double click by mouse.

---

_[View the full topic](https://pdfjs.community/t/on-double-click-enter-i-want-to-finish-marking-of-annotation-where-the-last-point-was-set-and-not-where-the-cursor-is-present/446)._
