public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Re: Japanese keyboard auto-detection
       [not found]   ` <20030922134757.9514.MURAKAMI@ipl.t.u-tokyo.ac.jp>
@ 2003-09-22  9:48     ` Alexander Gottwald
  2003-09-22 11:52       ` Takuma Murakami
  2003-10-08  5:57       ` Takuma Murakami
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Gottwald @ 2003-09-22  9:48 UTC (permalink / raw)
  To: Takuma Murakami; +Cc: cygwin-xfree

On Mon, 22 Sep 2003, Takuma Murakami wrote:

> -- snip --
> (==) winConfigKeyboard - Layout: "E0200411" (00000411) 
> (==) Using preset keyboard for "Japanese" (1041), type "7"
> (EE) No primary keyboard configured
> (==) Using compiletime defaults for keyboard
> Rules = "xfree86" Model = "jp106" Layout = "jp106" Variant = "(null)" Options = "(null)"
> -- snip --
> WinXP and Win2k both show the same log.
> 
> I think it detects the Japanese keyboard but can't get
> the appropriate setting for it.  What can I do to fix it?
> 
> By the way, a typical difference between Japanese and
> English keymaps is symbols.  In Japanese keyboards
> 'shift + 8' yields '(' while '*' in English ones.

It seems the jp106 layout definition in the xkb sources is broken.
Does "setxkbmap -v 10 jp -model jp" work for you?

bye
	ago
BTW: I'm forwarding this to the cygwin-xfree mailing list
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


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

* Re: Japanese keyboard auto-detection
  2003-09-22  9:48     ` Japanese keyboard auto-detection Alexander Gottwald
@ 2003-09-22 11:52       ` Takuma Murakami
  2003-09-23  2:45         ` Kensuke Matsuzaki
  2003-10-08  5:57       ` Takuma Murakami
  1 sibling, 1 reply; 8+ messages in thread
From: Takuma Murakami @ 2003-09-22 11:52 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

On Mon, 22 Sep 2003 11:48:19 +0200 (MEST)
Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> wrote:

> It seems the jp106 layout definition in the xkb sources is broken.
> Does "setxkbmap -v 10 jp -model jp" work for you?

It works well.  I get the correct keyboard except the
behaviour of Caps_Lock.  At first I press Caps_Lock, it
works correctly.  But the second time I press it, it does
not cancel the shift state.  So once I press Caps_Lock
accidentally, I can never get lower-case letters again.

I think the reason of this behaviour is that in Japanese
keyboards Caps_Lock is assigned to the combination of
"Shift + Eisu_toggle".  However, when I change the
definition in /usr/X11R6/lib/X11/xkb/symbols/jp from
key <CAPS> { [ Caps_Lock,Eisu_toggle]	};
to
key <CAPS> { [ Eisu_toggle,Caps_Lock]	};
I can't get the desired result.  Pressing Eisu_toggle
without Shift still works as Lock modifier.

The best situation is "it works as Caps_Lock only when
pressed with shift keys", but I don't know whether the
"cascade of modifiers" can be done.  If not, I prefer it
acts only as Eisu_toggle to prevent the accidental entry
into Lock state.  I have used my own .Xmodmap to achieve
this.  The attached is the patch for
/usr/X11R6/lib/X11/xkb/symbols/jp to get the same effect.

I'm not sure the topic is suitable for cygwin-xfree because
it seems not specific to cygwin but for XFree86 itself.
At least, the keyboard obtained by the setxkbmap is a big
progress.

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

