in one's right mind; sane; of sound mind
Used to describe someone who is mentally sound, not crazy or delirious. Often appears in negative or questioning contexts.
Is he in his right mind?
Saying something like that, he can't be sane.
The expression combines 気 (mind/spirit) with the topic marker は and 確か (certain/sound). The exact historical derivation is uncertain, but it functions as a set phrase meaning 'of sound mind'.