Eventdrawing

Hey,
i got a little question:
Isn’t it possible to draw a simple Circle while pressing for example the “w” on the keyboard ?

Like this:
void testApp::keyPressed(int key){

if(key==119){
cout << "w " << endl;
ofCircle(myCircleX,myCircleY,20);
}
}

But nothing happens…

no that won’t work you can use ofGetKeyPressed(119) in draw to check if that key is pressed