Mac OS accelerator keys

Deva - pobox.deva at outlook.in
Wed Sep 13 01:44:11 EDT 2017


Thank you for the response John.

It was nice to know some historical context on this one.

I changed the ~/Library/Application Support/Gnucash/accelerator-map file as you suggested (see sample extract below). First, I had it as "<Meta>b”, “<Meta>l”, etc. Started up gnucash, but nothing was happening when I pressed the Alt+l or Alt+j key on an open account register while I was on a transaction line.

So I closed gnucash, went back and edited the file again to replace <Meta> with <Primary> as shown in the extract here. Started up gnucash again, and used the “Command” key with these letter combinations, but still no effect.

; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/ViewStyleBasicAction" "<Primary>b”)
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/ViewStyleAutoSplitAction" "<Primary>l”)
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/JumpTransactionAction" "<Primary>j”)
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/DuplicateTransactionAction" "<Primary>d”)

I perform these actions fairly frequently on any given transaction register, so I am keen on getting this to work.

Am I missing something?

Cheers,
Deva

On 12-Sep-2017, at 8:09 PM, John Ralls <jralls at ceridwen.us<mailto:jralls at ceridwen.us>> wrote:



On Sep 12, 2017, at 5:30 AM, Deva - <pobox.deva at outlook.in<mailto:pobox.deva at outlook.in>> wrote:

Hello,

I am running Gnucash v2.6.6 on Mac OS Sierra.

This is in response to an earlier post clarifying how to setup keyboard access to frequently performed functions by Christopher Lam (see below). I couldn’t find a way to respond to that specific thread from my daily digest mail, hence this.

I presume that post was about a windows fix. On my Mac, I found a similar file called osx_accel_map under /Applications/Gnucash/Contents/Resources/share/gnucash/ui.

I edited the file (after making a backup of the original file) for the 2 lines mentioned in the earlier post, but instead of "<Primary>j" and "<Primary>l”, I changed it to “<Meta>j” and “<Meta>l” based on other such entries in the file.

I restarted gnucash after these edits, but these accelerator keys don’t seem to work on an open register. I tried pressing both <CTRL> as well as <COMMAND> for the <Meta> key, but with no effect - nothing happens.

Can you please let me know how I can set this up for a Mac?

Deva,

The file you want to edit is ~/Library/Application Support/Gnucash/accelerator-map. The one in the bundle is obsolete and not used.

<Primary> means “Command” on Mac and “Control” everywhere else. <Meta> means “Alt”; on a Mac that’s the Alt/Option key. (The history about that is that I had a spirited discussion with Mitch Natterer of The GIMP about how to map control to command. <command> isn’t a modifier key in Gtk. I wanted to map command to meta, but Mitch insisted that <Meta> should be Alt/Option to be consistent with Linux and Win32. He solved the problem rather elegantly by inventing <Primary>. Shortly after that Mike Alexander improved my accelerator map code in GnuCash to not use osx_accel_map but didn’t remove it in case it might prove useful.)

Regards,
John Ralls




More information about the gnucash-user mailing list