Mac OS accelerator keys

John Ralls jralls at ceridwen.us
Wed Sep 13 20:40:26 EDT 2017



> On Sep 13, 2017, at 8:20 AM, John Morris <johnjeff at editide.us> wrote:
> 
>> On Sep 13, 2017, at 4:35 AM, Deva - <pobox.deva at outlook.in> wrote:
>> 
>> One peculiar observation though. I used <Primary> as a tag on some shortcuts while tagging the others with <Meta>. I was expecting the <Primary> ones to invoked by using <command>+key and the <Meta> ones to be invoked by using <Alt>+key.
>> 
>> However, on launching gnucash, all menu options get converted to <command>+key and can be invoked only by the <command> key (even the ones meant for invoking by the <Alt> key).
>> 
>> So, I closed gnucash and went back and looked the accelerator-map file again. And it looks like all the lines I edited with the <Meta> tag have been converted back to use <Primary> tag.
> 
>  I suspect that this is due to the fact that, on a Mac, the option key cannot be used by itself to fire a command. All "normal" keyboard shortcuts on a Mac must involve at least one of the Command or Control keys. There are apparent exceptions to this rule, but they are all either special functions of the operating system (such as accented characters) or specially programmed features in particular applications (such as using unmodified keys to access tools in various drawing programs).

Right.

That limitation applies to menu accelerator keys because MacOS controls the menu system unlike most other window managers. The reason for the limitation is quite practical: Apple uses alt/option to extend the keyboard, for example option-a is å, option-e makes a combining accent-grave, shift-option-8 is ° (as in 23°C). It is possible to assign alt/option-only accelerators to non-menu controls like those tools in a photo editor or to buttons on a dialog box, but one must be careful not to interfere with text entry… so if that dialog box has a text field in it and you set option-o to be the accelerator for the OK button, you won’t be able to type ø in the text field.

Regards,
John Ralls




More information about the gnucash-user mailing list