Quantcast
Channel: arm - openFrameworks
Viewing all articles
Browse latest Browse all 147

ofAppNoWindow keypressed

$
0
0

@RobbertGroenendijk wrote:

I’m running OF on a Raspberry Pi 4 (Raspbian Lite) that is used to control LED matrixes. Therefore I’d like to run in headless mode with ofAppNoWindow. But for debugging it would be nice if I could still detect keypresses so I can shut down the application. So far I’ve had no luck getting the key detection to work, even though it seems like it should work as I find use cases on github. Any pointers on how to go about this?

#include "ofMain.h"
#include "ofApp.h"
#include "ofAppNoWindow.h" 

//========================================================================
int main( ){
    ofAppNoWindow window;  
    ofSetupOpenGL(&window,1024,768,OF_WINDOW);  

    ofRunApp(new ofApp());  
}

Trying to use the basic void ofApp:keyPressed(int key) function for detection at the moment.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 147

Trending Articles