[uim-commit] r390 - in trunk: helper scm

yamaken at freedesktop.org yamaken at freedesktop.org
Sat Jan 29 13:56:16 PST 2005


Author: yamaken
Date: 2005-01-29 13:56:14 -0800 (Sat, 29 Jan 2005)
New Revision: 390

Modified:
   trunk/helper/pref-gtk.c
   trunk/scm/custom.scm
   trunk/scm/generic-key-custom.scm
Log:
* This commit changes key-binding representation for users. See
  following discussions (sorry, written in Japanese).
  http://lists.sourceforge.jp/mailman/archives/anthy-dev/2005-January/001637.html
  http://lists.sourceforge.jp/mailman/archives/anthy-dev/2005-January/001670.html

  Remove your ~/.uim.d/customs/custom-global-keys.scm to reflect new
  key definitions.

* helper/pref-gtk.c
  - (key_pref_set_value): Downcase alphabet key
* scm/custom.scm
  - (key-list->gui-key-list): Replace with 'key-list-export-as-basic
  - (gui-key-list->key-list): Replace with 'key-list-import-as-basic
  - (key-list-export-as-basic): Remove key-list-upcase in accordance
    with the discussion
  - (key-list-import-as-basic): Remove key-list-encode-shift and
    key-list-downcase, and add key-list-decode-shift in accordance
    with the discussion
* scm/generic-key-custom.scm
  - (custom generic-commit-key, custom generic-cancel-key, custom
     generic-next-candidate-key, custom generic-prev-candidate-key,
     custom generic-beginning-of-preedit-key, custom
     generic-end-of-preedit-key, custom generic-kill-key, custom
     generic-kill-backward-key, custom generic-backspace-key, custom
     generic-delete-key, custom generic-go-left-key, custom
     generic-go-right-key, custom generic-return-key): Replace the
     pairs such as '("<Control>m" "<Control>M") with
     '("<IgnoreCase><Control>m") to unify alphabetic key bindings for
     user convenience


