[uim-commit] r470 - in trunk: po scm

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Feb 1 13:43:16 PST 2005


Author: yamaken
Date: 2005-02-01 13:43:13 -0800 (Tue, 01 Feb 2005)
New Revision: 470

Added:
   trunk/scm/canna-key-custom.scm
   trunk/scm/prime-key-custom.scm
Modified:
   trunk/po/POTFILES.in
   trunk/scm/Makefile.am
   trunk/scm/canna.scm
Log:
* This commit adds key-binding custom definitions for CANNA

* scm/canna.scm
  - require-custom "canna-key-custom.scm"
  - (canna-off-key?): Removed since obsolete
  - (canna-on-key?, canna-latin-key?, canna-wide-latin-key?,
    canna-hankaku-kana-key?, canna-kana-toggle-key?,
    canna-commit-as-opposite-kana-key?, canna-begin-conv-key?,
    canna-commit-key?, canna-extend-segment-key?,
    canna-shrink-segment-key?, canna-next-candidate-key?,
    canna-prev-candidate-key?, canna-cancel-key?,
    canna-backspace-key?, canna-delete-key?, canna-go-left-key?,
    canna-go-right-key?, canna-beginning-of-preedit-key?,
    canna-end-of-preedit-key?, canna-next-segment-key?,
    canna-prev-segment-key?): Move to canna-key-custom.scm as custom
    variable
  - (canna-next-page-key?, canna-prev-page-key?, canna-kill-key?,
    canna-kill-backward-key?):Move to canna-key-custom.scm as custom
    variable as comment
* scm/canna-key-custom.scm
  - New file
  - (custom-group canna-keys, custom-group canna-keys-advanced1,
    custom-group canna-keys-advanced2): New custom group
  - (custom canna-next-segment-key, custom canna-prev-segment-key,
    custom canna-extend-segment-key, custom canna-shrink-segment-key,
    custom canna-commit-as-opposite-kana-key, custom
    canna-wide-latin-key, custom canna-hankaku-kana-key, custom
    canna-kana-toggle-key, custom canna-on-key, custom
    canna-latin-key, custom canna-begin-conv-key, custom
    canna-commit-key, custom canna-cancel-key, custom
    canna-next-candidate-key, custom canna-prev-candidate-key, custom
    canna-beginning-of-preedit-key, custom canna-end-of-preedit-key,
    custom canna-backspace-key, custom canna-delete-key, custom
    canna-go-left-key, custom canna-go-right-key): New custom variable
  - (custom canna-next-page-key, custom canna-prev-page-key, custom
    canna-kill-key, custom canna-kill-backward-key): New custom
    variable as comment for future use
* scm/prime-key-custom.scm
  - New file. Just a placeholder at now
* scm/Makefile.am
  - (SCM_FILES): Add canna-key-custom.scm and prime-key-custom.scm
* po/POTFILES.in
  - Add scm/canna-key-custom.scm and scm/prime-key-custom.scm


Modified: trunk/po/POTFILES.in
===================================================================
--- trunk/po/POTFILES.in	2005-02-01 21:16:59 UTC (rev 469)
+++ trunk/po/POTFILES.in	2005-02-01 21:43:13 UTC (rev 470)
@@ -27,6 +27,7 @@
 scm/anthy-key-custom.scm
 scm/anthy.scm
 scm/canna-custom.scm
+scm/canna-key-custom.scm
 scm/canna.scm
 scm/default.scm
 scm/direct.scm
@@ -52,6 +53,7 @@
 scm/m17nlib.scm
 scm/pinyin-big5.scm
 scm/prime-custom.scm
+scm/prime-key-custom.scm
 scm/prime.scm
 scm/pyload.scm
 scm/pyunihan.scm

Modified: trunk/scm/Makefile.am
===================================================================
--- trunk/scm/Makefile.am	2005-02-01 21:16:59 UTC (rev 469)
+++ trunk/scm/Makefile.am	2005-02-01 21:43:13 UTC (rev 470)
@@ -12,8 +12,8 @@
  pyload.scm PY.scm pyunihan.scm pinyin-big5.scm \
  japanese.scm japanese-azik.scm japanese-kana.scm \
  anthy.scm anthy-custom.scm anthy-key-custom.scm \
