How do I get software keyboard state on android?

How do I get software keyboard state on android?