This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Issue with inserting '@' at the command prompt.
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: cygwin at cygwin dot com
- Date: Fri, 19 Aug 2011 04:37:40 +0200
- Subject: Issue with inserting '@' at the command prompt.
- References: <m3fwmammpu.fsf@dalen.lamasti.net> <20110713130550.GH13500@calimero.vinschen.de> <20110713133713.GD4018@const> <20110713190028.GA4742@calimero.vinschen.de> <m3bowxtgt9.fsf@dalen.lamasti.net> <20110714101609.GF2125@calimero.vinschen.de> <20110714105621.GJ2853@lamasti.net> <20110714124214.GE5619@const>
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