metaesc and arrow keys

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

metaesc and arrow keys

Nicholas Marriott
Hi,

I have this vague recollection that the metaesc keymap flag used to make alt-left and alt-right work in the console, however, it doesn't seem to work now and I can't see from the CVS history any point where it ever worked, so maybe I am mistaken. In any case, the diff at the end of this mail makes it work, although I am not sure it is right to allow all of KS_GROUP_Function. This is most useful for irssi, but there may be other programs too.

By the way, were the diffs in these two mails useless:

http://groups.google.co.uk/group/mailing.openbsd.bugs/browse_thread/thread/2f1b4e64e05a5dc1/ad32fef4fbfd4861
http://groups.google.co.uk/group/mailing.openbsd.bugs/browse_thread/thread/b365ba1a6a3fbf71/25da4984eae8332f

Or just missed? Or is there something else wrong with them, should I resend them to tech@? I have a couple of other similar small changes I was going to send, but if there isn't any interest in them or I'm going about it the wrong way, I'd rather know :-).

-- Nicholas.

Index: wskbd.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.53
diff -u -p -r1.53 wskbd.c
--- wskbd.c 14 Aug 2006 17:41:08 -0000 1.53
+++ wskbd.c 18 Sep 2006 17:40:00 -0000
@@ -1717,7 +1717,8 @@ wskbd_translate(struct wskbd_internal *i
  update_leds(id);
 
  /* We are done, return the symbol */
- if (KS_GROUP(res) == KS_GROUP_Ascii) {
+ if (KS_GROUP(res) == KS_GROUP_Ascii ||
+    KS_GROUP(res) == KS_GROUP_Function) {
  if (MOD_ONESET(id, MOD_ANYCONTROL)) {
  if ((res >= KS_at && res <= KS_z) || res == KS_space)
  res = res & 0x1f;
@@ -1733,7 +1734,7 @@ wskbd_translate(struct wskbd_internal *i
  id->t_symbols[0] = KS_Escape;
  id->t_symbols[1] = res;
  return (2);
- } else
+ } else if (KS_GROUP(res) == KS_GROUP_Ascii)
  res |= 0x80;
  }
  }