Hi Paul, Nice solution. Thanks for sharing. I wonder if it will work under wayland...
If you have time, maybe you can share with GnuCash-User? I remember several questions about modifying the Action list over the years. Regards, Chris Good > On 2 May 2018, at 12:14 AM, Paul Dest <paul.d...@web.de> wrote: > > 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: > https://unix.stackexchange.com/questions/36922/keyboard-shortcut-to-send-text-strings-to-program > ). > > So, thank you very much for your suggestion! > Paul > >> 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: >> https://developer.gnome.org/gtk3/stable/gtk3-Accelerator-Maps.html >> 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. >> >> Regards, >> Paul >> >> 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 > > _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel