1
$\begingroup$

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?

$\endgroup$

4 Answers 4

2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ amazing this works even in 2.8! $\endgroup$ May 19, 2019 at 0:49
0
$\begingroup$

I was able to set such behavior with the following steps in the Blender2.8 keymap.

  1. Added “Pan View ([view3d.move] command)” to 3DView> 3DView (Global). Registers the keyboard space bar in "Click Drag" mode.

  2. Uncheck "Frames> Play Animation" if you don't want it to conflict with animation playback.

$\endgroup$
0
$\begingroup$

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 :)

$\endgroup$
2
  • 1
    $\begingroup$ MS Windows only? $\endgroup$
    – batFINGER
    Jan 27, 2020 at 15:18
  • $\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$
    – JoelArt
    Jan 27, 2020 at 17:07
-3
$\begingroup$

no :) click shift and middle mouse button and drag the mouse to strafe across the screen.

$\endgroup$
2
  • 2
    $\begingroup$ This is incorrect, you can customize most default mappings $\endgroup$ May 18, 2019 at 15:38
  • $\begingroup$ So what do I have to customize it to map it? $\endgroup$ May 18, 2019 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.