[
						Math.floor((x - rect.left) * 128 / (rect.right - rect.left)),
						Math.floor((y - rect.top) * 128 / (rect.bottom - rect.top)),
						step < 2 ? 1 : 0
					];
					return;
				}else
				{
					pico8_mouse[2] = 0;
				}
			}


			// buttons
			
			b = 0;

			if (y < h - r*8)
			{
				// no controller buttons up here; includes canvas and menu buttons at top in touch mode
			}
			else
			{
				e.preventDefault();

				if ((y < h - r*6) && y > (h - r*8))
				{
					// menu button: half as high as X O b