The attached is a patch to fix the bug in handling a key
event something like Cntl-Alt-X. It also fixes handling of
Supre and Hyper.
---
Kenichi Handa
[hidden email]
Index: scim_m17n_imengine.cpp
===================================================================
RCS file: /cvsroot/scim/scim-m17n/src/scim_m17n_imengine.cpp,v
retrieving revision 1.26
diff -u -r1.26 scim_m17n_imengine.cpp
--- scim_m17n_imengine.cpp 11 Jan 2007 00:44:33 -0000 1.26
+++ scim_m17n_imengine.cpp 27 Jul 2008 02:13:11 -0000
@@ -101,7 +101,7 @@
const char *im_lang = msymbol_name (tag[1]);
const char *im_name = msymbol_name (tag[2]);
- if (im_lang && strlen (im_lang) && im_name && strlen (im_name)) {
+ if (im_lang && im_lang[0] && im_name && im_name[0]) {
M17NInfo info;
SCIM_DEBUG_IMENGINE(1) << im_lang << "-" << im_name << "\n";
@@ -340,7 +340,7 @@
buf[__m17n_converter->nbytes] = 0;
m17n_object_unref(produced);
- if (strlen (buf)) {
+ if (buf[0]) {
SCIM_DEBUG_IMENGINE(2) << "commit_string: " << buf << "\n";
commit_string (utf8_mbstowcs (buf));
}
@@ -823,6 +823,12 @@
mask |= SCIM_KEY_ShiftMask;
}
+ if (key.is_super_down ())
+ mask |= SCIM_KEY_SuperMask;
+
+ if (key.is_hyper_down ())
+ mask |= SCIM_KEY_HyperMask;
+
if (key.is_meta_down ())
mask |= SCIM_KEY_MetaMask;
@@ -831,18 +837,18 @@
if (!keysym.length ()) return Mnil;
- if (mask & SCIM_KEY_ShiftMask)
- keysym = String ("S-") + keysym;
- if (mask & SCIM_KEY_ControlMask)
- keysym = String ("C-") + keysym;
- if (mask & SCIM_KEY_MetaMask)
- keysym = String ("M-") + keysym;
- if (mask & SCIM_KEY_AltMask)
- keysym = String ("A-") + keysym;
- if (mask & SCIM_KEY_SuperMask)
- keysym = String ("s-") + keysym;
if (mask & SCIM_KEY_HyperMask)
keysym = String ("H-") + keysym;
+ if (mask & SCIM_KEY_SuperMask)
+ keysym = String ("s-") + keysym;
+ if (mask & SCIM_KEY_AltMask)
+ keysym = String ("A-") + keysym;
+ if (mask & SCIM_KEY_MetaMask)
+ keysym = String ("M-") + keysym;
+ if (mask & SCIM_KEY_ControlMask)
+ keysym = String ("C-") + keysym;
+ if (mask & SCIM_KEY_ShiftMask)
+ keysym = String ("S-") + keysym;
return msymbol (keysym.c_str ());
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Scim-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scim-devel