Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.2.7.2.20010305211847.024e2d60@mail.danbbs.dk> X-Sender: degnbol AT mail DOT danbbs DOT dk X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 06 Mar 2001 00:28:18 +0100 To: Corinna Vinschen , Jason Tiller From: Gunnar Degnbol Subject: Re: Patch submission for AltGr handling Cc: cygwin AT cygwin DOT com In-Reply-To: <20010305194419.R1398@cygbert.vinschen.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed At 19:44 05-03-2001 +0100, Corinna Vinschen wrote: >Hi Jason, > >we just talked on cygwin-developers about your patch. > >Could you please resubmit a patch which doesn't introduce >another CYGWIN option but instead uses automatic recognition >of the current keyboard setting? For example the expression > >if (PRIMARYLANGID (LOWORD (GetKeyboardLayout (0)) == LANG_ENGLISH) > >should work. > >Thanks, >Corinna This checks if any characters are produced using the altgr key (altgr is converted to ctrl+alt): altgr = FALSE; for (i = 32; i < 256; i++) { vk = VkKeyScan((char)i); if (vk != -1 && (vk & 0x600) == 0x600) { /* ctrl+alt */ altgr = TRUE; break; } } Gunnar -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple