# Trigger annotation drawing is finished when 'ENTER' is hit

**URL:** <https://pdfjs.community/t/trigger-annotation-drawing-is-finished-when-enter-is-hit/140>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [July 16, 2020, 7:35am UTC](https://pdfjs.community/t/trigger-annotation-drawing-is-finished-when-enter-is-hit/140 "2020-07-16T07:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zzhang](https://avatars.discourse-cdn.com/v4/letter/z/b9e5f3/32.png) [@zzhang](https://pdfjs.community/u/zzhang)\
**Post date:** [July 16, 2020, 6:16pm UTC](https://pdfjs.community/t/trigger-annotation-drawing-is-finished-when-enter-is-hit/140/2 "2020-07-16T18:16:29Z")

</div>

Hi,

You should be able to register your custom `enter` key in the viewer using [instance.hotkeys](https://pdfjs.express/api/WebViewerInstance.Hotkeys.html). Inside the callback you would want to call [polylineTool.mouseDoubleClick](https://pdfjs.express/api/Tools.PolylineCreateTool.html#mouseDoubleClick__anchor).

Thanks,  
Zhijie

---

_[View the full topic](https://pdfjs.community/t/trigger-annotation-drawing-is-finished-when-enter-is-hit/140)._
