denemo-devel
[Top][All Lists]
Advanced

[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, 22 Sep 2020 16:11:25 +0100

On Tue, 2020-09-22 at 08:14 -0400, aaron mehl wrote:
> Well, it seems that my problem is something else. I started denemo
> from the terminal and now I see that it is loading a different hard-
> code-mode then the one I am working on. I had it appears lots of
> dups...
> could you please repeat for me where I put the files?
> the hard coded note scripts go where?

You can put your new menu items in any menu, but you would naturally
choose (in the Object Menu)

Notes/Rests ▶ Append/Edit Note

and put your new menu items below that.
If you are doing this by copying the .scm and .xml files by hand then
you would need to select the equivalent directory

~/.denemo-<version>/actions/menus/ObjectMenu/NotesRests/

and copy the .scm & .xml files there (or, better, create a subdirectory
there and copy to that).


> The hard-code-mode script goes where?

The natural place for that would be 
Main Menu ▶ Input ▶ PC Keyboard

for which the disk location is

~/.denemo-<version>/actions/menus/MainMenu/Input/Keyboard

If you just move the .scm and .xml files there this will not by itself
cause Denemo to load them on start up - to do that you can use the
right-click->More Commands in the menu you are adding to, or, (more
dangerous) edit the Default.commands file to include entries for the
new commands.

HTH

Richard


> Thanks,
> Aaron
> btw I only saw this when I started denemo from the terminal.
> 
> 
> Sent from Mailspring, the best free email app for work
> On Sep 22 2020, at 7:57 am, aaron mehl <mehlzaidy770@gmail.com>
> wrote:
> 
> 
> Sent from Mailspring, the best free email app for work
> On Sep 22 2020, at 3:34 am, Richard Shann <richard@rshann.plus.com>
> wrote:
> On Mon, 2020-09-21 at 21:41 -0400, aaron mehl wrote:
> 
> 
> You have <Shft+s> instead of "Shft+s"
> which is wrong and will cause an error message in the terminal from
> which you run Denemo (if you run Denemo in a terminal).
>  Very strange this is something that was corrected early on  it seems
> I must not of saved it or I overwrote it.
> Thanks,
> Aaron
> Also I see an advantage of opening denemo from the terminal...
> 
> 
> 
> 
> > (d-AddKeybinding "hardcoded-bdown" <s>)
> > (d-AddKeybinding "hardcoded-bmid" <ctrl+s>)
> >
> > When I try any shortcut keys that are not standard note entry  keys
> I
> > hear a snare drum and nothing happens
> > (d-AddKeybinding "hardcoded-a" <A>)
> > (d-AddKeybinding "hardcoded-adown" <a>)
> > (d-AddKeybinding "hardcoded-amid" <ctrl+ a>)
> > (d-AddKeybinding "hardcoded-b" <S>)
> > (d-AddKeybinding "hardcoded-bdown" <s>)
> > (d-AddKeybinding "hardcoded-bmid" <ctrl+s>)
> > (d-AddKeybinding "hardcoded-c" <C>)
> > (d-AddKeybinding "hardcoded-c2" <c>)
> > (d-AddKeybinding "hardcoded-cdown" <ctrl+c>)
> > (d-AddKeybinding "hardcoded-d" <D>)
> > (d-AddKeybinding "hardcoded-ddown" <ctrl+d>)
> > (d-AddKeybinding "hardcoded-e" <E>)
> > (d-AddKeybinding "hardcoded-eup" <e>)
> > (d-AddKeybinding "hardcoded-edown" <Ctrl+e>)
> > (d-AddKeybinding "hardcoded-f" <F>)
> > (d-AddKeybinding "hardcoded-fdown" <f>)
> > (d-AddKeybinding "hardcoded-g" <g>)
> > (d-AddKeybinding "hardcoded-gdown" <G>)
> >
> > I did each one and these shortcuts don't work.
> > Any help would really help
> > Aaron
> > Sent from Mailspring, the best free email app for work
> > On Sep 18 2020, at 8:34 am, aaron mehl <mehlzaidy770@gmail.com>
> > wrote:
> > Well I did test each file and they all worked but I didn't click on
> > the menu item to see if it caused the proper result, my shortcoming
> > it seems.
> > So I will take a few steps back and then I  can move forward.
> > Thanks,
> > Aaron
> > p.s. us non techies find detailed instructions like on these emails
> > most helpful.
> >
> > Sent from Mailspring, the best free email app for work
> > On Sep 18 2020, at 7:32 am, Richard Shann <richard@rshann.plus.com>
> > wrote:
> > On Fri, 2020-09-18 at 05:49 -0400, aaron mehl wrote:
> > > Hi Richard thanks for the heads up, you were right I needed to
> post
> > > the script in order to  get it working.
> > > The conventions you mentioned of <> () ""  are they discussed in
> > the
> > > docs since I am totally a newbie on this it would be nice to have
> > had
> > > this written out.
> >
> > well the convention of writing <your name> meaning that you write
> > your
> > name in the place where <your name> appears is just a common
> parlance
> > among techies.
> > The () are the indicators for a list in the Scheme programming
> > language
> > - the most fundamental bit of syntax. The "" are also Scheme syntax
> > denoting a string.
> >
> > But the convention that the Scheme procedure corresponding to a
> > Denemo
> > command of name <thecommandname> is d-<thecommandname> is mentioned
> > in
> > the docs in section 29, Writing Scheme Scripts.
> >
> > However, most people pick up this stuff by seeing examples and by
> > testing out a small sample. So before creating all 18 shortcuts it
> > would make sense to create just one of the note-insertion commands,
> > check that it works when executed from the menu, then create just
> one
> > of the (d-AddKeybinding ...) procedures and test it out by
> executing
> > it
> > in the Scheme window and seeing if the keypress does indeed execute
> > the
> > desired command and then turning that into the mode-switch command.
> > When that is working you would add more of the same using the
> right-
> > click->"Save Script from Scheme Window" to override the first
> version
> > of your mode change command with the new keybindings.
> >
> > HTH
> >
> > Richard



reply via email to

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