[Bf-committers] Pupmenu conventions. (Was: CVScommit:blender/source/blender/src edit.c)

Ton Roosendaal bf-committers@blender.org
Wed, 8 Oct 2003 12:03:29 +0200


Hi,

> The only downside I see, it that the two systems don't work together,  
> meaning,
> if you add a hot char to a new menu item, you have to add a hot char  
> (which
> can be it's old number) to all items in _that_ menu.  But 1) this is  
> only
> typing a few chars in the string, and 2) it can default to the old  
> bevavior
> if there are none given.

No idea what you talk about. What is a 'hot char', a hotkey? Blender  
hotkeys work with 'raw codes', it detects a button at your keyboard,  
not which modifier is active.

The %x code in menu strings is a return code (event) which is only  
interesting for programmers.

The numeric hotkey (1,2,3, etc) is an extra for users, to be able to  
select menus simpler. This was also meant to expand hotkeys in Blender,  
so you can have 'dual' keys, like "W" and "3". The 'W' menu is a  
collection of random stuff, so the order here doesnt matter. for the  
Snap menu (a snap CURSOR menu!) it *does* matter.

It would be different if we decide to make such menus with real  
hotkeys, meaning not using a number, but one of the alpha keys. This is  
something people can remember more easy, and can be displayed in the  
menu. For the Wkey menu it makes more sense to do that. But you'll  
easily get into troubles again when commands start with the same  
letter... how to do this for the snapmenu? Sometimes it works,  
sometimes it doesn't. The number convention - however - always works.  
The fact that it wasn't communicated well is correct, but no reason to  
drop it.

The design for hotkeys is something we really should evaluate, I  
mentioned that before. Let's look at the big picture for that first,  
and come with a consistant & usable design for Blender. This is a post  
2.3 project, because I *know* it will be a very complex and tedious  
task.

For 2.3, what I can do is add a small hotkey reminder in the extreme  
right side of menus that have this feature.

-Ton-


------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org