addEventListener('keydown', event => {
if(event.key !== 'Enter')
return
elementWithSelection = getSelection().anchorNode?.parentElement
if(!elementWithSelection)
return
elementWithSelection.click()
getSelection().empty()
})
This allows you to use the native CTRL+f and / search basically like the ' search.