A whim; a fancy; a twist of the mind, like the crotch or crome of a stick. (See Crook.)
“The duke hath crotchets in him.”
Shakespeare: Measure for Measure, iii. 2.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Crotchet from Fact Monster: