Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 21 Jun 2004 08:48:50 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Ariel Burbaickij cc: cygwin AT cygwin DOT com Subject: Re: Passing through the keyboard layout settings from Win32 to cygwin In-Reply-To: <9218.1087800670@www53.gmx.net> Message-ID: References: <9218 DOT 1087800670 AT www53 DOT gmx DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Mon, 21 Jun 2004, Ariel Burbaickij wrote: > Hello dear mailing list participants, > > this is basically re-post of my e-mail > send a while ago. Noone answered the original > question, so let us see how lucky I am this this > time. > > is it somehow possible to pass through the actual > keyboard layout settings of host machine to cygwin console? > Here the explanation: Occasionally I need to type > in German or Russian or some other languages, so > I simply switch the kyeboard layout in Win2000. Is some hook > defined or can be defined that adjusts also the > locale settings of cygwin as soon as it happens? > > With Best Regards > Ariel Burbaickij Ariel, There's no code in Cygwin that dynamically detects a switch in keyboard settings. Cygwin does inherit the keyboard settings from Windows, but doesn't process them in any way. I can think of a few ways to do what you want, but all of them involve some amount of coding, and none of them do this dynamically. The simplest idea is to write a small program (e.g., "compute_locale") that queries the keyboard state and outputs the correct locale settings, and then "eval" its output from your shell's rc file. That way, whenever you start a new shell, it, and any programs invoked by it, will have the correct locale settings for the current keyboard mode. If you find a way (on MSDN?) to add a hook to the Windows keyboard layout switch utility, have that hook send a special unused signal to (all?) Cygwin programs, and add code to cygwin1.dll to set the locale correctly when handling that signal. You can probably reuse the locale computation code from "compute_locale" above. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/