changeset 8:8b176cdf6319

imported patch 10_kinput2-v3.1-jp106_xfer.patch
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 20:07:06 +0900
parents 7280b0ea4b46
children 1f9e9cb00c6c
files lib/Canna.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Canna.c	Mon Mar 08 20:07:06 2010 +0900
+++ b/lib/Canna.c	Mon Mar 08 20:07:06 2010 +0900
@@ -1318,6 +1318,15 @@
 	*buffer_return = CANNA_KEY_Nfer;
       functionalChar = 1;
       break;
+    case XK_Henkan_Mode:
+      if (event_struct->state & 4 /* control-shifted */)
+	*buffer_return = CANNA_KEY_Cntrl_Xfer;
+      else if (event_struct->state & 1 /* shifted */)
+	*buffer_return = CANNA_KEY_Shift_Xfer;
+      else
+	*buffer_return = CANNA_KEY_Xfer;
+      functionalChar = 1;
+      break;
     case XK_Kanji:
       if (event_struct->state & 4 /* control-shifted */)
 	*buffer_return = CANNA_KEY_Cntrl_Xfer;
@@ -1608,7 +1617,7 @@
   {(unsigned char)'\024',	XK_Scroll_Lock,	0},
   {(unsigned char)'\e',		XK_Escape,	0},
   {(unsigned char)CANNA_KEY_Nfer,	XK_Muhenkan,	0},
-  {(unsigned char)CANNA_KEY_Xfer,	XK_Kanji,	0},
+  {(unsigned char)CANNA_KEY_Xfer,	XK_Henkan_Mode,	0},
   {(unsigned char)CANNA_KEY_Up,		XK_Up,		0},
   {(unsigned char)CANNA_KEY_Left,	XK_Left,	0},
   {(unsigned char)CANNA_KEY_Right,	XK_Right,	0},
@@ -1620,13 +1629,13 @@
   {(unsigned char)CANNA_KEY_Help,	XK_Help,	0},
   {(unsigned char)CANNA_KEY_KP_Key,	XK_KP_Space,	0}, /* ? */
   {(unsigned char)CANNA_KEY_Shift_Nfer,	XK_Muhenkan,	ShiftMask},
-  {(unsigned char)CANNA_KEY_Shift_Xfer,	XK_Kanji,	ShiftMask},
+  {(unsigned char)CANNA_KEY_Shift_Xfer,	XK_Henkan_Mode,	ShiftMask},
   {(unsigned char)CANNA_KEY_Shift_Up,	XK_Up,		ShiftMask},
   {(unsigned char)CANNA_KEY_Shift_Left,	XK_Left,	ShiftMask},
   {(unsigned char)CANNA_KEY_Shift_Right, XK_Right,	ShiftMask},
   {(unsigned char)CANNA_KEY_Shift_Down,	XK_Down,	ShiftMask},
   {(unsigned char)CANNA_KEY_Cntrl_Nfer,	XK_Muhenkan,	ControlMask},
-  {(unsigned char)CANNA_KEY_Cntrl_Xfer,	XK_Kanji,	ControlMask},
+  {(unsigned char)CANNA_KEY_Cntrl_Xfer,	XK_Henkan_Mode,	ControlMask},
   {(unsigned char)CANNA_KEY_Cntrl_Up,	XK_Up,		ControlMask},
   {(unsigned char)CANNA_KEY_Cntrl_Left,	XK_Left,	ControlMask},
   {(unsigned char)CANNA_KEY_Cntrl_Right, XK_Right,	ControlMask},