Hoping to get some guidance on a spaceship game, in particular setting up input

Thank you SO much for posting this video. It has helped immensely. I have it mostly configured the way I want, however I have 1 more unresolved issue. The movement all functions properly, however the yaw/pitch seem to be set to absolute values. In other words, if I roll my ship upside down, pitch becomes inverted. and if I roll my ship 90, pitch becomes yaw and vice versa. Is there any way to set pitch/yaw relative to ship orientation that you can think of?

thanks again