From: Nir Tzachar on
On Thu, Jul 29, 2010 at 5:19 PM, Randy Dunlap <rdunlap(a)xenotime.net> wrote:
> On Thu, 29 Jul 2010 13:33:49 +0300 Nir Tzachar wrote:
>
>> On Thu, Jul 29, 2010 at 11:05 AM, Michal Marek <mmarek(a)suse.cz> wrote:
>> > On 29.7.2010 08:20, trapDoor wrote:
>> >> On Thu, Jul 29, 2010 at 6:04 AM, Nir Tzachar <nir.tzachar(a)gmail.com> wrote:
>> >>> On Wed, Jul 28, 2010 at 9:55 PM, Sam Ravnborg <sam(a)ravnborg.org> wrote:
>> >>>> The capitilazing is the main reason why I have
>> >>>> not recommended nconfig to be default.
>> >>>>
>> >>>> And I doubt the shortcut letters are used that often.
>> >>>> One idea could be to drop the shortcut for the individual menus.
>> >>>
>> >>> I almost never use them and removing them will have the benefit of
>> >>> cleaning the code.
>> >>
>> >> Neither do I. And I don't know anyone who would find them very useful.
>> >
>> > I actually do. Unlike menuconfig, nconfig will jump to a menu item even
>> > if it is not currently visible in the screen. Useful if you know the
>> > option name but don't want to scroll down and look for it. But I would
>> > accept a patch to remove the shortcut if there is no better way of
>> > marking the shortcuts than the capital letters.
>> >
>> > Michal
>> >
>>
>> There is a middle ground here: keep the shortcuts, but give no visual
>> indication (either capitalization or coloring).
>
> How do you tell libmenue what the shortcut character is?
> Is that a different attribute/field/specifier?

You can feed ascii chars to the menu_driver, which then employs a
pattern match to jump to a matched item. However, I have not used this
logic as I needed to implement the m,y,n etc. shortcuts.

Coming to think about it, it might be possible to use the built-in
pattern matching of libmenu by first pressing the '/' key, and then
feeding consecutive key presses to the menu_driver routine. I'll try
to come up with a patch.

> If so, how about just adding the shortcut key in parentheses [or square
> brackets] after its word or phrase? �E.g.:
>
> � � � �Hardware Error Device [A]
>

This might be a problem, as there are options which are longer than
the width of a regular terminal..


Cheers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/