[scim-m17n] bug fix for handling Cntl-Alt-X

5 messages Options
Embed this post
Permalink
Kenichi Handa

[scim-m17n] bug fix for handling Cntl-Alt-X

Reply Threaded More More options
Print post
Permalink
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
Jens Petersen

Re: [scim-m17n] bug fix for handling Cntl-Alt-X

Reply Threaded More More options
Print post
Permalink
Kenichi Handa さんは書きました:
> The attached is a patch to fix the bug in handling a key
> event something like Cntl-Alt-X.  It also fixes handling of
> Super and Hyper.

Thank you!

Committed in scim-m17n svn trunk.

-Jens

-------------------------------------------------------------------------
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
Kenichi Handa

Re: [scim-m17n] bug fix for handling Cntl-Alt-X

Reply Threaded More More options
Print post
Permalink
In article <[hidden email]>, Jens Petersen <[hidden email]> writes:

> Kenichi Handa さんは書きました:
> > The attached is a patch to fix the bug in handling a key
> > event something like Cntl-Alt-X.  It also fixes handling of
> > Super and Hyper.

> Thank you!

> Committed in scim-m17n svn trunk.

Thank you.  I haven't known that scim-m17n switched to svn.

I checked out scim-m17n according to the instruction in this page:
   http://www.scim-im.org/development/cvs_svn
by this command:

% svn co https://scim.svn.sourceforge.net/svnroot/scim scim-m17n

But, with that, what I got was these whole dirs/files:

% ls scim-m17n
fcitx/      scim-ccinput/     scim-hangul/     scim-pinyin/  scim-uim/
scim/      scim-cns11643-filter/  scim-input-pad/  scim-qtimm/   skim/
scim-bridge/  scim-console/     scim-m17n/       scim-tables/

Is that the right thing?

---
Kenichi Handa
[hidden email]

-------------------------------------------------------------------------
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
Jens Petersen

Re: [scim-m17n] bug fix for handling Cntl-Alt-X

Reply Threaded More More options
Print post
Permalink
Kenichi Handa さんは書きました:
> I checked out scim-m17n according to the instruction in this page:
>    http://www.scim-im.org/development/cvs_svn

I think it should be:

svn co https://scim.svn.sourceforge.net/svnroot/scim/scim-m17n/

-Jens

-------------------------------------------------------------------------
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
Kenichi Handa

Re: [scim-m17n] bug fix for handling Cntl-Alt-X

Reply Threaded More More options
Print post
Permalink
In article <[hidden email]>, Jens Petersen <[hidden email]> writes:

> > I checked out scim-m17n according to the instruction in this page:
> >    http://www.scim-im.org/development/cvs_svn

> I think it should be:

> svn co https://scim.svn.sourceforge.net/svnroot/scim/scim-m17n/

Ah, thank you, that worked.  Could someone please fix the
above web page?

---
Kenichi Handa
[hidden email]

-------------------------------------------------------------------------
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