Re: Keyboard configurability



Hello, Jiri!

First of all, your message has date in UNIX format, not in RFC format.  
Please fix or update your mail program.

> I've been using Midnight Commander for over 3 years now. Although I find
> it a very useful file manager, it suffers (at least in my opinion) from
> one major issue. Yes, you've figured it out. Keyboard configurability.

I don't know, in my opinion VFS written without security in mind is a
bigger problem.  But it depends on the user and the environment, of
course.  If the keys don't work the way you want them to work, that can be
the biggest problem for you.

> Take slrn, mutt or John's editor (http://space.mit.edu/~davis/jed/) for
> example. The last is a highly configurable editor mainly due to the
> heavy use of the S-Lang library.

slrn-0.9.7.4, file src/help.c:

   N_("  > Move to end of the article."),
   N_("  <                  Move to beginning of the article."),
   N_("  LEFT               Pan article to the left."),
   N_("  RIGHT              Pan article to the right."),
   N_("  /                  Search forward in the article."),
   N_("  TAB                Skip beyond quoted text."),
   N_("  g                  Skip to next digest."),

Key names and descriptions are combined into strings, and those strings
are translated into many languages.  If somebody wants to redefine keys,
at least the help won't change.  Doesn't sound flexible to me.

> Wouldn't it be better to (leave it up to the user to) assign terminal
> strings to particular Midnight Commander's actions, and take out the
> ioctl mess from MC'c code? In my opinion, this would be much clearer,
> portable and configurable solution. We may also call it a Slang
> Commander ;)

What are terminal strings?  I don't understand your suggestion.  I hope
you don't mean hardcoding input escape sequences for all terminals.

> I'm not too sure what (if any) development is being planned on this
> front, but it would be a *very* useful extension. I'm sick of adding
> another hacks to MC's to suit my needs.

In fact, I was going to do almost the opposite.  Every key will be
considered as a combination of the input escape sequence and the keyboard
modifier.  This would allow us to support keys like Ctrl-PgUp even on
terminals that send the same sequence for PgUp and Ctrl-PgUp (konsole,
gnome-terminal).  Unfortunately, reliance on keyboard modifiers is hard to
eliminate if even such sinle things as Shift-Arrows are desired.

On the other hand, rxvt and xterm already distinguish those keys, so maybe
we can simply extend the "Learn Keys" dialog and make it more reliable (so
that nobody could e.g. assign the same sequence to PgUp and Ctrl-PgUp).

> Unfortunately, I don't have enough time to start a new project (or
> contribute) at the moment. However, things should soon hopefully calm
> down...

I hope you will find time to clarify your suggestion.

-- 
Regards,
Pavel Roskin




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