stop keyevent propagation based on return code