add a simple util that adds a class depending on the last input device used
add events
rename last_input to last_input_device