<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<canvas width="600" height="400"></canvas>
<script>
let tela = document.querySelector("canvas");
let pincel = tela.getContext("2d");
pincel.fillStyle="grey";
pincel.fillRect(0,0,600,400);
pincel.fill();
function gerarBolinha(evento){
var x = evento.pageX - tela.offsetLeft;
var y = evento.pageY - tela.offsetTop;
if(evento.shiftKey){
pincel.fillStyle="blue";
pincel.beginPath();
pincel.arc(x, y, 10+20, 0, 2 * 3.14);
pincel.fill();
} else {
pincel.fillStyle="blue";
pincel.beginPath();
pincel.arc(x, y, 10, 0, 2 * 3.14);
pincel.fill();
}
}
tela.onclick = gerarBolinha;
</script>
</body>
</html>