11.8.1
Quoi referring to something out the sentence
There are sentences in which the referred object is something more or less indefinite.
Examples
a) She painted what she saw.
b) She knew what happened.
c) She did not know with what she should do it.
As you can see the referred object or context is unknown, it is outside of the sentence. Maybe we will never know what it is. However, to find the correct French expression we need to find the function of the relative pronoun. However, one thing is for sure: since we do not know what is talked about, we do not know gender and number of the referred object. This again means that lequel is out of question.
When having a look at the examples, we see that in a) it is a direct object, in b) it is a subject and in c) even a preposition is used. When checking the overview again we see that we have here a) is according to situation c3), b) is according to situation b3) and c) is according to situation e4).
Examples
a) She painted what she saw.
c3)
Elle peignait ce
qu' elle voyait.
b) She knew what happened.
b3)
Elle savait ce
qui se passait.
c) She did not know with what to do it.
e4) Elle
ne savait pas avec
quoi elle
devait le faire.
When having a very sharp look you might argue that e4) does not fit a hundred percent, because it refers to quelque chose or seule chose or rien or ce. However, one can imagine that in the example c) quelque chose is meant. Or, we fall back to a more simple rule: If a preposition is used and it is referred to something not explained in the sentence always quoi is to be used.
Example
She did not know about what they talk. / She did not know what they talk about.