KS law does not have a specific "repair and deduct" statute in its code. There is this
K.S.A. § 58-2561 (2008)
58-2561. Action for possession
for nonpayment of rent; counterclaim
, waiver; accrued rent, payment into court; disposition; when judgment for tenant.
(a) In an action for possession based upon nonpayment of the rent, or in an action for rent where the tenant is in possession, the tenant shall counterclaim for any amount which such tenant may recover under the rental agreement or this act or such counterclaim shall be deemed to have been waived. In that event, the court from time to time may order the tenant to pay into court all or part of the rent accrued and thereafter accruing, and shall determine the amount due to each party. The party to whom a net amount is owed shall be paid first from the money paid into court, and the balance shall be paid by the other party. If no rent remains due after application of this section, judgment may be entered for the tenant in the action for possession.
(b) In an action for rent where the tenant is not in possession, the tenant may counterclaim as provided in subsection (a), but the tenant shall not be required to pay any rent into court.
Which would allow you to counter claim in a suit against you for rent. But perhaps the better way to proceed is this. Give written notice to the landlord that if he does not honor the agreement you had with him regarding the repairs you will consider your lease void and move out.
Please let me know if you have further questions; if so I will do my best to answer them. If not please hit the accept button, its the only way I get credit for my work.