From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31934 invoked by alias); 19 Aug 2011 02:38:03 -0000 Received: (qmail 31924 invoked by uid 22791); 19 Aug 2011 02:38:03 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from solo.fdn.fr (HELO solo.fdn.fr) (80.67.169.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Aug 2011 02:37:48 +0000 Received: from type.ipv6 (youpi.is-a-geek.org [80.67.176.89]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by solo.fdn.fr (Postfix) with ESMTPS id EB97E44296 for ; Fri, 19 Aug 2011 04:37:40 +0200 (CEST) Received: from samy by type.ipv6 with local (Exim 4.76) (envelope-from ) id 1QuExo-0006lg-AO for cygwin@cygwin.com; Fri, 19 Aug 2011 04:37:40 +0200 Date: Fri, 19 Aug 2011 02:38:00 -0000 From: Samuel Thibault To: cygwin@cygwin.com Subject: Issue with inserting '@' at the command prompt. Message-ID: <20110819023740.GL4919@type.famille.thibault.fr> Mail-Followup-To: cygwin@cygwin.com References: <20110713130550.GH13500@calimero.vinschen.de> <20110713133713.GD4018@const> <20110713190028.GA4742@calimero.vinschen.de> <20110714101609.GF2125@calimero.vinschen.de> <20110714105621.GJ2853@lamasti.net> <20110714124214.GE5619@const> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20110714124214.GE5619@const> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-08/txt/msg00341.txt.bz2 Samuel Thibault, le Thu 14 Jul 2011 14:42:14 +0200, a écrit : > Lars Bjørndal, le Thu 14 Jul 2011 12:56:21 +0200, a écrit : > > BRLTTY has a cut & paste facility. It sometimes doesn't paste all > > characters inside cygwin. Pasting an att sign into a shell prompt, the > > terminal beeps, and no character is written. Doing the same thing > > after exiting bash, but still with BRLTTY running and in a cmd > > session, the att sign is printed. > > I don't have the time to investigate now, but I can say that depending > on whether it could open the terminal through CONIN$, brltty uses > WriteConsoleInputW (or WriteConsoleInputA if not available) or SendInput > for this. In the case at stake it is WriteConsoleInputW. Let me explain a simpler case (pasting is the same) - the user presses '@' on his braille keyboard (ascii 0x40). - brltty wants to synthesize it. - brltty calls VkKeyScanW('@') to get the corresponding virtual key, 0x0630 on an azerty keyboard, which means altgr (controlkeystate 1) + virtualkey 0x30 - brltty calls MapVirtualKey(vk, 0) to get the corresponding scancode, 0x11 on a standard PC keyboard. - brltty thus calls WriteConsoleInputW, passing it a KEY_EVENT_RECORD structure: .bKeyDown = 1, .wRepeatCount = 1, .wVirtualKeyCode = 0x630, .wVirtualScanCode = 0x11, .uChar.UnicodeChar = 0x40, .dwControlKeyState = 1, and then the same with bKeyDown = 0. This correctly inserts an '@' in a plain windows console with the windows cmd, but with a windows console with the cygwin or mingw shell, this beeps and does not insert anything. Any idea? Samuel -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple