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

From: "dragonsong" <sueko AT nospam DOT azstarnet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Japanese keyboard, Win2k, and RHIDE \ _
Date: Fri, 8 Sep 2000 00:24:57 -0700
Organization: Posted via Supernews, http://www.supernews.com
Lines: 73
Message-ID: <srh4mfneljn85@corp.supernews.com>
X-Complaints-To: newsabuse AT supernews DOT com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

To any interested,

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'm posting this mainly so that it finds its way into the archives. It's
probably only relevant to < .1% of the audience reading this group, but for
that < .1% (myself included) the solution to this problem can save you a lot
of headache.

The issue is that RHIDE (I'm using v1.4) / a Japanese keyboard / and the
Japanese keyboard layout in Win2000 (this possibly applies to NT 4 as well)
do not mix. Well, actually, they mix pretty good - with the exception of one
particular (and particularly important) key: the backslash-and-underscore
key. On a Japanese keyboard, it's located near the bottom-right, and in
English mode serves both the function of the backslash, and the underscore
(when SHIFTed). In several programming languages, both the backslash and the
underscore are rather important characters. :)

Unfortunately, RHIDE will interpret this key the same way as it would
Ctrl+LeftArrow; that is, instead of a backslash you'll jump one word to the
left, and instead of an underscore, you'll select (block) one word to the
left. Makes terminating a string (with the \n newline) rather difficult, at
the very least.

This should only occur if you have a Japanese keyboard installed
(physically, and in Device Manager), and your English input locale's
keyboard layout is Japanese. This may sound obscure, but as a student of
Japanese (English is my native language) I find it highly convenient to use
Win2k's input language system where I can quickly switch back and forth
between English and Japanese (a true IME); it allows me to bring up Notepad
and start crunching away in full kanji, when I desire to do so.

The rest of djgpp's bash has no issues with this. (In fact, I use Cygwin
much more than djgpp, and everything's cool there too. Yes, I'm using RHIDE
in Cygwin. I just copied the .exe into my /bin. Works without any major
issues.)

There are two solutions:

Solution 1. Use an Alt key sequence to manually enter the backslash and
underscore characters. Backslash is Alt-092. Underscore is Alt-095. This is
a rather tedious solution. I used it only until I finally worked out...

Solution 2. Use a custom keybind.txt. Yeah, you saw this coming, didn't you?
;)  Well, it'll be easier than you think. In fact, you can integrate the
necessary change into your existing keybind.txt, should you be using a
custom keybindery. (If you don't have a keybind.txt or know what I mean by
that, check your documentation on RHIDE.)

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.

If anyone has any additions or corrections to this, please let me know. And
after I wrote all that. :) I sure hope someone somewhere out there finds
this in the archives some day and saves themselves a few restless nights...
;p


David Frauzel
sueko AT azstarnet DOT com



- Raw text -


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