More general text mode hook.