[GNC-dev] Solved another way: how to extend the selection of predefined actions on a split
paul.dest at web.de
Tue May 1 10:14:02 EDT 2018
Chris, hi again!
Even though GTK doesn't offer the possibility, your approach is still
valid. I just needed to think out of the box... ;-)
i.e. out of the GTK, even out the GnuCash.
The functionality to bind a key to output a text is a pretty generic
one. On Linux Mint 18.3 (Cinnamon 3.6), I realized it by a custom
shortcut binding to "xdotool type 'Paul'" (with a script as wrapper and
some preparations; for details refer to:
So, thank you very much for your suggestion!
Am 01.05.2018 um 12:34 schrieb Paul Dest:
> Hi Chris,
> That could be a very nice solution.
> But (in GTK) it doesn't seem possible to bind an accelerator key to an
> arbitrary string of keystrokes. I have checked the GTK3 docs:
> It explains about the accelerator path:
> The accelerator path must consist of
> “<WINDOWTYPE>/Category1/Category2/.../Action”, where WINDOWTYPE should
> be a unique application-specific identifier that corresponds to the kind
> of window the accelerator is being used in, e.g. “Gimp-Image”,
> “Abiword-Document” or “Gnumeric-Settings”. The “Category1/.../Action”
> portion is most appropriately chosen by the action the accelerator
> triggers, i.e. for accelerators on menu items, choose the item’s menu
> path, e.g. “File/Save As”, “Image/View/Zoom” or “Edit/Select All”. So a
> full valid accelerator path may look like:
> “<Gimp-Toolbox>/File/Dialogs/Tool Options...”.
> Actually, the accelerator path does not need to reference a menu item
> but it must reference an action declared and implemented by the
> application. So, the wanted string of keystrokes have to be coded as an
> action of the application. Hence, a change in the GnuCash application
> itself would be needed.
> Am 30.04.2018 um 23:39 schrieb Chris Good:
>>>> Hi Paul,
>>>> Another solution, which does not cause extra work each time you
>>>> upgrade, would be to program a function key to output "Paul".
>>>> I haven't tried this myself but I think it should be possible to do
>>>> this by modifying a gtk3 user configuration file which doesn't get
>>>> clobbered by an upgrade.
>>>> See https://wiki.gnucash.org/wiki/GTK3
>>>> Regards, Chris Good
More information about the gnucash-devel