www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/08/05:21:27

Date: Fri, 08 Sep 2000 12:22:26 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <1438-Fri08Sep2000122225+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5h
In-reply-to: <srh4mfneljn85@corp.supernews.com> (sueko@nospam.azstarnet.com)
Subject: Re: Japanese keyboard, Win2k, and RHIDE \ _
References: <srh4mfneljn85 AT corp DOT supernews DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "dragonsong" <sueko AT nospam DOT azstarnet DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 8 Sep 2000 00:24:57 -0700
> 
> I'm posting a solution to a keyboard binding problem caused by the
> combination of a Japanese keyboard and Windows 2000's Japanese keyboard
> layout. (It may also apply to Win9x. I have no idea if it does or not.) The
> problem is with the characters \ (backslash) and _ (underscore).

I became aware of the problems with these keys when I was in Japan a
year ago, and installed the DJGPP port of GNU Emacs on someone's
computer running Japanese Windows 95.  Emacs 20.5, available from the
usual DJGPP FTP sites, should now handle this special key correctly;
I'd be grateful if you could test that on Windows 2000.

Btw, at least in Emacs, a similar problem happened with Ctrl-\.

Also, there's one other key on the Japanese keyboard which might give
you trouble: it generates scan code 7Dh, which is documented as the
code for Alt-6 on the standard PC/AT keyboard.  However, on the
Japanese keyboard (at least the one I've seen) it is marked with the
characters \ and |.  The ported Emacs handles this key correctly as
well (both unshifted and shifted with Shift, Ctrl, and Alt).

I don't know if all of these problems are relevant for RHIDE, since
I'm not sure whether RHIDE uses the same method of reading the
keyboard.  Emacs uses BIOS functions 10h and 12h, and maps the scan
codes and character codes via several locale-dependent tables.

> The rest of djgpp's bash has no issues with this.

Bash uses a different method of reading the keys: it usually uses the
character code produced by the BIOS, and only looks at the scan code
when an editing key, such as a left arrow, is pressed.  Thus it avoids
many locale-dependent issues with keyboards, but the downside is that
it cannot distinguish between BS and Ctrl-h, and cannot support key
combinations such as Shift-BS and Shift-SPACE which don't have a
separate ASCII code in standard BIOSes.

> All that's needed is to add the following line into sections 3 AND 4:
> 75 = 0
> 
> This shuts off RHIDE's interpretation of ^LeftArrow (Control-LeftArrow),
> which is what that key is actually being interpreted as: not some mystical
> scancode at all - but simply as a ^LeftArrow.
> 
> This means you *will* also lose functionality of your actual ^LeftArrow. I
> just use ^A instead. It's worth the sacrifice, I think.

Emacs solves this differently, without sacrificing any functionality.
It has a small variable-length table for each keyboard layout which
remaps certain keys given their scan code and ASCII code.  See the
function dos_rawgetc and the tables which precede it in the file
msdos.c in the Emacs distribution.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019