rename last_input to last_input_device