Remove Hard-Coded Keymap Items
Closed, ResolvedPublic

Description

A few keymap items are still hard-coded in C. These should be removed and implemented in Python through the normal keymap instead.

Hard-coded Keys

  • I to insert keyframe on a value

//Edit, there are quite a few others remaining,
see: https://www.blender.org/manual/interface/common_shortcuts.html

Details

Type
To Do

Basically the entire keymap to interact with buttons and panels is hardcoded, and we can make this partially configureable without too much effort. So what you could configure is keys like E eye dropper, I insert keyframe, D insert driver, K keying sets.

The other part like mouse clicks on buttons, up/down keys in a menu, backspace to remove text, etc would not be configureable but that's not a usual thing to be able to configure anyway, as the way all those things interact is necessarily quite complex and not something you want to expose.

For developers: this requires adding a UI 'modal' keymap (the name is a bit poor but these keymaps are used now during modal tools and this is basically the same kind of data structure we need). This then needs to get used in the UI code somehow in the place where these particular shortcut keys are used, where rather than checking the hardcoded event values you look them up in the keymap.

The eye dropper, insert keyframe, insert driver, etc are the only things that need to be configurable I think. They're so closely related to similar behaviors, such as Insert Keyframe in the 3D View.

The other things, like backspace don't need to be configured. I think so far as the user is concerned those are basically OS level keys (even if they're not technically.)

It would be a better idea to add a button on the menu window Header. this button when clicked shows a ghost window (=with transparency), this window contain a keyboard layout where you can see and/or configure your key map.

@Nadir (organicoman) I'm not sure I understand what you're referring to. But I believe you're suggesting a different way of accessing and editing the user keymap? If so that's completely unrelated to this task.

How about making the XYZ axes shortcuts remappable?
I think it's quite reasonable for (at least) two reasons:

  • Those who had experience with Maya usually prefers to use ZXC instead of XYZ since it's much easier to reach.
  • I heard a lot of complains from people who are using non conventional keyboards (like TrulyErgonomics or Ergodox), saying that they'd rather use the manipulator widget since the Y key is located too far.

I'd like to add that trackball rotate and edge slide both also seem to be hard-coded.
If they could be changed, it'd also provide a workaround until the "event system" issue is resolved (T40537)

Julian Eisel (Severin) closed this task as Resolved.Sep 21 2016, 10:46 PM

Finally found a surprisingly easy way to support operators with custom keymaps for UI (rB84b1d67b6, rBd10f54ee75) and added support for customizing shortcuts of...

Will close this task for now, if there are shortcuts that should get customization support we can do that as part of usual development. Don't think we really need to have a task sitting around at least.