Compound command, key press

how to present a compound command of ‘RETURN + SHIFT’ using key press

hello,
here is a snipped I recently used to add some shortcuts to an app.

void gui::keyPressed(int key)
{
    auto commandKeyPressed = false;
    auto shiftKeyPressed = ofGetKeyPressed(OF_KEY_SHIFT);
#ifdef TARGET_OSX
    commandKeyPressed = ofGetKeyPressed(OF_KEY_COMMAND);
#endif
#ifdef TARGET_WIN
    commandKeyPressed = ofGetKeyPressed(OF_KEY_CTRL);
#endif
#ifdef TARGET_LINUX
    commandKeyPressed = ofGetKeyPressed(OF_KEY_CTRL);
#endif
}

and here is the part that checks if the enter key was pressed.

switch(key){
case OF_KEY_ENTER: 
{
break;
}
}

hope that helps
t

thank you very much for your help!i got some trouble to understand the code for my poor experience in openframeworks, but got the key point of your idea, i just try it like this,and it works, the shift + any other key press make the opposite command of the single any other key press, as follows

void ofApp::keyPressed(int key){
	auto commandKeyPressed = false;
	auto shiftKeyPressed = ofGetKeyPressed(OF_KEY_SHIFT);
#ifdef TARGET_OSX
	commandKeyPressed = ofGetKeyPressed(OF_KEY_COMMAND);
#endif
#ifdef TARGET_WIN
	commandKeyPressed = ofGetKeyPressed(OF_KEY_RETURN);
#endif
#ifdef TARGET_LINUX
	commandKeyPressed = ofGetKeyPressed(OF_KEY_CTRL);
#endif
	if (commandKeyPressed)
	{
		if (shiftKeyPressed)
		{
			...
		}
		else
		{
			...
		}
	}
}

like this?( :laughing:)
good luck