Forums > MaxMSP

umenu indicating keyboard shortcuts

August 16, 2006 | 10:13 am

Hi,

I just noticed that if umenu contains items that ends with slash and a
number between 0 and 9, these will not be displayed properly when the
menu is activated. Instead I get The Command + 1 (or 2 or 3) at the
right end side of the entry, as if the pop-up menu accepted numerical
shortcuts. ubumenu do not share this behavior. Thge patch below
illustrates it.

I don’t know if this is an undocumented feature or a bug?

Max 4.5.7, Mac 10.4.7, TiBook 1GHz PPC.

Thanks,
Trond

#P window setfont "Sans Serif" 9.;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 396 200 100 196617 0 1 1 0;
#X add apple/1;
#X add banana/2;
#X add orange/3;
#X prefix_set 0 0 0;
#P user umenu 395 169 100 196647 1 64 185 1;
#X add apple/1;
#X add banana/2;
#X add orange/3;
#P window clipboard copycount 2;


August 16, 2006 | 11:28 am

On 16-Aug-2006, at 12:13, Trond Lossius wrote:

> I just noticed that if umenu contains items that ends with slash
> and a number between 0 and 9, these will not be displayed properly
> when the menu is activated. Instead I get The Command + 1 (or 2 or
> 3) at the right end side of the entry, as if the pop-up menu
> accepted numerical shortcuts. ubumenu do not share this behavior.
> Thge patch below illustrates it.
>
> I don’t know if this is an undocumented feature or a bug?

It’s documented in Inside Macintosh.-)

The same thing will happen if you append a letter after the slash.
The behavior’s been around forever and I’m pretty sure this has come
up before on the list.

Whether or not it’s a bug is a different question. Hitting cmd-3
doesn’t do much for your umenu, does it?

– Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


August 16, 2006 | 12:43 pm

Thanks, Peter

>> I just noticed that if umenu contains items that ends with slash and
>> a number between 0 and 9, these will not be displayed properly when
>> the menu is activated. Instead I get The Command + 1 (or 2 or 3) at
>> the right end side of the entry, as if the pop-up menu accepted
>> numerical shortcuts. ubumenu do not share this behavior. Thge patch
>> below illustrates it.
>>
>> I don’t know if this is an undocumented feature or a bug?
>
> It’s documented in Inside Macintosh.-)
>
> The same thing will happen if you append a letter after the slash. The
> behavior’s been around forever and I’m pretty sure this has come up
> before on the list.

I checked to see how this behaves on Windows, and it is not happening
there, so it is not cross-platform behavior. In addition, on Mac, while
the shortcut indicator shows up when the menu is active, display returns
to apple/1 etc. once it is no longer active, so I believe it anyway
would be difficult to use this feature.
>
> Whether or not it’s a bug is a different question. Hitting cmd-3
> doesn’t do much for your umenu, does it?

No, but that could probably be worked around if one really wanted to use
keyboard shortcuts in a pop-up menu. But I can’t remember having seen
any applications ever using pop-up menus with keyboard shortcuts, save
the contextual menu, but that is a horse of a different color.

Anyway I suppose that the simplest solution might be to avoid using
/something, although it might easily turn up again when dealing with osc
syntax.

Best,
Trond


August 17, 2006 | 7:49 am

On 16-Aug-2006, at 14:43, Trond Lossius wrote:
>> Whether or not it’s a bug is a different question. Hitting cmd-3
>> doesn’t do much for your umenu, does it?
>
> No, but that could probably be worked around if one really wanted
> to use keyboard shortcuts in a pop-up menu.

You would have to use ice.key, though. The std. key object ignores
command-keystrokes.

What I was trying to point out was that hitting cmd-3 doesn’t do
anything (unless you hack something together), whereas the
"cloverleaf-3" appears in the popup automatically. This seems a
little cognitively dissonant. If both happened automatically, or if
you had to struggle to do both, then the world would be a bit more
consistent.

But what’s consistency, beside the hobgoblin of little minds?

-)

I agree that slash-something can occur in a number of places, some of
which are tricky to patch around (OSC is just one of these), and that
it would better if umenu would avoid the magic conversion to command-
key shortcuts provided courtesy of some–but not all–relevant Mac
Toolbox calls. Given the generally surreal responses seen on some
other issues, I have no idea if this will show up on the C74
priorities radar.

With apologies to Ralph Waldo Emerson — Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


Viewing 4 posts - 1 through 4 (of 4 total)