Difference between revisions of "Keyboard Shortcuts"

From GnuCash
Jump to: navigation, search
m (Keyboard Shortcuts - Add link to GTK3 in GnuCash Wiki)
m (Bindings - Remove extraneous [[)
Line 60: Line 60:
 
   unbind "<ctrl>v"
 
   unbind "<ctrl>v"
 
}
 
}
[[
+
 
 
  class "GtkWidget" binding "gtk-alt-edit"
 
  class "GtkWidget" binding "gtk-alt-edit"
 
</Syntaxhighlight>
 
</Syntaxhighlight>

Revision as of 23:55, 14 May 2018

Some keyboard shortcuts in GnuCash (also in German: De/Tastenkürzel).

Caution
Currently this page is still based on GTK2 while GnuCash 3.x uses GTK3.
Note
The initial text is just copied from the tip-of-the-day. Feel free to edit the list as you like.

Main Window

  • To switch between multiple tabs in the main window, press Control+Alt+Page Up/Down (Control-Option-Page Up/Down on a Mac.) Note that the notebook has to have keyboard focus, and you might have to hit Tab once or twice to obtain that.
  • To expand a place holder account in the tree view of the main window account page, use Tab to select the place holder account, then press Shift + right-arrow (the arrow key on pc-keyboard), to collapse the tree view of any place holder account press shift + left-arrow

Register window

  • As you enter amounts in the register, you can use the GnuCash calculator to add, subtract, multiply and divide . Simply type the first value, then select +, -, *, or /. Type the second value and press Tab or Enter to record the calculated amount.
  • Quick-fill makes it easy to enter common transactions. When you type the first letter(s) of a common transaction description, GnuCash will automatically complete the remainder of the transaction as it was last entered.
  • Type the first letter(s) or the plain account # of an existing account entry in the Transfer register column, and GnuCash will complete the entry from your list of accounts. For subaccounts, type the first letter(s) of the parent account, followed by ":" and the first letter(s) of the subaccount (e.g. A:C for Assets:Cash.)
  • Want to see all your subaccount transactions in one register? From the main menu, highlight the parent account and select Accounts -> Open Subaccounts from the menu.
  • When entering dates, you can type + or - to increment or decrement the selected date. You can use + and - to increment and decrement check numbers as well.
  • To raise the accounts menu in the transfer field of a register page, press the Menu key or the Ctrl-Down key combination.
  • To jump to the blank transaction at the bottom, Shift+PgDn.

Reconcile Window

  • In the reconcile window, you can press the spacebar to mark transactions as reconciled. You can also press Tab and Shift-Tab to move between deposits and withdrawals.

Modifying Keyboard Shortcuts

First, it's important to understand that in Gtk there are two kinds of keyboard shortcuts, accelerators and bindings. The former operate on menu items; they're displayed to the right of the menu item when you use the mouse to view the menu, while the latter operate directly on widgets. The copy, cut, and paste actions will use both depending upon whether there's a menu that operates on the widget with focus.

Accelerators

Under Linux hot keys can be created or reassignated. Open a terminal and type:

gsettings set org.gnome.desktop.interface can-change-accels true

Note: The program gsettings is part of a package like glib2-tools.

exit, close everything, log out, and back in again. Now when you open GnuCash, if you hover the mouse over any of the menu selections, you can type a shortcut combination, and it will "stick". When you exit your options will be saved to ~/.gnucash/accelerator-map and you can edit by hand if you want, just don't try while GnuCash is running, or it will overwrite your changes on exit.

The accelerator map can also be edited on Windows (where it's somewhere like C:\Users\USERNAME\.gnucash\accelerator-map in the case of Vista) or Mac (where it's ~/Library/Application Settings/Gnucash/acclerator-map).

In the accelerator map, lines beginning with a semicolon (;) are commented out; the semicolon must be removed for your new shortcut to take effect.

The ability to change accelerators from the GUI works only in Linux.

Bindings

Customizing bindings is done by editing the file .gtkrc-2.0 in the user's Home directory (.gtkrc-2.0-gnucash if you're using the Mac application bundle). To substitute new keybindings for the copy, cut, and paste actions, add something like this to .gtkrc-2.0:

binding "gtk-alt-edit"
{
  bind "<alt>x" { "cut-clipboard" () }
  bind "<alt>c" { "copy-clipboard" () }
  bind "<alt>v" { "paste-clipboard" () }
  unbind "<ctrl>x"
  unbind "<ctrl>c"
  unbind "<ctrl>v"
}

 class "GtkWidget" binding "gtk-alt-edit"

This will change the bindings from e.g control-c to alt-c. Note that if one leaves out the unbind lines both shortcuts will work.