Can one modify Fly mode in blender to be active on press/hold of a key? In the Unreal editor, when you hold down the RMB, you can use the mouse to rotate the camera and WASDQE to move around in 3D space. When you let go of the RMB you effectively deactivate Flight mode.

Can one set up something similar in blender? I have a gaming mouse with extra buttons so it would be handy to have a "activate on press" and "deactivate on release" for say the 4th mouse button in blender. 

I find "Fly Mode" indispensable in other software but I find the activation and deactivation in blender to be really clumsy.

Is it possible to customize it the way that I'd want?
Sadly, I don't know of any way to customize it the way you want.
But you can at least assign the command to your custom mouse button.


Press Ctrl + Alt + U to open the Blender User Preferences. Go to the Input rider. You can edit the hotkeys in this context. Expand the 3D View > 3D View (Global) area.

Locate the View Navigation entry and change its hotkey to your mouse button.



With the button you enter fly mode.

You exit and confirm with the left mouse button.

You exit and abort with right mouse button.

Lifting one button couldn't differentiate between those to actions.