delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/20/18:59:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 21 Sep 2001 00:58:43 +0200
From: Marius Gedminas <marius DOT gedminas AT uosis DOT mif DOT vu DOT lt>
To: cygwin AT cygwin DOT com
Subject: Re: German Win98, US Win95 keyboard --> no ;'` keys in Bash
Message-ID: <20010921005843.C9385@gintaras>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20010920165754 DOT A16742 AT redhat DOT com> <Pine DOT WNT DOT 4 DOT 33 DOT 0109201403250 DOT 381-100000 AT 753yc01 DOT ventritex DOT com>
Mime-Version: 1.0
In-Reply-To: <Pine.WNT.4.33.0109201403250.381-100000@753yc01.ventritex.com>
User-Agent: Mutt/1.3.22i
X-URL: http://ice.dammit.lt/~mgedmin/

--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Sep 20, 2001 at 02:14:49PM -0700, Jason Tiller wrote:
> > How many failing bug reports have we had?
> 
> Two or three.

Could you provide message-ids, or maybe even links to them on the
archive?  If that's not too much hassle for you.

> I'm afraid, however, that we will begin to see more,
> especially from users whose keyboard primary language is English but
> whose keyboard layout is non-English (international programmers, most
> likely).
> 
> Marius was the perfect programmer to handle this because he's used to
> working with an international keyboard.  I tried some ad-hoc testing
> here and was befuddled pretty quickly in trying to get around some of
> the "foreign" layouts.
> 
> > Has anyone tried to figure out why things aren't working right?
> 
> Not since 1.3.3 came out with Marius' enhanced META-translator.  I'm
> hoping he's still lurking and can contribute to this discussion...
> Please, Marius?

I'm still alive, and I was actually following this thread.  And the
threat of changing the right Alt into AltGr unconditionally might even
make me forget my usual lazyness (hey, Larry Wall said it was one of the
great virtues of programming!) and do something.

However my "enhanced META-translator" is only used on Windows NT/2000,
so it shouldn't have broken anything in this specific case (Win98 + US
keyboard).  And if I understood the original problem report correctly
(not working ' ` ; with US keyboard layout), it has nothing to do with
AltGr at all.

I think the only constructive thing I can suggest at the moment, is to
compile and run the attached program -- it displays raw console keyboard
events Cygwin (and any other Win32 application) gets from the operating
system.

Here's what I get on Win2000 (inside VMware) with 'US English' keyboard
layout by pressing ' ` ; and Esc.

  $ gcc -o conevent conevent.c

  $ ./conevent
  KeyDown (*1) 00DE 0028 ''' U+0027 00000000
  KeyUp   (*1) 00DE 0028 ''' U+0027 00000000
  KeyDown (*1) 00C0 0029 '`' U+0060 00000000
  KeyUp   (*1) 00C0 0029 '`' U+0060 00000000
  KeyDown (*1) 00BA 0027 ';' U+003B 00000000
  KeyUp   (*1) 00BA 0027 ';' U+003B 00000000
  KeyDown (*1) 001B 0001 ' U+001B 00000000
  KeyUp   (*1) 001B 0001 ' U+001B 00000000

# ^^^^^^^ ^^^^ ^^^^ ^^^^ ^^^ ^^^^^^ ^^^^^^^^
# event        keycode   ASCII      shift state
#         repeat    scancode Unicode

Marius Gedminas
-- 
Hoping the problem  magically goes away  by ignoring it is the "microsoft
approach to programming" and should never be allowed.
		-- Linus Torvalds

--YZ5djTAD1cGYuMQK
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="conevent.c"

#include <stdio.h>
#include <windows.h>

int main()
{
    INPUT_RECORD rec;
    HANDLE hnd = GetStdHandle(STD_INPUT_HANDLE);
    DWORD num;
    for(;;) {
	ReadConsoleInput(hnd, &rec, 1, &num);
	if (rec.EventType == KEY_EVENT) {
	    printf("%-7s (*%d) %04X %04X '%c' U+%04X %08lX\n",
		   (rec.Event.KeyEvent.bKeyDown ? "KeyDown" : "KeyUp"),
		   rec.Event.KeyEvent.wRepeatCount,
		   rec.Event.KeyEvent.wVirtualKeyCode,
		   rec.Event.KeyEvent.wVirtualScanCode,
		   rec.Event.KeyEvent.uChar.AsciiChar,
		   rec.Event.KeyEvent.uChar.UnicodeChar,
		   rec.Event.KeyEvent.dwControlKeyState);
	    if (!rec.Event.KeyEvent.bKeyDown
		&& rec.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)
		break;
	}
    }
    return 0;
}


--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--YZ5djTAD1cGYuMQK--

- Raw text -


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