How could I do by keeping the alt button pressed, I get the data of a tag p in an editable div

at this moment I press the alt button, and I get the data but the mouseover event continues to get the data, and I just need to get it, if I have the button press.

```
function pressAlt(){
document.onkeydown = function(e) {
        var keyPressed = e.keyCode;

             if (keyPressed == 18) {//alt button

        $('p').one('mouseover', function() { 
            var txt= $(this).text();
            console.log(txt);

        });
             }
    }
}

<div id='editor' style='' contenteditable="true" class="editor"  onmousedown="pressAlt()"   >   
    <!-- some text of contenteditable div -->
    <p >hi 1</p>
    <p >hi 2</p> 
    <p> hi 3</p>  

```

I get the information from the p tag but it does it repeatedly and I need to get it only once per item by pressing the alt button