t x = e.clientX - r.x;
			const y = e.clientY - r.y;
			return [x,y];
		}

		for (const c of cpus)
		c.addEventListener("wheel", function(e) {
			if (c.dataset.active == "false") return;
			e.preventDefault();
			if (e.shiftKey) { // brightness change
				brightness_change(c, e.deltaY);
			} else if (e.ctrlKey) { // contrast change
				contrast_change(c, e.deltaY);
			} else { // zoom
				const factor = e.deltaY > 0 ? WHEEL_FACTOR : 1.0/WHEEL_FACTOR;
				const [x,y]= cpu_xy(c, e);
				viewport_scale(c, x, y