device: cleanup in keyboard