You can begin with something like below one.
the below code simply add a document wide click listener and retrieve the X and Y coordinates of the pointer click.
document.addEventListener('click',function(e){
console.log(e.clientX, e.clientY);
});
0
solved how can i find if a certain part of the screen is clicked?