Passing around render_state as needed for key callbacks