1
$\begingroup$

I'm running Blender on a fairly customized linux distribution and Alt is already taken by another program. I therefore wonder if there's an easy way to change to modifier key Alt to Super key globally?

$\endgroup$
1
$\begingroup$

There is! This is for Blender v2.8-rc1.

Open Edit -> Preferences... from the menu bar, select Keymap from the left sidebar, and then Export... in the top right to export your current keymap. In the dialogue that opens, check the Export Key Configuration -> All Keymaps box.

Save the keymap somewhere. In the keymap file, replace every instance of "alt" (including the quotes) with "oskey". Go back to the Keymap pane in the Blender preferences and import your changed keymap. Whenever this keymap is selected, all the shortcuts in your previous keymap that used Alt will now use Super.

Of course, if you're already using OSkey for some shortcuts, this solution may cause collisions. The default keymap for Blender under Linux doesn't use it at all, though, and I assume based on your question that you haven't modified it to.

As a side note, there isn't actually a way to tell Blender to use Super in place of Alt globally below the keymap level, as far as I can tell, short of patching it to do so. Blender only understands four modifier keys, Shift , Ctrl, Alt , and OSkey. OSkey represents a different key depending on the OS: Super under Linux, ⊞ Win under Windows, and ⌘ Command under macOS.

Shortcuts consist of a single key other than those four plus some combination of them. All keycodes are hardcoded with no way to change them in Blender's configuration; the raw keycodes seem to be in source/blender/windowmanager/wm_event_types.h but I'm not sure how they correspond to keycodes outside of Blender.

However, you might be able to patch source/blender/makesrna/intern/rna_wm.c, changing the item(s) for the key(s) you want to use in place of Alt in rna_enum_event_type_items[] (OSKEY, in this case) to use the values in the items for LEFTALTKEY or RIGHTALTKEY. I haven't actually tried this, so I'm not positive it would work; it would be a hacky solution if it did, but I'm not sure there's a better way without making big changes to Blender.

$\endgroup$

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.