Modifier keys

How would one implement an action input listener that would only activate with a shift+key or ctr+key with jme3? I've tried giving the mapping multiple triggers but it just fires all of them.



Can do it with the raw input listener but was wondering if there was another way with the action listener.



Thanks,

William

Set a boolean value when those keys are pressed, like:


action1(boolean pressed){
    shift = pressed;
    if (key)
        doAction();
}

action2(boolean pressed){
    key = pressed;
    if (shift)
        doAction();
}