Can you ctrl + mouse click?

I would like rightClick on the mouse to do one thing and ctrl+rightClick to do another

Is there a way in onAction to tell if the CTRL key is pressed?



[java]inputManager.addMapping("shootRight", new MouseButtonTrigger(

MouseInput.BUTTON_RIGHT));



public void onAction(String name, boolean keyPressed, float tpf) {

else (name.equals("shootRight") && !keyPressed) {

//IS THERE A WAY TO KNOW IF THE CTRL KEY IS PRESSED HERE?

shootNode(name);

}

}



[/java]

As far as I know, the only way is to also have a listener for control and keep track yourself if it’s pressed or not. Which I suppose also means you could allow it to be remapped later more easily.

store a boolean whether ‘ctrl’ is pressed and check it when the right button is clicked