This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch submission for AltGr handling


Hi, Gunnar, :)

We're talking about how to determine if the right <ALT> key (called
AltGr sometimes) should be used to generate META or not:

On Tue, 6 Mar 2001, Gunnar Degnbol wrote:
> At 19:44 05-03-2001 +0100, Corinna Vinschen wrote:

> >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.

> 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;
>      }
> }

Thanks for the info.  However, I'm not sure I understand, Gunnar.  You
say flat out that AltGr is converted to <CTRL>+<ALT>... does this mean
that international keyboards can't use any of the 'Control-Meta'
keybindings in bash because the "meta-ness" is removed and AltGr
substituted instead?  I'm confused!

I was also wondering if you're implying that the VkKeyScan() technique
is a *better* choice than the GetKeyboardLayout() strategy?

Thanks for your ideas,

---Jason Tiller
jdtiller@best.com (or jtiller@sjm - sorry about the mixups)
Sonos


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]