octave-maintainers
[Top][All Lists]
Advanced

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

Re: Need someone to test uimenu features on ML


From: Michael Goffioul
Subject: Re: Need someone to test uimenu features on ML
Date: Wed, 12 Oct 2011 09:14:53 +0100

On Wed, Oct 12, 2011 at 6:54 AM, Søren Hauberg <address@hidden> wrote:
> The I get
>
> level 0
>
> (when I hover over 'Level 0')
>
> level 1
>
> (when I hover over 'Level 1')
>
> level 2
>
> (when I click 'Level 2')

Oh, I see. Rather unexpected, but I get the point.

> Ok. I did:
>
> h1 = uimenu (h0, 'label', 'Normal', 'accelerator', 'z', 'callback',
> @(h,e) disp ('normal'));
> h2 = uimenu (h0, 'label', 'Shifted', 'accelerator', 'Z', 'callback',
> @(h,e) disp ('shifted'));
>
> When I click the menus the correct callback is called. When I press CTRL
> +Z 'shifted' is printed and when I press CTRL+SHIFT+Z nothing happens.
> So, it seems like Matlab is case-insensitive when callbacks are
> registered, but case-sensitive when accelerators are pressed. Seems like
> a strange behaviour to me...

Actually, the accel is case-insensitive. The second one simply overwrites
the first one. ML does not take the case of the given letter into account
and simply translate it into "Key Z" without holding any information about
the character case. So in both case, the generated
shortcut is Ctrl+Key_Z. This limits the number of shortcuts you can define,
even more when you considered that some common shortcuts are reserved.

That's why I'm thinking about extending that and take the case into account
to allow CTRL+SHIFT+... shortcuts.

Michael.


reply via email to

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