toggle buttons and mouse dragging