Switching between views using key shortcuts?

 From:  Jacob
4818.1 
What is the proper inline script for changing the view between 3D/Top/Front/Right for v2 and v3 beta?

I found this little bit
code:
script:moi.ui.mainWindow.viewpanel.mode = 'front';
but it does not appear to be doing anything, at least in v3Beta.