I am posting this here as it is sort of relevant.... 
Once you have your pitch and roll, you'll want to toggle it to perform in-cockpit view, pan & scan, etc 
To bind a mouse key to a normal keyboard function, use this example...   
SOLVED: DCS World (Ka50 Black Shark 2) 
Clickable mouse cockpit mode On/Off -- LAlt + C   
 Mouse.LUA 
 
function layout()
return {
keyCommands = {
{combos = {{key = "MOUSE_BTN3"}, }, 
down = iCommandViewTransposeModeOn, 
up = iCommandViewTransposeModeOff, 
name = "Camera transpose mode on/off", 
category = "View Cockpit"
},
{combos = {{key = "MOUSE_BTN4"}, }, 
pressed = iCommandCockpitClickModeOnOff, 
down = iCommandCockpitClickModeOnOff, 
up = iCommandCockpitClickModeOnOff, 
name = "Clickable mouse cockpit mode On/Off", 
category = "General"},
},
axisCommands = {
{combos = {{key = "MOUSE_X"}, }, 
action = iCommandPlaneViewHorizontal, 
name = "Camera Horizontal View"},
{combos = {{key = "MOUSE_Y"}, }, 
action = iCommandPlaneViewVertical, 
name = "Camera Vertical View"},
{combos = {{key = "MOUSE_Z"}, }, 
action = iCommandPlaneZoomView, 
name = "Camera Zoom View"},
},
}
endI set all three modes - Presssed, Down & Up ('Action' I assume is the mouse motion, so I left it off) and it worked a treat.   
(Sidewinder Mouse on Win 64bit)