Use on mousedown and keydown