Modified: trunk/helper/pref-gtk.c
===================================================================
--- trunk/helper/pref-gtk.c	2005-01-29 18:55:21 UTC (rev 389)
+++ trunk/helper/pref-gtk.c	2005-01-29 21:56:14 UTC (rev 390)
@@ -1316,24 +1316,12 @@
     } else if (keyval >= GDK_F1 && keyval <= GDK_F35) {
       g_snprintf(keystr, len, "%d", keyval - GDK_KP_0 + UKey_0);
     } else if (keyval < 256) {
-#if 0
       /*
-       * Capitalize alphabet keys for easy-to-recognize key
+       * Downcase alphabet keys for easy-to-recognize key
        * configuration.  uim-custom performs implicit shift key
        * encoding/decoding appropriately.
-       *
-       * To test this feature, configure variables in custom.scm as
-       * following.  -- YamaKen 2005-01-27
-       * 
-       * (define key-list->gui-key-list 'key-list-export-as-basic)
-       * (define gui-key-list->key-list 'key-list-import-as-basic)
-       * ;;(define key-list->gui-key-list 'key-list-export-as-traditional)
-       * ;;(define gui-key-list->key-list 'key-list-import-as-traditional)
        */
-      keystr[0] = g_ascii_toupper(keyval);
-#else
-      keystr[0] = keyval;
-#endif
+      keystr[0] = g_ascii_tolower(keyval);
       keystr[1] = '\0';
     } else {
       /* UKey_Other */

Modified: trunk/scm/custom.scm
===================================================================
--- trunk/scm/custom.scm	2005-01-29 18:55:21 UTC (rev 389)
+++ trunk/scm/custom.scm	2005-01-29 21:56:14 UTC (rev 390)
@@ -38,10 +38,10 @@
 (require "key.scm")
 
 ;; config
-;;(define key-list->gui-key-list 'key-list-export-as-basic)
-;;(define gui-key-list->key-list 'key-list-import-as-basic)
-(define key-list->gui-key-list 'key-list-export-as-traditional)
-(define gui-key-list->key-list 'key-list-import-as-traditional)
+(define key-list->gui-key-list 'key-list-export-as-basic)
+(define gui-key-list->key-list 'key-list-import-as-basic)
+;;(define key-list->gui-key-list 'key-list-export-as-traditional)
+;;(define gui-key-list->key-list 'key-list-import-as-traditional)
 
 ;; public
 (define custom-activity-hooks ())
@@ -274,15 +274,13 @@
 
 ;; TODO: write test
 (define key-list-export-as-basic (compose key-list-visualize-space
-					  key-list-upcase
 					  key-list-decode-shift
 					  key-list-strip-translators))
 
 ;; TODO: write test
 (define key-list-import-as-basic (compose key-list-characterize-space
 					  key-list-ignore-case
-					  key-list-encode-shift
-					  key-list-downcase))
+					  key-list-decode-shift))
 
 ;; TODO: write test
 (define key-list-export-as-traditional (compose key-list-visualize-space

Modified: trunk/scm/generic-key-custom.scm
===================================================================
--- trunk/scm/generic-key-custom.scm	2005-01-29 18:55:21 UTC (rev 389)
+++ trunk/scm/generic-key-custom.scm	2005-01-29 21:56:14 UTC (rev 390)
@@ -54,25 +54,25 @@
 	       (_ "[Global] begin conversion")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-commit-key '("<Control>j" "<Control>J" generic-return-key)
+(define-custom 'generic-commit-key '("<IgnoreCase><Control>j" generic-return-key)
                '(global-keys)
 	       '(key)
 	       (_ "[Global] commit")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-cancel-key '("escape" "<Control>g" "<Control>G")
+(define-custom 'generic-cancel-key '("escape" "<IgnoreCase><Control>g")
                '(global-keys)
 	       '(key)
 	       (_ "[Global] cancel")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-next-candidate-key '(" " "down" "<Control>n" "<Control>N")
+(define-custom 'generic-next-candidate-key '(" " "down" "<IgnoreCase><Control>n")
                '(global-keys)
 	       '(key)
 	       (_ "[Global] next candidate")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-prev-candidate-key '("up" "<Control>p" "<Control>P")
+(define-custom 'generic-prev-candidate-key '("up" "<IgnoreCase><Control>p")
                '(global-keys)
 	       '(key)
 	       (_ "[Global] previous candidate")
@@ -90,55 +90,55 @@
 	       (_ "[Global] previous page of candidate window")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-beginning-of-preedit-key '("home" "<Control>a" "<Control>A")
+(define-custom 'generic-beginning-of-preedit-key '("home" "<IgnoreCase><Control>a")
                '(global-keys)
 	       '(key)
 	       (_ "[Global] beginning of preedit")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-end-of-preedit-key '("end" "<Control>e" "<Control>E")
+(define-custom 'generic-end-of-preedit-key '("end" "<IgnoreCase><Control>e")
                '(global-keys)
 	       '(key)
 	       (_ "[Global] end of preedit")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-kill-key '("<Control>k" "<Control>K")
+(define-custom 'generic-kill-key '("<IgnoreCase><Control>k")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] erase after cursor")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-kill-backward-key '("<Control>u" "<Control>U")
+(define-custom 'generic-kill-backward-key '("<IgnoreCase><Control>u")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] erase before cursor")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-backspace-key '("backspace" "<Control>h" "<Control>H")
+(define-custom 'generic-backspace-key '("backspace" "<IgnoreCase><Control>h")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] backspace")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-delete-key '("delete" "<Control>d" "<Control>D")
+(define-custom 'generic-delete-key '("delete" "<IgnoreCase><Control>d")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] delete")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-go-left-key '("left" "<Control>b" "<Control>B")
+(define-custom 'generic-go-left-key '("left" "<IgnoreCase><Control>b")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] left")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-go-right-key '("right" "<Control>f" "<Control>F")
+(define-custom 'generic-go-right-key '("right" "<IgnoreCase><Control>f")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] right")
 	       (_ "long description will be here"))
 
-(define-custom 'generic-return-key '("return" "<Control>m" "<Control>M")
+(define-custom 'generic-return-key '("return" "<IgnoreCase><Control>m")
                '(global-keys advanced)
 	       '(key)
 	       (_ "[Global] return")



More information about the Uim-commit mailing list