denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Re: Denemo-devel: Key bindings


From: Richard Shann
Subject: [Denemo-devel] Re: Denemo-devel: Key bindings
Date: Tue, 06 May 2008 09:08:20 +0100

Hi,
Denemo has moved to Savannah - and, worse still we have no control over
the sourceforge site, which has become an orphan. So please use
denemo <address@hidden>
for emails.
The keybindings you have written a patch for are being phased out - the
file standard.accels holds keyboard accelerators which are the ones that
are supposed to be used. They are defined by right-clicking on menu
items (or checking edit->keyboard setup->allow quick shortcut edits and
pressing a key when on a menu item).
 I think something is wrong with the CVS/distribution - perhaps that the
standard.accels file that is distributed does not have the main
keypresses defined, so that the old keybindings are kicking in. I'll
look into this.
Richard

On Tue, 2008-05-06 at 00:25 -0700,
address@hidden wrote:
> ------------------------------
> 
> Message: 6
> Date: Fri, 2 May 2008 21:57:04 +0200
> From: Jean-Ren? Reinhard <address@hidden>
> Subject: [Denemo-devel] Key bindings
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi,
> 
> I'm rather new to denemo. I had to set it up for my girlfriend. I have come
> across several usability issues, which I would like to report.
> 
> I checked out the cvs today, but I just saw plans to move to git on the 
> archives
> of the devel list. Is the cvs still the reference? Is the git repository 
> already
> set up? If it is the case, where can it be fetched?
> 
> The issues I would like to tackle today are keybindings issues. As almost 
> every
> interaction with the score are made through keybindings, it's rather 
> important.
> When I first tried denemo, the default keymap was unusable, because notes 
> could
> not be entered. I managed to change the keymap to use denemo, but since the
> keymap configuration is not documented, it's rather awkward.
> 
> After some exploration of the source code, I think I solved the issue. Denemo
> stores the keybindings in a two level hashtable. When given a GdkKeyEvent, it
> checks for a keybinding, using as the first key the modifiers of the event, 
> and as second key the keyval of the event. The issue stems from that Gdk 
> interprets Shift to modify the keyval, and denemo also uses Shift as a 
> Modifier. For example, on my azerty keyboard, I need to press Shift+& to get 
> a keyval for 1. However when pressing Shift+&, the GdkEvent contains (mod : 
> Shift, keyval : 1). The keyval is ok, but not the modifier. If I want to use 
> this binding, I have to use :
> <bind>Shift+1</bind>, which is weird. One could document this behaviour, but I
> think it should be avoided, since one should change the denemo keymap for 
> every
> system keymap. Another solution would be to stop using Shift as a modifier
> inside denemo. This solves the issue. I attach a patch that does just that.
> 
> Another issue considering the keymap configuration is that the action names
> depends on the locale of the system on which denemo is build. When I compiled 
> denemo earlier today, this was rather misleading. If I give a binding to 
> InsertQuarterNote, the binding will just be ignored. Once again, this is not 
> documented. Furthermore, no keymap file containing the actions name can be 
> found in the cvs tree. One has to  build it from the appropriate po file. I 
> can provide a defaut keymap file for my langage and document this really 
> weird behaviour. But I really wonder what is the rationale behind this 
> behaviour, since the useful action names depends on the locale of the system 
> where denemo is build, not of the locales of the system where it is used.
> 
> Hopes this helps,
> 
> Cheers,
> Jean-Ren?
> 
> 
> -------------- next part --------------
> Index: kbd-custom.h
> ===================================================================
> RCS file: /cvsroot/denemo/denemo/src/kbd-custom.h,v
> retrieving revision 1.6.2.3
> diff -u -r1.6.2.3 kbd-custom.h
> --- kbd-custom.h      14 May 2006 19:04:01 -0000      1.6.2.3
> +++ kbd-custom.h      2 May 2008 18:55:11 -0000
> @@ -11,9 +11,11 @@
>  #include <limits.h>
>  #include <gdk/gdk.h>
>  #include <denemo/denemo.h>
> -
> +/*
>  #define MASK_FILTER(state) state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK \
>                                   | GDK_MOD1_MASK)
> +*/
> +#define MASK_FILTER(state) state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)
>  
>  struct name_and_function
>  {
> Index: keyboard.c
> ===================================================================
> RCS file: /cvsroot/denemo/denemo/src/Attic/keyboard.c,v
> retrieving revision 1.1.2.12
> diff -u -r1.1.2.12 keyboard.c
> --- keyboard.c        5 Jan 2007 20:49:21 -0000       1.1.2.12
> +++ keyboard.c        2 May 2008 18:55:12 -0000
> @@ -30,17 +32,21 @@
>    if (0 == strcmp (key, "Ctrl"))
>      ret = 4;
>    else if (0 == strcmp (key, "Shift"))
> -    ret = 1;
> +  //  ret = 1;
> +    ret = 0;
>    else if (0 == strcmp (key, "Alt"))
>      ret = 8;
>    else if (0 == strcmp (key, "Ctrl+Shift"))
> -    ret = 5;
> +  //  ret = 5;
> +    ret = 4;
>    else if (0 == strcmp (key, "Alt+Shift"))
> -    ret = 9;
> +  //  ret = 9;
> +    ret = 8;
>    else if (0 == strcmp (key, "Alt+Ctrl"))
>      ret = 12;
>    else if (0 == strcmp (key, "Alt+Ctrl+Shift"))
> -    ret = 13;
> +  //  ret = 13;
> +    ret = 12;
>  
>    return ret;
>  }
> 
> ------------------------------
> 
> Message: 7
> Date: Sat, 3 May 2008 09:31:05 +0200
> From: Jean-Ren? Reinhard <address@hidden>
> Subject: Re: [Denemo-devel] Key bindings
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=iso-8859-1
> 
> > Another issue considering the keymap configuration is that the action names
> > depends on the locale of the system on which denemo is build. 
> 
> Apparently, I was wrong here. After setting up LC_MESSAGES appropriately,
> everything went fine. I misunderstood gettext.
> 
> The keymaprc file still has to be changed according to locale, which should be
> documented, and defaut keymaprc for the supported langages should be provided.
> 
> Cheers,
> Jean-Ren?
> 
> 
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Tue, 6 May 2008 09:28:48 +0200
> From: Jean-Ren? Reinhard <address@hidden>
> Subject: Re: [Denemo-devel] Key bindings
> To: Jeremiah Benham <address@hidden>
> Cc: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=iso-8859-1
> 
> That's a pity. Git is so much powerful and flexible than CVS...
> 
> Le Fri, May 02, 2008 at 04:36:47PM -0500, Jeremiah Benham ?crivait:
> > don't use git yet. It is not up to speed with cvs. I was experimenting
> > with it and it seems not everyone wants to switch. I may just get
> > deleted soon.
> > 
> > Jeremiah
> > 
> > On Fri, 2008-05-02 at 21:57 +0200, Jean-Ren? Reinhard wrote:
> > > Hi,
> > > 
> > > I'm rather new to denemo. I had to set it up for my girlfriend. I have 
> > > come
> > > across several usability issues, which I would like to report.
> > > 
> > > I checked out the cvs today, but I just saw plans to move to git on the 
> > > archives
> > > of the devel list. Is the cvs still the reference? Is the git repository 
> > > already
> > > set up? If it is the case, where can it be fetched?
> > > 
> > > The issues I would like to tackle today are keybindings issues. As almost 
> > > every
> > > interaction with the score are made through keybindings, it's rather 
> > > important.
> > > When I first tried denemo, the default keymap was unusable, because notes 
> > > could
> > > not be entered. I managed to change the keymap to use denemo, but since 
> > > the
> > > keymap configuration is not documented, it's rather awkward.
> > > 
> > > After some exploration of the source code, I think I solved the issue. 
> > > Denemo
> > > stores the keybindings in a two level hashtable. When given a 
> > > GdkKeyEvent, it
> > > checks for a keybinding, using as the first key the modifiers of the 
> > > event, and as second key the keyval of the event. The issue stems from 
> > > that Gdk interprets Shift to modify the keyval, and denemo also uses 
> > > Shift as a Modifier. For example, on my azerty keyboard, I need to press 
> > > Shift+& to get a keyval for 1. However when pressing Shift+&, the 
> > > GdkEvent contains (mod : Shift, keyval : 1). The keyval is ok, but not 
> > > the modifier. If I want to use this binding, I have to use :
> > > <bind>Shift+1</bind>, which is weird. One could document this behaviour, 
> > > but I
> > > think it should be avoided, since one should change the denemo keymap for 
> > > every
> > > system keymap. Another solution would be to stop using Shift as a modifier
> > > inside denemo. This solves the issue. I attach a patch that does just 
> > > that.
> > > 
> > > Another issue considering the keymap configuration is that the action 
> > > names
> > > depends on the locale of the system on which denemo is build. When I 
> > > compiled denemo earlier today, this was rather misleading. If I give a 
> > > binding to InsertQuarterNote, the binding will just be ignored. Once 
> > > again, this is not documented. Furthermore, no keymap file containing the 
> > > actions name can be found in the cvs tree. One has to  build it from the 
> > > appropriate po file. I can provide a defaut keymap file for my langage 
> > > and document this really weird behaviour. But I really wonder what is the 
> > > rationale behind this behaviour, since the useful action names depends on 
> > > the locale of the system where denemo is build, not of the locales of the 
> > > system where it is used.
> > > 
> > > Hopes this helps,
> > > 
> > > Cheers,
> > > Jean-Ren?
> > > 
> > > 
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> > > Don't miss this year's exciting event. There's still time to save $100. 
> > > Use priority code J8TL2D2. 
> > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > > _______________________________________________ Denemo-devel mailing list 
> > > address@hidden https://lists.sourceforge.net/lists/listinfo/denemo-devel
> > 
> 
> 
> 
> ------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
> ------------------------------
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/denemo-devel
> 
> 
> End of Denemo-devel Digest, Vol 14, Issue 1
> *******************************************





reply via email to

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