[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: putting it all together was scheme custom keymap

From: Richard Shann
Subject: Re: putting it all together was scheme custom keymap
Date: Tue, 15 Sep 2020 18:12:46 +0100

On Tue, 2020-09-15 at 12:36 -0400, aaron mehl wrote:
> I saved them all in the .denemo_xxx/action/ directory

you meant, "actions" I presume. Putting a file with extension .commands
there will not achieve anything. The file needs the extension .scm
(because it is a Scheme script) and it needs to be in the right place
under actions/menus to appear in the correct menu, when loaded. It also
needs a file of the same name but with extension .xml which gives the
other information about this command (its name, label etc). And then it
needs an entry in the Default.commands file to say where it is and if
it should be loaded by default - it is safest to achieve that by
loading the command with the "More Commands" command, since errors in
the Default.commands file will stop Denemo starting up.

All those steps (saving the .scm and .xml files and adding an entry to
Default.commands) can be done from within Denemo using the right-click
-> Save as New Menu Item dialog and choosing to save your new commands
on exiting Denemo. But is is admittedly quite tedious with such a large
number of new commands - I suggest choosing to place them in a Submenu
when you run the right-click -> Save as New Menu Item dialog.

The files you sent look ok - they should have .scm extensions though
(which will be done automatically if you load them into the Scheme
window and then right-click -> Save as New Menu Item)
The script file you haven't sent is the one that sets shortcuts for all
your different notes - this command you have called "hard-code-mode"
and have set the shortcut "r,r" for it. 
So when you have finished you will have a file called 

which will contain over a dozen lines like

(d-AddKeybinding "hardcodedG" "<shortcut name>")

one for each of your commands, along with hard-code-mode.xml



reply via email to

[Prev in Thread] Current Thread [Next in Thread]