Provide feedback with regard to display chosen based on two key presses

I’m trying to create a 2-alternatives forced choice experiments for groups consisting of dyads, where two participants see two displays of gabor patches, where one of the gabor patches (the odd-ball) in one display stands out. The participants has to indicate which display contains the odd-ball.
The participants should receive feedback indicating whether participant 1 chose display 1 or display 2, and the same goes for participant 2. So both participants answer, and they get a feedback like:
‘participant 1: display 1’
participant 2: display 1’.

Participant 1 can respond with keypresses: ‘n’ and ‘m’, and participant 2: ‘o’ and ‘p’ to indicate respectively display 1 and 2.
I’ve created keyboard-components called key_resp_1 and key_resp_2 for this.

I’m very new to coding and psychopy in general, but I’ve tried to write this code in a code component attached to a text component (with a duration of 2 seconds), which doesn’t work:

In ‘Begin Experiment’:
msg_decisions_declared = ""

In ‘Begin Routine’:

if key_resp_1 == 'n' and key_resp_2 == 'o':
    msg_decisions_declared = 'Interval 1, Interval 1'
elif key_resp_1 == 'm' and key_resp_2 == 'o':
    msg_decisions_declared = 'Interval 2, Interval 1'
elif key_resp_1 == 'o' and key_resp_2 == 'p':
    msg_decisions_declared = 'Interval 1, Interval 2'
elif key_resp_1 == 'm' and key_resp_2 == 'p':
    msg_decisions_declared = 'Interval 2, Interval 2'

The program is running, but it only waits for 2 seconds before starting the next trial, it doesn’t actually print the feedback.

Does someone has any suggestions to fix this?

Try adding .keys to all of your keyboard references:

key_resp_1.keys

That worked, thank you!