rs.py to respond to switch down events