× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Portable keyboard remapping
  • From: "Jason M. Felice" <jasonf@xxxxxxxxxxxxxx>
  • Date: Tue, 8 Feb 2000 15:21:36 -0500

On Tue, Feb 08, 2000 at 10:31:14AM -0500, Jasper O'Malley wrote:
> 
> Has any thought been given to moving the keyboard mapping functions into
> the emulator itself? Has any work been started that I might be able to
> help out with, or would I be starting from scratch?

No work has been started on it, althoughit is one of the foremost issues on the
TODO list.  The problem is that we have a number of different levels and
configs to work with, and I haven't yet been able to devise in my head a
completely clean method of dealing with this.

Here are my thoughts:
We are currently mapping keys as defined by the terminal type (e.g. S/Lang or
curses or GTK+ or Gnome) and the terminal driver returns a 5250 function code.
So if you type ^R, the terminal driver says you pressed K_RESET, not Ctrl+R.
This makes mapping things in a keyboard mapping file pretty difficult, because
we can't map things to keys which don'talready have 5250 functions assigned to
them.

What we need is a table of some sort where the terminal driver can return a
code for each key as it really exists.  A generic remapper could then associate
keys with one of: a) a 5250 function, b) keyed data, c) a recorded macro of
some sort, or d) an external fucntion such as a piece of Perl code.

This is much cleaner, but we still have the following issues:
1) the default mapping will probably have to make decisions based on what keys
   the terminal actually has.  For example, mapping Reset to Left Ctrl will
   have no effect for the curses terminal, since that terminal type can't 
   detect either Left vs. Right Ctrl or Ctrl without another key being pressed.
   Maybe we can handle this by having the terminal driver install the default
   map (?)
2) some keys are mapped based on position, not on key code.  I'm not sure we
   should bother with this, but it should be mentioned.  The help key is an
   example.  This breaks on foreign keyboards (well, foreign from my
   perspective - the US is at the center of every map *I* own *grin*).
3) The biggie:  We either have to maintain or steal a list of every key on
   keyboard ever likely to be used.  I'm thinking more along the lines of
   steal, as X Windows has a rather compleete map.  We can copy that header
   file into the tn5250 distributiion, license permitting.
4) We have this pesky little issue of curses keyboard handling (which I'm
   working on an aspect of now).  We don't have enough keys to map all the
   necessary 5250 functions, so we now have to map key sequences to 5250 
   functions.  We can acceptably work around this by creating dummy ESC+x
   keys.

Wow, did I just work out all the issues during the course of an email?  Cool,
although it did take like 45 minutes to type because of this damn 3-second
lag from here to my shell account.   *sigh*

So, are you volunteering ;->

> 
> Cheers,
> Mick
> 
-Jay 'Eraserhead' Felice
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.