I think you have to use pointer events to detect the eraser -- e.button should be 5 for pointerdown events. I&#x27;m not sure how hard it is to use pointer events when available (currently only on IE&#x2F;Edge, it looks like).