Customize the shortcut key to open toolTip, how to close this toolTip in the click event of the editor

This is the executor of my shortcut key:
function showCustomToolTip(view) {
const effects = []
this.toolTipInfo = {
pos: 48,
above: true,
strictSide: true,
arrow: true,
create: (view) => {
let dom = document.createElement(“div”)
dom.className = “cm-tooltip-cursor”
dom.textContent = ‘this is my shortcut key tooltip’
return {dom}
this.tooltipExtension = showTooltip.of(this.toolTipInfo)
view.dispatch({ effects})
return true