public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Weird keyboard behavior with "Caps Lock" key
@ 2003-10-05  5:13 Frédéric L. W. Meunier
  2003-10-05  6:23 ` Takuma Murakami
  0 siblings, 1 reply; 6+ messages in thread
From: Frédéric L. W. Meunier @ 2003-10-05  5:13 UTC (permalink / raw)
  To: cygwin-xfree

Something strange happened minutes ago. I was typing and
suddenly all subsequent keys pressed showed as capitals, like
if something reversed the "Caps Lock" key. With it enabled all
showed as lower case.

Then I tested in an open rxvt from where I started the session
and everything showed right. The problem was only on Xfree86,
and I had to restart it.

I'm using all current packages and latest server. Any idea of
what might have caused it or what I can do to track it down if
it reappears ? Nothing in the logs.

-- 
How to contact me - http://www.pervalidus.net/contact.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird keyboard behavior with "Caps Lock" key
  2003-10-05  5:13 Weird keyboard behavior with "Caps Lock" key Frédéric L. W. Meunier
@ 2003-10-05  6:23 ` Takuma Murakami
  2003-10-05 17:42   ` Harold L Hunt II
  0 siblings, 1 reply; 6+ messages in thread
From: Takuma Murakami @ 2003-10-05  6:23 UTC (permalink / raw)
  To: cygwin-xfree

On Sun, 5 Oct 2003 02:13:24 -0300 (E. South America Standard Time)
Frédéric L. W. Meunier <0@pervalidus.tk> wrote:

> Something strange happened minutes ago. I was typing and
> suddenly all subsequent keys pressed showed as capitals, like
> if something reversed the "Caps Lock" key. With it enabled all
> showed as lower case.
> 
> Then I tested in an open rxvt from where I started the session
> and everything showed right. The problem was only on Xfree86,
> and I had to restart it.

It may be the mismatch between the Caps Lock state of
XFree and that of Windows.  If it is the source of your
problem, you could re-synch two Caps Lock states by
pressing Caps Lock for a while (several tries should
be needed until it get fixed).

The Caps Lock state of XFree86 is not strictly
synchronized with the state of Windows.  The former
dominates the behaviour of all X applications while the
latter dominates Windows applications, non-X rxvt and
the LED on keyboards.

As an experiment, when we press Caps Lock key for a
while, Windows takes just one toggle.  However, XFree
receives a number of WM_KEYDOWN messages (due to
Windows' autorepeat?) and it toggles the state
repeatedly.  Thus two states can be different.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird keyboard behavior with "Caps Lock" key
  2003-10-05  6:23 ` Takuma Murakami
@ 2003-10-05 17:42   ` Harold L Hunt II
  2003-10-06  7:30     ` Takuma Murakami
  0 siblings, 1 reply; 6+ messages in thread
From: Harold L Hunt II @ 2003-10-05 17:42 UTC (permalink / raw)
  To: cygwin-xfree

Frédéric and Takuma,

Check out the Test104/4.3.0-17 release.  I disabled processing of the 
Win32 repeat count for VK_CAPITAL messages.  This may or may not help. 
In fact, I suspect that it won't help.  However, it will at least give 
me some incentive to fix it the right way when I find out that it isn't 
correct.  Please try it and report back.

Harold

Takuma Murakami wrote:

> On Sun, 5 Oct 2003 02:13:24 -0300 (E. South America Standard Time)
> Frédéric L. W. Meunier <0@pervalidus.tk> wrote:
> 
> 
>>Something strange happened minutes ago. I was typing and
>>suddenly all subsequent keys pressed showed as capitals, like
>>if something reversed the "Caps Lock" key. With it enabled all
>>showed as lower case.
>>
>>Then I tested in an open rxvt from where I started the session
>>and everything showed right. The problem was only on Xfree86,
>>and I had to restart it.
> 
> 
> It may be the mismatch between the Caps Lock state of
> XFree and that of Windows.  If it is the source of your
> problem, you could re-synch two Caps Lock states by
> pressing Caps Lock for a while (several tries should
> be needed until it get fixed).
> 
> The Caps Lock state of XFree86 is not strictly
> synchronized with the state of Windows.  The former
> dominates the behaviour of all X applications while the
> latter dominates Windows applications, non-X rxvt and
> the LED on keyboards.
> 
> As an experiment, when we press Caps Lock key for a
> while, Windows takes just one toggle.  However, XFree
> receives a number of WM_KEYDOWN messages (due to
> Windows' autorepeat?) and it toggles the state
> repeatedly.  Thus two states can be different.
> 
> Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird keyboard behavior with "Caps Lock" key
  2003-10-05 17:42   ` Harold L Hunt II
@ 2003-10-06  7:30     ` Takuma Murakami
  2003-10-06 11:00       ` Kensuke Matsuzaki
  0 siblings, 1 reply; 6+ messages in thread
From: Takuma Murakami @ 2003-10-06  7:30 UTC (permalink / raw)
  To: cygwin-xfree

> Check out the Test104/4.3.0-17 release.  I disabled processing of the 
> Win32 repeat count for VK_CAPITAL messages.  This may or may not help. 
> In fact, I suspect that it won't help.  However, it will at least give 
> me some incentive to fix it the right way when I find out that it isn't 
> correct.  Please try it and report back.

It does not help.  The main problem is not the repeat
count in WM_KEYDOWN messages but the number of WM_KEYDOWN
messages.  Following your idea, installing the piece of code
if (wParam == VK_CAPITAL && lParam & (1<<30))
  return 0
in the WM_KEYDOWN handler will help.  Of course the
repeat counter reset should make more robust solution.

Because the VK-based code does not work in Japanese
environments, I have tested with an equivalent
ScanCode-based code.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird keyboard behavior with "Caps Lock" key
  2003-10-06  7:30     ` Takuma Murakami
@ 2003-10-06 11:00       ` Kensuke Matsuzaki
  2003-10-08  4:24         ` Takuma Murakami
  0 siblings, 1 reply; 6+ messages in thread
From: Kensuke Matsuzaki @ 2003-10-06 11:00 UTC (permalink / raw)
  To: cygwin-xfree

Takuma and European who have AltGr problem,

Open "Regional and Language Option" in Control Panel.
Add English as input language.
After XFree86/Cygwin start, change language to English using
Shift+Alt key.

Doesn't this help you?

It seems that we no longer receive fale CtrlL if I set default
Input Language German.

If this works on non-Japenese Windows, following code do this
automatically.
LoadKeyboardLayout ("00000409", KLF_ACTIVATE);

Kensuke Matsuzaki


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird keyboard behavior with "Caps Lock" key
  2003-10-06 11:00       ` Kensuke Matsuzaki
@ 2003-10-08  4:24         ` Takuma Murakami
  0 siblings, 0 replies; 6+ messages in thread
From: Takuma Murakami @ 2003-10-08  4:24 UTC (permalink / raw)
  To: cygwin-xfree

> Open "Regional and Language Option" in Control Panel.
> Add English as input language.
> After XFree86/Cygwin start, change language to English using
> Shift+Alt key.
> 
> Doesn't this help you?

It surely works on my machine, both by Control Panel
and by the function LoadKeyboardLayout.  Thank you for
the excellent solution.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-08  4:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-05  5:13 Weird keyboard behavior with "Caps Lock" key Frédéric L. W. Meunier
2003-10-05  6:23 ` Takuma Murakami
2003-10-05 17:42   ` Harold L Hunt II
2003-10-06  7:30     ` Takuma Murakami
2003-10-06 11:00       ` Kensuke Matsuzaki
2003-10-08  4:24         ` Takuma Murakami

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).