Re: chinese support glitches?



In <1078594826 1682 15 camel debian>
  "Re: chinese support glitches?" on Sun, 07 Mar 2004 01:40:27 +0800,
  Yao Heling <hyao sina com> wrote:
Because all other chinese XIM I know of use "Ctrl + Space" to activate
(it's also the default under MS Windows) and I'd rather not change these
programs to use "Shift + Space"; as you have pinpointed where the issue
is, could you or someone other developer (Lars, is it your call? ;-))
change Dia to be able to detect "Ctrl + Space"; and I guess this is not
a very difficult job, right?

I have a patch that makes dia accept key states but I don't
know this patch for which affects others. I'll attach this
patch, so you can try it at your own risk if you want :-P.

You can activate uim by Ctrl + Space without this patch if
you use uim. Put following to your ~/.uim.

(if (symbol-bound? 'generic-on-key?)
  (begin
    ;; for uim >= 0.3.1
    (define _generic-on-key? generic-on-key?)
    (define-key generic-on-key? '("<Control> " _generic-on-key?))

    (define _generic-off-key? generic-off-key?)
    (define-key generic-off-key? '("<Control> " _generic-off-key?)))
  (begin
    ;; for uim < 0.3.1
    (define _generic-on-key generic-on-key)
    (define generic-on-key
      (lambda (key key-state)
        (or (_generic-on-key key key-state)
            (and (control-key-mask key-state)
                 (= (to-lower-char key) 32)))))

    (define _generic-off-key generic-off-key)
    (define generic-off-key
      (lambda (key key-state)
        (or (_generic-off-key key key-state)
            (and (control-key-mask key-state)
                 (= (to-lower-char key) 32)))))))

--
kou
Index: app/disp_callbacks.c
===================================================================
RCS file: /cvs/gnome/dia/app/disp_callbacks.c,v
retrieving revision 1.74
diff -u -p -r1.74 disp_callbacks.c
--- app/disp_callbacks.c        18 Feb 2004 14:35:21 -0000      1.74
+++ app/disp_callbacks.c        7 Mar 2004 06:49:39 -0000
@@ -643,8 +643,7 @@ ddisplay_canvas_events (GtkWidget *canva
         key_handled = FALSE;
 
         focus = active_focus();
-        if ((focus != NULL) &&
-            !(state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) ) {
+        if (focus != NULL) {
               /* Keys goes to the active focus. */
           obj = focus->obj;
           if (diagram_is_selected(ddisp->diagram, obj)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]