Page MenuHome

Keybindings - the alternate modifier field allows mouse input but does not work
Closed, ResolvedPublic


Currently Blender allows the user to select any key as a modifier key for keybindings. This will work ONLY for keyboard commands that do not involve the mouse in any way. The current UI implies that you should be able to bind mouse events, tweak events, and NDOF events.

Current Working Implentation (How it works):
1. Go to File-> User Preferences->Input Tab
2. Open 3D View->3D View (Global)->View Selected
3. In the empty box next to the line reading on the right of the panel type a Q
4. Note in 3d View that Q+Numpad . now works as intended.

Current Broken Implementation: (Mouse)
1. Go to File-> User Preferences->Input Tab
2. Open 3D View->3D View (Global)->View Selected
3. Change the top dropdown to Mouse
4. Note in the 3d View that Q+Left Mouse does not View Selected (The modifier key is not taken into account

Current Broken Implementation: (Tweak)
5. Change the top dropdown to Tweak
6. Note Holding Q+Left Dragging the mouse does not do the intended View Selected (Removing the Q and adding ctrl & alt will work)

Note: You should make sure that additional mouse buttons work with both the tweak and mouse as modifier keys. The current keymap I am trying to build would use Mouse buttons 4 & 5 as modifiers to allow for very ergonomic keysetups. Note that there are mice on the market now that have 20 buttons (

Event Timeline

You're running into keymap conflict here -- Set Cursor operator is using left mouse and it goes before View Selected in list of keymaps. If you'll change this to something else you can bind operators to Q+Left Mouse.

This probably could be improved a bit by checking whether there are key modifiers (like checking whether Q is pressed) before invoking operator -- currently only Ctrl/Shift/Alt are checking. Not sure if it'll backfire somewhere. Also it wouldn't solve all the issues -- there would still be issues with operators triggering by tweak, click, press, release of mouse buttons.

This is all known issues listed in our TODO wiki page and not currently considered a bug. So thanks for the report, but closing it now.

P.S. Q+Button 4 and 5 works fine here, so this shouldn't be an issue with 20 button mouse (couldn't verify it since i've got only 5 buttons)

You misunderstand:

The modifier is set to the mouse button, not the Q. So NOT Modifier Q + left mouse (which works) but modifier left mouse + Q (does not work) but that is a bad example.
Try binding something to Q using mouse button 4 - which should not have any conflicts. It won't work. Additionally the tweaks don't work.

This bug report was submitted at the request of Campbell (ideasman_42) and added to the todo list by me also at his request. Please reopen.

Well, you indeed can not use mouse as a modifier. Not currently sure how challenging it'll be to support this. But if it'll be challenging probably better would be to disable mouse from being able to be used as a modifier.

Campbell, did you start looking into this already or somebody else could go ahead?

I didn't code nor intend mouse presses to be modifier keys as well. The event system only handles keyboard events here. The tooltip hints this as well. The fact the button allows it as input is because of code-reuse. I will fix this, also allowing ESC to restore the button. Commit goes to svn shortly.

Mouse events are handled in code separately from keyboard events. In theory we can unify this, allowing both to be modifiers, but it's beyond my focus currently.

My preference is to carefully check on multi-touch first, to ensure our event handling is capable of handling states of devices in parallel.

Ton Roosendaal (ton) changed the task status from Unknown Status to Resolved.Oct 20 2012, 4:11 PM