How to create a custom keyboard shortcut for this nested menu item? I know how to create a shortcut; it is described on Apple website here. However, I came across a tricky case: I want to create a shortcut for the TextEdit application, particularly for setting the writing direction to Right to Left. The hierarchy for this is shown below:



I think that the problem is with the Paragraph word written in grey.

I've tried

Format-&gt;Text-&gt;Writing Direction-&gt;Right to Left


and

Format-&gt;Text-&gt;Writing Direction-&gt;Paragraph-&gt;Right to Left


and others, but none have worked.

How can I solve this issue?
It doesn't matter that it's a command on a nested menu. Just create a proper entry, and in this case for the Right to Left command under Paragraph, it's:

'   Right to Left'


Without the single quotes and that's a leading tab space in front of Right to Left.

Note: You will need to copy and paste the '    Right to Left' (without the quotes from a text source other then this answer because AD converts tab characters to space characters), as you cannot key press a tab when creating the entry.

Here are some screenshots from my system:





Note: For the Right to Left command under Selection there are two leading tab spaces, e.g. (without the quotes):

'       Right to Left'


The quotes in both examples are there to show there is leading tab space in front of the actual command names, although note that AD converts tab characters to space characters in these examples.