Re: Mapping some keys, like ctrl-[ and ctrl-]

From: Angel Ortega <angel_triptico.com>
Date: Mon, 10 Sep 2007 17:59:34 +0200
On Sun, Sep 09, 2007 at 11:12:42AM -0400, Lee Page wrote:

> Yes, I don't see ever using the X interface.  The curses interface is fast 
> when working on machines in other countries, and you never have to worry 
> about how compatible your X server is.  Though, you do have certain 
> terminal anomalies to worry about.

I also make heavy use of the Curses interface, as I do much remote
maintenance of machines.

The current development version (pickable with Git) adds an interesting
fix to a rather annoying issue on the Curses port: search, replace and other
functions that ask forever that pesky "Case sensitive (Y/N)" question can
be answered by pressing ENTER (meaning "the previous selection"). It's
still annoying, but a bit less.

> Is there a way to genericize the tui interface so that one interface would 
> work for both? 

I'm afraid TUI is a bit too text-oriented to be useful, but probably can be
done.

Regarding the multiple-sequence keys, I'm thinking about a pretty
interface that could be:

mp.keycodes['ctrl-x'] = {};
mp.keycodes['ctrl-x']['ctrl-s'] = mp.actions['save'];
mp.keycodes['ctrl-x']['ctrl-x'] = mp.actions['cut-mark'];

That is, assigning a hash to a keycode (instead of an action). This could
be multiplexed recursively without adding any complexity.

What do you think?

-- 
Angel Ortega
http://www.triptico.com



-- 
To unsubscribe, send mail to mp-unsubscribe_lists.triptico.com.


Received on Mon Sep 10 2007 - 17:59:33 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 10 2008 - 08:59:26 CEST