So right now when I want to move the view I use shift middle mouse button and move. But is it possible to move the view with spacebar and moving the mouse?
4 Answers
In Blender 2.79 (and maybe 2.8, but I haven't seen that) go to File/User Settings, click on the Input tab at the top, and there you have the different areas with their commands and hotkeys. At the top is a field where "Name" is written - click on that and change it to "key binding" then you can type in the known hotkey in the Search field, (where there's a magnifying glass) to find the command you want, and then you can change it.. I typed "shift" and "middle" and before I typed "mouse button" the command was shown underneath with the hotkeys next to it - you can click on "mouse" and change it to keyboard, then in the field beside it and press on the spacebar
Edit - I just reread your question and you want it to be Spacebar plus Mouse - so try clicking around and finding out what your options are - that's the place to do it anyway.
-
$\begingroup$ amazing this works even in 2.8! $\endgroup$ Commented May 19, 2019 at 0:49
I was able to set such behavior with the following steps in the Blender2.8 keymap.
Added “Pan View ([view3d.move] command)” to 3DView> 3DView (Global). Registers the keyboard space bar in "Click Drag" mode.
Uncheck "Frames> Play Animation" if you don't want it to conflict with animation playback.
I've made an AutoHotkey script that uses Spacebar + Mouse Buttons to send the default Blender keymap navigation commands as well as allowing for Animation/Tool/Search behaviour via spacebar to still work as expected if space is just taped without trying to navigate.
I should add that it's possible to set up navigation in Blender using Spacebar without Autohotkey but you get RMB context menu conflicts and loses the native spacebar Animation/Tool/Search functionality.
EDITED (2020-03-22): I've replaced the code with a newer one that alleviates a previous bug I coudn't solve where LMB clicking suddenly stops working if using the "Send/SendEvent" command. Now I'm using Click command only and it works as expected.
EDITED (2021-05-13): Simplified a some parts.
; JoelArt | 2021-05-13
if not A_IsAdmin {
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
#IfWinActive ahk_exe blender.exe
#NoEnv
#Persistent
#SingleInstance Force
SetKeyDelay,-1
SendMode Input
$Space::
start := A_TickCount ; measure current time.
KeyWait, Space ; wait for Space to be released.
duration := A_TickCount - start ; calculate if Space was held for less than ### ms.
if (duration < 180){ ; if so
SendEvent, {Space} ; send Space else send nothing.
}
return
$LButton::
if GetKeyState("Space", "p"){ ; If Spacebar is being held down while Mouse button is pressed.
Send {MButton Down}
KeyWait, LButton
Send {MButton Up}
return
} else {
Click, down ; Click is necessary over Send as the button sometimes stops responding for unknown reasons.
KeyWait, LButton
Click, up
return
}
return
$RButton::
if GetKeyState("Space", "p"){
SendEvent, ^{MButton Down}
KeyWait, RButton
SendEvent, ^{MButton Up}
Return
} else {
Click, down, Right
KeyWait, RButton
Click, up, Right
return
}
return
$MButton::
if GetKeyState("Space", "p"){
SendEvent +{Mbutton down} ; Use SendEvent "+" so not to trigger the shift+space command in Blender.
; Middle mouse seems to work differently for some Logitech mouses so comment out these lines -->.
; KeyWait, Mbutton
; SendEvent, +{Mbutton Up}
; <-- to here.
Return
}
else {
Click, down, Middle
; Middle mouse seems to work differently for some Logitech mouses so comment out these lines -->.
; KeyWait, MButton
; Click, up, Middle
; <-- to here.
Return
}
; Middle mouse seems to work differently for some Logitech mouses so use these lines instead. These are not needed with a mouse that works as intended -->.
MButton up::
SendEvent {Mbutton up}
Return
; <-- to here.
Copy the code and save it as ****.ahk file and run it after installing the Autohotkey program.
Note that in order for RMB to not trigger the context menu during navigation you need to go into Prefs > Keymap> and search for Key-Binding "Right Mouse" and change all the ones with "context menu" in the views and editors where you navigate, like Object Mode, Mesh, Node, UV Editor, etc. Open the each tab and change "Press" to "Release" and it will work just fine.
Finally, if, you get weird mouse click behaviours, has happened to me a few times, just do ctr+alt+del and click "task manager" on windows and things should go back to normal, if not, exit and relaunch blender and possibly the scipt again.
I use this setup daily and it has worked really well for me :)
-
1
-
$\begingroup$ I created this on Windows as I don't have an easy access to IOS but if Autohotkey works on Mac then it could potentially work right out of the box or maybe with some modifications. $\endgroup$– JoelArtCommented Jan 27, 2020 at 17:07
no :) click shift and middle mouse button and drag the mouse to strafe across the screen.
-
2$\begingroup$ This is incorrect, you can customize most default mappings $\endgroup$ Commented May 18, 2019 at 15:38
-
$\begingroup$ So what do I have to customize it to map it? $\endgroup$ Commented May 18, 2019 at 16:50