時間・時点N2
〜か〜ないかのうちに
no sooner... than... / the moment...
Structure
V-辞書形 + か + V-ない形 + ないかのうちに
Explanation
Indicates that the moment the first action ends (or before it even ends), the second action happens immediately. The first clause uses the same verb in both its dictionary form and nai-form: V-dictionary か V-nai ないかのうちに. The main clause is an instantaneous action.
Examples
ベッドに入るか入らないかのうちに、眠ってしまった。
I fell asleep the moment I got into bed.
ベルが鳴るか鳴らないかのうちに、子どもたちは外へ飛び出した。
The children dashed out the moment the bell rang.
Note
Similar to 〜たとたんに, but 〜か〜ないかのうちに emphasizes that the two actions happen almost simultaneously.
Related Grammar
〜たとたん〜やいなや