device button handling