Keyboard Shortcuts

John Ralls jralls at ceridwen.us
Fri Dec 26 13:59:38 EST 2014


> On Dec 25, 2014, at 7:30 AM, By JoVe <jove98 at me.com> wrote:
> 
> Hi,
> 
> with GnuCash 2.6.xx you may not have any success in assigning keyboard shortcuts („accelerators“ in GTK parlance).
> Somewhere between 2.4.13 and 2.6.3 the ability for Mac OS X to assign keyboard shortcuts for menu entries and them to percolate into GnuCash vanished.
> I am running 2.4.13 most of the time for that reason, since I just hate to have to use the mouse (or trackpad) to switch views from one-line to full and vice versa. In 2.4.13 I can assign shortcuts, eg. apple-1, apple-2,… by the OS system control keyboard preference pane.
> 
> Cheers (and a merry Xmas)

I had to turn that off so that when you pasted into a dialog box the text actually went into the dialog box instead of to the window behind it.

To modify accelerator keys -- which apply only to menu items -- you can, when GnuCash is not running, edit the file ~/Library/Application Support/Gnucash/accelerator-map. You can use TextEdit, just be sure to tell it to save the result as plain text. It's a Scheme file, so a ';' starts a comment. Notice that most lines have an empty string (" ") at the end; that's where the accelerator code goes. <Primary> means "Command" on Macs and "Control" everywhere else. Otherwise, <Shift> means shift, <Ctrl> means control, <Alt> means alt/option, and <Meta> means command. You can combine them; if you want to use shift-command-x for an accelerator, put <Shift><Meta>x in the accelerator field of the menu action you want to accelerate and remove the ';' from the beginning of the line.

Bindings can also be configured, but doing so is a bit more involved and requires some understanding of Gtk. If you really want to do that, search the web for "Gtk key bindings" and study the results.

Regards,
John Ralls




More information about the gnucash-user mailing list