Swift keyboard observer with closure