lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Keys, an attempt to understand [PATCH]


From: Doug Kaufman
Subject: Re: lynx-dev Keys, an attempt to understand [PATCH]
Date: Wed, 10 Feb 1999 02:05:38 -0800 (PST)

On Tue, 9 Feb 1999, I wrote:

> On Tue, 9 Feb 1999, Klaus Weide wrote:
> 
> > Before I try to reply in more detail, a question - does the 'K'ey Map
> > page work right in the DOS versions, or are some of the keys with
> > codes in the 0x100 - 0x10E area shown wrong?  (I mean with code without
> > with no problem caused by MOUSE_KEY or its removal).  And are some
> > key combinations accidentally mapped to actions without that being
> > intended?  For example Control_At is 0x103 according to docs/djgpp.key,
> > does that invoke some action when it shouldn't?   I would expect such
> > things to happen, but maybe I haven't looked nearly enough to understand
> > the details.
> 
> I am not at my DOS machine to check this now, but I suspect you are
> correct. I don't know that anyone has tried this, since these are
> unusual key combinations. There appear to be two keycodes that could
> give surprising results: Control_At and Alt_Escape. These probably need
> to be mapped to DO_NOTHING in LYStrings.c in the DJGPP_KEYHANDLER
> switch statement at about line 1472 of the code (and also removed
> from the djgpp.key file). Because the arrow keys and page[up/down]
> keys have special handling in the lynx code, these values couldn't
> be changed successfully (hence the need for the switch statement). I
> don't see any other codes that would be a problem, but I certainly
> could have missed some.
> 
> When I get home, I'll try to check the details of the 'K'ey Map page
> and get back to you. Let me know if you need to see the old DOSKEYHACK

Well, I looked at the Key Map page and at the code. This looks like
I was just sloppy when I did this. When the SLANG arrow keys and
page[up/down] keys were moved into a switch statement in LYStrings.c,
I never changed the keymap[] to match. Also some of the ifdefs weren't
quite right. This didn't change the functionality of the keys,
but it did lead to erroneous information on the Key Map page. The
following patch fixes this so it looks correct again at least for the
DJGPP_KEYHANDLER version. (I don't have the other versions handy to
test, but I think this is correct).

This looks like it was a problem getting the details correct. But
Klaus implied that the whole concept needs rethinking. I am looking
forward to trying to follow a discussion on the correct approach.

This patch should be in addition to the one I previously submitted
for the LYKeymap.c file. It is not against a clean file. I am still
working against dev.14. I hope to have time to get to dev.16 in a few
days.
                                 Doug

*** lynx2-8-2/docs/djgpp.key    Sat Aug 15 14:57:56 1998
--- lynx2-8-2/docs/djgpp.key.new        Wed Feb 10 01:40:30 1999
***************
*** 70,77 ****
  RBrace               0x07d
  Tilde                0x07e
  Control_Backspace    0x07f
- Alt_Escape           0x101
- Control_At           0x103
  Alt_Backspace        0x10e
  BackTab              0x10f
  Alt_Q                0x110
--- 70,75 ----
*** lynx2-8-2/src/LYKeymap.c    Sat Feb  6 12:52:08 1999
--- lynx2-8-2/src/LYKeymap.c.new        Wed Feb 10 01:30:14 1999
***************
*** 212,222 ****
  
  #if defined(__DJGPP__) ||  defined(_WINDOWS)
  #ifdef USE_SLANG
! LYK_END,          LYK_HOME,         LYK_PREV_PAGE,     0,
! /* END */       /* HOME */          /* PGUP */       /* B2 Key */
! 
! LYK_END,          LYK_NEXT_PAGE,       0,
! /* END */         /* PGDOWN */
  
  #else /* PDCurses */
     0,             LYK_HELP,            0,              0,
--- 212,219 ----
  
  #if defined(__DJGPP__) ||  defined(_WINDOWS)
  #ifdef USE_SLANG
!    0,                  0,              0,             0,
!    0,                  0,              0,
  
  #else /* PDCurses */
     0,             LYK_HELP,            0,              0,
***************
*** 296,302 ****
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
! #if defined(__DJGPP__) || defined(_WINDOWS) /* PDCurses */
     LYK_ABORT,          0,              0,             0,
     /* ALT_X */
     0,                  0,              0,             0,
--- 293,299 ----
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
! #if (defined(__DJGPP__) || defined(_WINDOWS)) && !defined(USE_SLANG) /* 
PDCurses */
     LYK_ABORT,          0,              0,             0,
     /* ALT_X */
     0,                  0,              0,             0,
***************
*** 316,322 ****
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
! #endif /* __DJGPP__ || WINDOWS */
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
--- 313,319 ----
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
! #endif /* (__DJGPP__ || WINDOWS) && !USE_SLANG */
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
*** lynx2-8-2/src/LYStrings.c   Mon Jan 18 04:29:20 1999
--- lynx2-8-2/src/LYStrings.c.new       Wed Feb 10 01:16:52 1999
***************
*** 1489,1494 ****
--- 1489,1498 ----
        case K_EEnd:
           c = END_KEY;
           break;
+       case K_Alt_Escape:         /* These keys conflict with predefined */
+       case K_Control_At:         /* lynx key codes */
+          c = DO_NOTHING;
+          break;
        }
      }
  #endif /* DGJPP_KEYHANDLER */
__
Doug Kaufman
Internet: address@hidden (preferred)
          address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]