- canna.scm canna-custom.scm \
- prime.scm prime-custom.scm \
+ canna.scm canna-custom.scm canna-key-custom.scm \
+ prime.scm prime-custom.scm prime-key-custom.scm \
  skk.scm skk-editor.scm skk-custom.scm skk-key-custom.scm \
  tcode.scm \
  tutcode.scm \

Added: trunk/scm/canna-key-custom.scm
===================================================================
--- trunk/scm/canna-key-custom.scm	2005-02-01 21:16:59 UTC (rev 469)
+++ trunk/scm/canna-key-custom.scm	2005-02-01 21:43:13 UTC (rev 470)
@@ -0,0 +1,203 @@
+;;; canna-custom.scm: Customization variables for canna.scm
+;;;
+;;; Copyright (c) 2003-2005 uim Project http://uim.freedesktop.org/
+;;;
+;;; All rights reserved.
+;;;
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+;;; 1. Redistributions of source code must retain the above copyright
+;;;    notice, this list of conditions and the following disclaimer.
+;;; 2. Redistributions in binary form must reproduce the above copyright
+;;;    notice, this list of conditions and the following disclaimer in the
+;;;    documentation and/or other materials provided with the distribution.
+;;; 3. Neither the name of authors nor the names of its contributors
+;;;    may be used to endorse or promote products derived from this software
+;;;    without specific prior written permission.
+;;;
+;;; THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+;;; SUCH DAMAGE.
+;;;;
+
+(require "i18n.scm")
+
+
+(define-custom-group 'canna-keys
+		     (_ "Canna key bindings")
+		     (_ "long description will be here."))
+
+(define-custom-group 'canna-keys-advanced1
+		     (_ "Canna advanced key bindings (1)")
+		     (_ "long description will be here."))
+
+(define-custom-group 'canna-keys-advanced2
+		     (_ "Canna advanced key bindings (2)")
+		     (_ "long description will be here."))
+
+
+(define-custom 'canna-next-segment-key '(generic-go-right-key)
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] next segment")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-prev-segment-key '(generic-go-left-key)
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] previous segment")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-extend-segment-key '("<IgnoreCase><Control>o" "<Shift>right")
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] extend segment")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-shrink-segment-key '("<IgnoreCase><Control>i" "<Shift>left")
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] shrink segment")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-commit-as-opposite-kana-key '("<IgnoreCase><Shift>q")  ;; "Q"
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] commit preedit string as transposed kana")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-wide-latin-key '("<IgnoreCase><Shift>l")  ;; "L"
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] fullwidth alphanumeric mode")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-hankaku-kana-key '("<IgnoreCase><Control>q")
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] halfwidth katakana mode")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-kana-toggle-key '("<IgnoreCase>q")  ;; "q"
+               '(canna-keys)
+	       '(key)
+	       (_ "[Canna] toggle hiragana/katakana mode")
+	       (_ "long description will be here"))
+
+;;
+;; overriding generic keys
+;;
+(define-custom 'canna-on-key '("<Control>\\" generic-on-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] on")
+	       (_ "long description will be here"))
+
+;;(define-custom 'canna-latin-key '("l" generic-on-key)
+(define-custom 'canna-latin-key '("<Control>\\" generic-off-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] off")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-begin-conv-key '(generic-begin-conv-key generic-on-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] begin conversion")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-commit-key '(generic-commit-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] commit")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-cancel-key '(generic-cancel-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] cancel")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-next-candidate-key '(generic-next-candidate-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] next candidate")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-prev-candidate-key '(generic-prev-candidate-key)
+               '(canna-keys-advanced1)
+	       '(key)
+	       (_ "[Canna] previous candidate")
+	       (_ "long description will be here"))
+
+;;(define-custom 'canna-next-page-key '(generic-next-page-key)
+;;             '(canna-keys-advanced1)
+;;	       '(key)
+;;	       (_ "[Canna] next page of candidate window")
+;;	       (_ "long description will be here"))
+
+;;(define-custom 'canna-prev-page-key '(generic-prev-page-key)
+;;               '(canna-keys-advanced1)
+;;	       '(key)
+;;	       (_ "[Canna] previous page of candidate window")
+;;	       (_ "long description will be here"))
+
+;;
+;; overriding generic keys (advanced)
+;;
+(define-custom 'canna-beginning-of-preedit-key '(generic-beginning-of-preedit-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] beginning of preedit")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-end-of-preedit-key '(generic-end-of-preedit-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] end of preedit")
+	       (_ "long description will be here"))
+
+;;(define-custom 'canna-kill-key '(generic-kill-key)
+;;               '(canna-keys-advanced2)
+;;	       '(key)
+;;	       (_ "[Canna] erase after cursor")
+;;	       (_ "long description will be here"))
+
+;;(define-custom 'canna-kill-backward-key '(generic-kill-backward-key)
+;;               '(canna-keys-advanced2)
+;;	       '(key)
+;;	       (_ "[Canna] erase before cursor")
+;;	       (_ "long description will be here"))
+
+(define-custom 'canna-backspace-key '(generic-backspace-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] backspace")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-delete-key '(generic-delete-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] delete")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-go-left-key '(generic-go-left-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] go left")
+	       (_ "long description will be here"))
+
+(define-custom 'canna-go-right-key '(generic-go-right-key)
+               '(canna-keys-advanced2)
+	       '(key)
+	       (_ "[Canna] go right")
+	       (_ "long description will be here"))

