# Highlight tool trigger as left click

**URL:** <https://pdfjs.community/t/highlight-tool-trigger-as-left-click/1664>\
**Category:** Technical Support\
**Created:** [May 10, 2022, 7:34am UTC](https://pdfjs.community/t/highlight-tool-trigger-as-left-click/1664 "2022-05-10T07:34:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Abhiramsa3](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@Abhiramsa3](https://pdfjs.community/u/Abhiramsa3)\
**Post date:** [May 10, 2022, 7:34am UTC](https://pdfjs.community/t/highlight-tool-trigger-as-left-click/1664/1 "2022-05-10T07:34:16Z")

</div>

**Which product are you using?**  
PDF Express Js

**PDF.js Express Version**  
8.X.X

**Detailed description of issue**  
on left click of mouse is it possible to highlightToolbutton option to be triggered.

**Expected behaviour**  
on left click of mouse is it possible to triggered the highlightToolbutton menu, and capture the highlighted text.

**Does your issue happen with every document, or just one?**  
Yes

**Link to document**

**Code snippet**  
annotationManager.addEventListener(‘annotationSelected’, (annotations, action) =\> {  
if (action === ‘selected’) {  
console.log(‘annotation selection action’, action);  
const selectedAnnots = annotationManager.getSelectedAnnotations();  
console.log(‘selected Content’, selectedAnnots);

```
            } else if (action === 'deselected') {
                console.log('annotation deselection', annotations);
               
            }
            if (annotations === null && action === 'deselected') {
                console.log('all annotations deselected');
            }
        })
```

---

_[View the full topic](https://pdfjs.community/t/highlight-tool-trigger-as-left-click/1664)._