[-- Attachment #2: jp.patch --]
[-- Type: application/octet-stream, Size: 1066 bytes --]

*** jp.orig	Mon Sep 22 19:54:38 2003
--- jp	Mon Sep 22 20:02:44 2003
***************
*** 44,50 ****
      key <AD12> { [ bracketleft,	braceleft ], [ semivoicedsound, kana_openingbracket ] };
      key <RTRN> { [ Return		]	};
  
!     key <CAPS> { [ Caps_Lock,Eisu_toggle]	};
      key <AC01> { [ a, A 		], [ kana_CHI		]	};
      key <AC02> { [ s, S			], [ kana_TO		]	};
      key <AC03> { [ d, D			], [ kana_SHI		]	};
--- 44,50 ----
      key <AD12> { [ bracketleft,	braceleft ], [ semivoicedsound, kana_openingbracket ] };
      key <RTRN> { [ Return		]	};
  
!     key <CAPS> { [ Eisu_toggle]	};
      key <AC01> { [ a, A 		], [ kana_CHI		]	};
      key <AC02> { [ s, S			], [ kana_TO		]	};
      key <AC03> { [ d, D			], [ kana_SHI		]	};
***************
*** 156,162 ****
  
      // begin modifier mappings
      modifier_map Shift  { Shift_L,Shift_R };
-     modifier_map Lock   { Caps_Lock };
      modifier_map Control{ Control_L,Control_R };
      modifier_map Mod1   { Alt_L, Alt_R, Meta_L, Meta_R };
      modifier_map Mod2   { Num_Lock };
--- 156,161 ----

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

* Re: Japanese keyboard auto-detection
  2003-09-22 11:52       ` Takuma Murakami
@ 2003-09-23  2:45         ` Kensuke Matsuzaki
  2003-09-23  8:27           ` Alexander Gottwald
  2003-10-02 15:50           ` Takuma Murakami
  0 siblings, 2 replies; 8+ messages in thread
From: Kensuke Matsuzaki @ 2003-09-23  2:45 UTC (permalink / raw)
  To: cygwin-xfree

As far as I tested, when I press Eisu_toggle key, I receive
WM_KEYDOWN VK_DBE_ALPHANUMRIC. But I never receive WM_KEYUP
until I press Katakana key, even if I release Eisu_toggle key.
Also if I release Katakana key, I never receive WM_KEYUP.

I don't know why, and I can't find any documents in MSDN.

I inserted following workaround into end of WM_KEYDOWN handler
if (iScanCode == KEY_CapsLock)
  winSendKeyEvent (KEY_CapsLock, FALSE);
then CapsLock work well. But perhaps it is not smart.

Does anyone know good solution?

Kensuke Matsuzaki


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

* Re: Japanese keyboard auto-detection
  2003-09-23  2:45         ` Kensuke Matsuzaki
@ 2003-09-23  8:27           ` Alexander Gottwald
  2003-10-02 15:50           ` Takuma Murakami
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Gottwald @ 2003-09-23  8:27 UTC (permalink / raw)
  To: cygwin-xfree

On Tue, 23 Sep 2003, Kensuke Matsuzaki wrote:

> As far as I tested, when I press Eisu_toggle key, I receive
> WM_KEYDOWN VK_DBE_ALPHANUMRIC. But I never receive WM_KEYUP
> until I press Katakana key, even if I release Eisu_toggle key.
> Also if I release Katakana key, I never receive WM_KEYUP.
> 
> I don't know why, and I can't find any documents in MSDN.
> 
> I inserted following workaround into end of WM_KEYDOWN handler
> if (iScanCode == KEY_CapsLock)
>   winSendKeyEvent (KEY_CapsLock, FALSE);
> then CapsLock work well. But perhaps it is not smart.
> 
> Does anyone know good solution?

I don't know the japanese keyboard system and can't test it.
If the windows input driver does the same stupid remapping 
as with alt-gr, i think we should include this as a workaround.
But I'm not sure if the patch will change the pc105 handling 
as well. This will require further investigation.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


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

* Re: Japanese keyboard auto-detection
  2003-09-23  2:45         ` Kensuke Matsuzaki
  2003-09-23  8:27           ` Alexander Gottwald
@ 2003-10-02 15:50           ` Takuma Murakami
  1 sibling, 0 replies; 8+ messages in thread
From: Takuma Murakami @ 2003-10-02 15:50 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

On Tue, 23 Sep 2003 11:45:18 +0900
Kensuke Matsuzaki <zakki@peppermint.jp> wrote:

> As far as I tested, when I press Eisu_toggle key, I receive
> WM_KEYDOWN VK_DBE_ALPHANUMRIC. But I never receive WM_KEYUP
> until I press Katakana key, even if I release Eisu_toggle key.
> Also if I release Katakana key, I never receive WM_KEYUP.

Thanks to your observation I have noticed that I should
separate the problems on Japanese keyboards.  One is
the odd window messages, the other is the XKB layout.
I have no idea for the first one so I have worked on the
Eisu key on XKB layouts.

I have made an option 'eisu' for XKB.  It makes the Eisu
key act as Eisu_toggle when pressed without shift keys
and as Caps_Lock when pressed with shift keys.  I prefer
it because it is consistent with the Windows behaviour
as well as the physical imprints on Japanese keyboards.
However, it might confuse other users, especially those
come from UNIX.  So it should be considered whether
it suits the default of Japanese keyboards.

The attached are 'eisu' XKB symbol file (should be
placed in /etc/X11/xkb/symbols/ ) and the patch for
/etc/X11/xkb/rules/xfree86 .  After installing those,
setxkbmap -v 10 jp -option eisu
will bring out the eisu behaviour.

I hope this eisu option be the default for Japanese
keyboards in Cygwin if other Japanese users agree.

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

[-- Attachment #2: eisu --]
[-- Type: application/octet-stream, Size: 356 bytes --]

// An Eisu key definition consistent with physical
// imprints on Japanese keyboards.
// It is Eisu_toggle without Shift keys.
// It acts as Caps_Lock with Shift keys.
// Should be used with the compat 'japan'.
// Made by murakami@ipl.t.u-tokyo.ac.jp

partial default modifier_keys xkb_symbols "eisu" {
    key <CAPS> { [ Eisu_toggle, Caps_Lock ]				};
};

[-- Attachment #3: rules.xfree86.patch --]
[-- Type: application/octet-stream, Size: 474 bytes --]

--- //takuma/program/cygwin/etc/X11/xkb/rules/xfree86	2003-08-01 13:08:22.001000000 +0900
+++ xfree86	2003-10-01 23:23:02.211292800 +0900
@@ -169,11 +169,13 @@
   compose:ralt		=	+compose(ralt)
   compose:rwin		=	+compose(rwin)
   compose:menu		=	+compose(menu)
+  eisu			=	+eisu
 
 ! option		=	compat
   grp_led:num		=	+leds(num)
   grp_led:caps		=	+leds(caps)
   grp_led:scroll	=	+leds(scroll)
+  eisu			=	+japan
 
 ! option			=	types
   caps:internal			=	+caps(internal)

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

* Re: Japanese keyboard auto-detection
  2003-09-22  9:48     ` Japanese keyboard auto-detection Alexander Gottwald
  2003-09-22 11:52       ` Takuma Murakami
@ 2003-10-08  5:57       ` Takuma Murakami
  2003-10-08 11:59         ` Alexander Gottwald
  1 sibling, 1 reply; 8+ messages in thread
From: Takuma Murakami @ 2003-10-08  5:57 UTC (permalink / raw)
  To: cygwin-xfree

Alexander,

Thank you for supporting Japanese keyboards.
It is really useful for us.

I have one request on this feature.  Could you change
the line
    {  0x411, -1, "jp",    "jp",      NULL, NULL, "Japanese"},
to
    {  0x411,  7, "jp",    "jp",      NULL, NULL, "Japanese"},
in winconfig.c?  It prevents JP layouts loaded for JP
Windows with US keyboards.

Thanks in advance.

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


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

* Re: Japanese keyboard auto-detection
  2003-10-08  5:57       ` Takuma Murakami
@ 2003-10-08 11:59         ` Alexander Gottwald
  2003-10-09  4:35           ` Takuma Murakami
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Gottwald @ 2003-10-08 11:59 UTC (permalink / raw)
  To: cygwin-xfree

Takuma Murakami wrote:

> I have one request on this feature.  Could you change
> the line
>     {  0x411, -1, "jp",    "jp",      NULL, NULL, "Japanese"},
> to
>     {  0x411,  7, "jp",    "jp",      NULL, NULL, "Japanese"},
> in winconfig.c?  It prevents JP layouts loaded for JP
> Windows with US keyboards.

Part of the mississippi problem? I've commited the change.

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


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

* Re: Japanese keyboard auto-detection
  2003-10-08 11:59         ` Alexander Gottwald
@ 2003-10-09  4:35           ` Takuma Murakami
  0 siblings, 0 replies; 8+ messages in thread
From: Takuma Murakami @ 2003-10-09  4:35 UTC (permalink / raw)
  To: cygwin-xfree

> Part of the mississippi problem? I've commited the change.

Thank you for committing.  I think this is not the
essential source of the problem.

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


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030921113132.8FE3.MURAKAMI@ipl.t.u-tokyo.ac.jp>
     [not found] ` <Pine.LNX.4.55.0309212338460.22609@lupus.ago.vpn>
     [not found]   ` <20030922134757.9514.MURAKAMI@ipl.t.u-tokyo.ac.jp>
2003-09-22  9:48     ` Japanese keyboard auto-detection Alexander Gottwald
2003-09-22 11:52       ` Takuma Murakami
2003-09-23  2:45         ` Kensuke Matsuzaki
2003-09-23  8:27           ` Alexander Gottwald
2003-10-02 15:50           ` Takuma Murakami
2003-10-08  5:57       ` Takuma Murakami
2003-10-08 11:59         ` Alexander Gottwald
2003-10-09  4:35           ` 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).