Message Boards Message Boards

GROUPS:

Change key bindings in Mathematica 11 on Mac?

Posted 5 years ago
6108 Views
|
3 Replies
|
4 Total Likes
|

Mathematica 11 introduced a new key binding Option+O to toggle Cell > Cell Properties > Open, both left and right Option keys are bound. This is annoying since in many languages right Option + O is used to input special characters like 'ó'. For the last two hours I've been trying to remove or change this binding to no avail. This is also related to setting custom MenuSetup.tr files. Any help will be greatly appreciated.

3 Replies

It seems that I managed to solve the above problem. The solution, described below, seems to work but I am not sure if this is the right way of setting custom menus, so any comments will be appreciated.

Step 1

Create the following directory (I didn't have it out of the box).

$UserBaseDirectory/SystemFiles/FrontEnd/TextResources

Step 2

Copy the following file

$InstallationDirectory/SystemFiles/FrontEnd/TextResources/Macintosh/MenuSetup.tr

to the directory created in the first step.

Step 3

The structure of the file MenuSetup.tr is quite obvious. Find the line

MenuItem["Open", CellOpen->Toggle, Scope->SelectionCell]

and move it to the end of the menu Cell (that is, it cannot be nested, I have no idea why). It should look like

MenuItem["Show Expression", "ToggleShowExpression", MenuKey["E", Modifiers->{"Command", "Shift"}]], Delimiter, MenuItem["Open", CellOpen->Toggle, Scope->SelectionCell, MenuKey["o", Modifiers->{"Control"}]]

The part MenuKey["o", Modifiers->{"Control"}] is added and changes the offending binding. Restart Mathematica.

Still, I would love to have a proper documentation on configuring Mathematica including setting up own menus, initialization files, keyboard shortcuts and so on.

Posted 11 months ago

Did you need to do anything specific to get Mathematica to recognize the new MenuSetup.tr file in the \ $UserBaseDirectory folder? In Windows (could be different), even after restarting Mathematica it seems to default to the original \$InstallationDirectory MenuSetup.tr file.

No, I don't think I needed to do anything.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract