9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Pavel Mihaylov <bin@bash.info>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] keyboard maps
Date: Sat, 18 May 2002 22:57:12 +0300	[thread overview]
Message-ID: <1021751834.1076.18.camel@dator> (raw)
In-Reply-To: <3CE383A5.F60D645B@strakt.com>

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

На 16 май 2002 г. (четвъртък), в 13.02 часа, Boyd Roberts писа:
> > I've changed the definition of Altgr to Spec|0x67
> 
> Yes that's right.  I'd also change Spec too:
> 
>     Spec=		0xF800,		/* Unicode private space */
>     Altgr=		Spec|0x67,
> 
> If Spec is 0x80 it causes all sorts of woe when you hit Latin-1 characters.
> 

I'm changing it back to 0x80 since key View (Down) is defined as
Spec|0x00. The value 0x80 for View is hardcoded in rio, acme and sam and
when redefined those programs no longer recognise View as a special key,
and just insert it as text. According to Unicode characters 0x0080 to
0x009F are designated as control ones so it is safe to use them for
special keys. The old definitions for the other Spec-based keys were
causing conflict with Latin-1 characters because Spec (0x80) was ORed
with values above 0x1F (0x20; 0x60 to 0x67) yielding valid accented
Latin characters. That's why I've also changed the definitions for those
keys to be ORed to saner values (0x10; 0x01 to 0x08). Most of those
special keys are interpreted only inside kbd.c so no conflict with
external hardcoded config is possible. Only Break (does it have any
special meaning in P9 or special interpretation?), PF and Middle (both
unassigned in current keymaps) are put into keyboard buffer. The updated
kbd.h is attached.

Regards,
Pavel


[-- Attachment #2.1: Type: text/plain, Size: 329 bytes --]

The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Disposition: attachment; filename=kbd.h
	Content-Transfer-Encoding: quoted-printable
	Content-Type: text/x-c-header; name=kbd.h; charset=UTF-8

[-- Attachment #2.2: kbd.h.suspect --]
[-- Type: application/octet-stream, Size: 1195 bytes --]


enum {
	Data=		0x60,		/* data port */

	Status=		0x64,		/* status port */
	 Inready=	0x01,		/*  input character ready */
	 Outbusy=	0x02,		/*  output busy */
	 Sysflag=	0x04,		/*  system flag */
	 Cmddata=	0x08,		/*  cmd==0, data==1 */
	 Inhibit=	0x10,		/*  keyboard/mouse inhibited */
	 Minready=	0x20,		/*  mouse character ready */
	 Rtimeout=	0x40,		/*  general timeout */
	 Parity=	0x80,

	Cmd=		0x64,		/* command port (write only) */

	Spec=		0x80,

	PF=		Spec|0x10,	/* num pad function key */
	View=		Spec|0x00,	/* view (shift window up) */
	KF=		0xF000,	/* function key (begin Unicode private space) */
	Shift=		Spec|0x01,
	Break=		Spec|0x02,
	Ctrl=			Spec|0x03,
	Compose=	Spec|0x04,
	Caps=		Spec|0x05,
	Num=		Spec|0x06,
	Middle=		Spec|0x07,
	Altgr=		Spec|0x08,
	No=		0x00,		/* peter */

	Home=		KF|13,
	Up=		KF|14,
	Pgup=		KF|15,
	Print=		KF|16,
	Left=		KF|17,
	Right=		KF|18,
	End=		'\r',
	Down=		View,
	Pgdown=		KF|19,
	Ins=		KF|20,
	Del=		0x7F,
	Scroll=		KF|21,
};


typedef struct Kbmap 
{
 char *name;
 Rune *kbtab;
 Rune *kbtabshift;
 Rune *kbtabesc1;
 Rune *kbtabalt;
}Kbmap;


extern Kbmap kbmaps[];
extern int nkbmaps;

  reply	other threads:[~2002-05-18 19:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14 17:37 Fco.J.Ballesteros
2002-05-15  9:05 ` Boyd Roberts
2002-05-15 21:34 ` Pavel Mihaylov
2002-05-16 10:02   ` Boyd Roberts
2002-05-18 19:57     ` Pavel Mihaylov [this message]
2002-05-21 10:43       ` Boyd Roberts
2002-05-21 11:35         ` Pavel Mihaylov
2002-05-14 18:50 andrey mirtchovski
2002-05-14 19:40 andrey mirtchovski
2002-05-14 20:15 rob pike, esq.
2002-05-14 21:36 rob pike, esq.
2002-05-16 10:00 Fco.J.Ballesteros
2002-05-16 11:06 nigel
2002-05-16 13:18 rob pike, esq.
2002-05-20  9:55 Joel Salomon
2002-05-21  8:47 ` Joel Salomon
2003-11-17 18:24 Fco.J.Ballesteros
2003-11-17 18:34 ` ron minnich
2003-11-17 18:41   ` Fco.J.Ballesteros
2003-11-17 19:56 ` mirtchov
2003-11-18  8:13   ` Fco.J.Ballesteros
2004-03-16 14:31 David Presotto
2005-11-01 21:48 Heiko Dudzus
2005-11-01 22:34 ` Russ Cox
2005-11-02 19:49   ` Heiko Dudzus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1021751834.1076.18.camel@dator \
    --to=bin@bash.info \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).