Modified: trunk/scm/canna.scm
===================================================================
--- trunk/scm/canna.scm	2005-02-01 21:16:59 UTC (rev 469)
+++ trunk/scm/canna.scm	2005-02-01 21:43:13 UTC (rev 470)
@@ -34,39 +34,9 @@
 (require "japanese-azik.scm")
 (require-custom "generic-key-custom.scm")
 (require-custom "canna-custom.scm")
-;;(require-custom "canna-key-custom.scm")
+(require-custom "canna-key-custom.scm")
 
-;;; user configs
 
-;;; Key definitions
-(define-key canna-on-key? '("<Control>\\" generic-on-key?))
-(define-key canna-off-key? '("<Control>\\" generic-off-key?))
-(define-key canna-latin-key? '("<Control>\\" generic-off-key?))
-;(define-key canna-latin-key '("l" generic-on-key?))
-(define-key canna-wide-latin-key? "L")
-(define-key canna-hankaku-kana-key? '("<Control>q" "<Control>Q"))
-(define-key canna-kana-toggle-key? "q")
-(define-key canna-commit-as-opposite-kana-key? "Q")
-(define-key canna-begin-conv-key? '(generic-begin-conv-key? generic-on-key?))
-(define-key canna-commit-key? 'generic-commit-key?)
-(define-key canna-extend-segment-key? '("<Control>o" "<Control>O" "<Shift>right"))
-(define-key canna-shrink-segment-key? '("<Control>i" "<Control>I" "<Shift>left"))
-(define-key canna-next-candidate-key? 'generic-next-candidate-key?)
-(define-key canna-prev-candidate-key? 'generic-prev-candidate-key?)
-;(define-key canna-next-page-key? 'generic-next-page-key?)
-;(define-key canna-prev-page-key? 'generic-prev-page-key?)
-(define-key canna-cancel-key? 'generic-cancel-key?)
-(define-key canna-backspace-key? 'generic-backspace-key?)
-(define-key canna-delete-key? 'generic-delete-key?)
-;(define-key canna-kill-key? 'generic-kill-key?)
-;(define-key canna-kill-backward-key? 'generic-kill-backward-key?)
-(define-key canna-go-left-key? 'generic-go-left-key?)
-(define-key canna-go-right-key? 'generic-go-right-key?)
-(define-key canna-beginning-of-preedit-key? 'generic-beginning-of-preedit-key?)
-(define-key canna-end-of-preedit-key? 'generic-end-of-preedit-key?)
-(define-key canna-next-segment-key? 'generic-go-right-key?)
-(define-key canna-prev-segment-key? 'generic-go-left-key?)
-
 ;;; implementations
 
 (define canna-init-lib-ok? #f)

Added: trunk/scm/prime-key-custom.scm
===================================================================



More information about the Uim-commit mailing list