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

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Feb 1 12:30:13 PST 2005


Author: yamaken
Date: 2005-02-01 12:30:10 -0800 (Tue, 01 Feb 2005)
New Revision: 468

Added:
   trunk/scm/skk-key-custom.scm
Modified:
   trunk/po/POTFILES.in
   trunk/scm/Makefile.am
   trunk/scm/im-custom.scm
   trunk/scm/skk.scm
Log:
* This commit adds key-binding custom definitions for SKK

* scm/im-custom.scm
  - (custom-group mode-transition): New custom group

* scm/skk.scm
  - require-custom "skk-key-custom.scm"
  - (skk-latin-key?, skk-wide-latin-key?, skk-begin-conv-key?,
    skk-begin-completion-key?, skk-next-completion-key?,
    skk-prev-completion-key?, skk-on-key?, skk-hankaku-kana-key?,
    skk-return-key?, skk-commit-key?, skk-next-candidate-key?,
    skk-prev-candidate-key?, skk-next-page-key?, skk-prev-page-key?,
    skk-kana-toggle-key?, skk-cancel-key?, skk-backspace-key?,
    skk-go-left-key?, skk-go-right-key?, skk-latin-conv-key?,
    skk-kanji-mode-key?, skk-special-midashi-key?,
    skk-conv-wide-latin-key?, skk-vi-escape-key?,
    skk-state-direct-no-preedit-nop-key?): Move to skk-key-custom.scm
    as custom variable
  - (skk-plain-space-key?): Move to skk-key-custom.scm as define-key
  - (skk-auto-start-henkan-keyword-list): Add a comment
* scm/skk-key-custom.scm
  - New file
  - (custom-group skk-keys, custom-group skk-keys-advanced1,
    custom-group skk-keys-advanced2, custom-group
    skk-keys-completion): New custom group
  - (skk-plain-space-key?): Moved from skk.scm
  - (custom skk-on-key, custom skk-latin-key, custom
    skk-wide-latin-key, custom skk-kanji-mode-key, custom
    skk-hankaku-kana-key, custom skk-kana-toggle-key, custom
    skk-begin-conv-key, custom skk-commit-key, custom skk-cancel-key,
    custom skk-return-key, custom skk-conv-wide-latin-key, custom
    skk-latin-conv-key, custom skk-begin-completion-key, custom
    skk-next-completion-key, custom skk-prev-completion-key, custom
    skk-special-midashi-key, custom skk-vi-escape-key, custom
    skk-state-direct-no-preedit-nop-key, custom
    skk-next-candidate-key, custom skk-prev-candidate-key, custom
    skk-next-page-key, custom skk-prev-page-key, custom
    skk-backspace-key, custom skk-go-left-key, custom
    skk-go-right-key): New custom variable
* scm/Makefile.am
  - (SCM_FILES): Add skk-key-custom.scm
* po/POTFILES.in
  - Add scm/skk-key-custom.scm


Modified: trunk/po/POTFILES.in
===================================================================
--- trunk/po/POTFILES.in	2005-02-01 18:28:30 UTC (rev 467)
+++ trunk/po/POTFILES.in	2005-02-01 20:30:10 UTC (rev 468)
@@ -59,6 +59,7 @@
 scm/romaja.scm
 scm/skk-custom.scm
 scm/skk-editor.scm
+scm/skk-key-custom.scm
 scm/skk.scm
 scm/spellcheck-custom.scm
 scm/spellcheck.scm

Modified: trunk/scm/Makefile.am
===================================================================
--- trunk/scm/Makefile.am	2005-02-01 18:28:30 UTC (rev 467)
+++ trunk/scm/Makefile.am	2005-02-01 20:30:10 UTC (rev 468)
@@ -14,7 +14,7 @@
  anthy.scm anthy-custom.scm anthy-key-custom.scm \
  canna.scm canna-custom.scm \
  prime.scm prime-custom.scm \
- skk.scm skk-editor.scm skk-custom.scm \
+ skk.scm skk-editor.scm skk-custom.scm skk-key-custom.scm \
  tcode.scm \
  tutcode.scm \
  hangul.scm hangul2.scm hangul3.scm romaja.scm \

Modified: trunk/scm/im-custom.scm
===================================================================
--- trunk/scm/im-custom.scm	2005-02-01 18:28:30 UTC (rev 467)
+++ trunk/scm/im-custom.scm	2005-02-01 20:30:10 UTC (rev 468)
@@ -76,6 +76,11 @@
                      (_ "long description will be here."))
 
 ;; subgroup
+(define-custom-group 'mode-transition
+                     (_ "Mode transition")
+                     (_ "long description will be here."))
+
+;; subgroup
 (define-custom-group 'special-op
                      (_ "Special operation")
                      (_ "long description will be here."))

Added: trunk/scm/skk-key-custom.scm
===================================================================
--- trunk/scm/skk-key-custom.scm	2005-02-01 18:28:30 UTC (rev 467)
+++ trunk/scm/skk-key-custom.scm	2005-02-01 20:30:10 UTC (rev 468)
@@ -0,0 +1,246 @@
+;;; skk-key-custom.scm: Customization variables for SKK key bindings
+;;;
+;;; 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")
+
+;; original key definitions
+
+;;(define-key skk-latin-key? '("l" generic-off-key?))
+;;(define-key skk-wide-latin-key? "L")
+;;(define-key skk-begin-conv-key? 'generic-begin-conv-key?)
+;;(define-key skk-begin-completion-key? '("tab" "<Control>i" "<Control>I"))
+;;(define-key skk-next-completion-key? '("." skk-begin-completion-key?))
+;;(define-key skk-prev-completion-key? ",")
+;;(define-key skk-on-key? '("<Control>j" "<Control>J" generic-on-key?))
+;;(define-key skk-hankaku-kana-key? '("<Control>q" "<Control>Q"))
+;;(define-key skk-return-key? 'generic-return-key?)
+;;(define-key skk-commit-key? '("<Control>j" "<Control>J"))
+;;(define-key skk-next-candidate-key? 'generic-next-candidate-key?)
+;;(define-key skk-prev-candidate-key? '("x" generic-prev-candidate-key?))
+;;(define-key skk-next-page-key? 'generic-next-page-key?)
+;;(define-key skk-prev-page-key? 'generic-prev-page-key?)
+;;(define-key skk-kana-toggle-key? "q")
+;;(define-key skk-cancel-key? 'generic-cancel-key?)
+;;(define-key skk-backspace-key? 'generic-backspace-key?)
+;;(define-key skk-go-left-key? 'generic-go-left-key?)
+;;(define-key skk-go-right-key? 'generic-go-right-key?)
+;;(define-key skk-latin-conv-key? "/")
+;;(define-key skk-kanji-mode-key? "Q")
+;;(define-key skk-special-midashi-key? '(">" "<" "?"))
+;;(define-key skk-conv-wide-latin-key? '("<Control>q" "<Control>Q"))
+;;(define-key skk-plain-space-key? " ")  ;; should not be changed
+;;(define-key skk-vi-escape-key? '("escape" "<Control>["))
+;;(define-key skk-state-direct-no-preedit-nop-key? '("<Control>j" "<Control>J"))
+
+(define-custom-group 'skk-keys
+		     (_ "SKK key bindings")
+		     (_ "long description will be here."))
+
+(define-custom-group 'skk-keys-advanced1
+		     (_ "SKK advanced key bindings (1)")
+		     (_ "long description will be here."))
+
+(define-custom-group 'skk-keys-advanced2
+		     (_ "SKK advanced key bindings (2)")
+		     (_ "long description will be here."))
+
+;; subgroup
+(define-custom-group 'skk-keys-completion
+		     (_ "Completion")
+		     (_ "long description will be here."))
+
+
+(define-custom 'skk-on-key '("<IgnoreCase><Control>j" generic-on-key)
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] on")
+	       (_ "long description will be here"))
+
+
+(define-custom 'skk-latin-key '("<IgnoreCase>l" generic-off-key)  ;; "l"
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] latin mode")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-wide-latin-key '("<IgnoreCase><Shift>l")  ;; "L"
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] wide-latin mode")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-kanji-mode-key '("<IgnoreCase><Shift>q")  ;; "Q"
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] kanji mode")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-hankaku-kana-key '("<IgnoreCase><Control>q")
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] halfwidth katakana mode")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-kana-toggle-key '("<IgnoreCase>q")  ;; "q"
+               '(skk-keys mode-transition)
+	       '(key)
+	       (_ "[SKK] toggle hiragana/katakana mode")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-begin-conv-key '(generic-begin-conv-key)
+               '(skk-keys)
+	       '(key)
+	       (_ "[SKK] begin conversion")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-commit-key '("<IgnoreCase><Control>j")
+               '(skk-keys)
+	       '(key)
+	       (_ "[SKK] commit")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-cancel-key '(generic-cancel-key)
+               '(skk-keys)
+	       '(key)
+	       (_ "[SKK] cancel")
+	       (_ "long description will be here"))
+
+;;
+;; advanced 1
+;;
+
+(define-custom 'skk-return-key '(generic-return-key)
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] return")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-conv-wide-latin-key '("<IgnoreCase><Control>q")
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] commit preedit string as fullwidth alphanumeric")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-latin-conv-key '("/")
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] begin latin conversion")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-begin-completion-key '("tab" "<IgnoreCase><Control>i")
+               '(skk-keys-advanced1 skk-keys-completion)
+	       '(key)
+	       (_ "[SKK] begin completion")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-next-completion-key '("." skk-begin-completion-key)
+               '(skk-keys-advanced1 skk-keys-completion)
+	       '(key)
+	       (_ "[SKK] next completion candidate")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-prev-completion-key '(",")
+               '(skk-keys-advanced1 skk-keys-completion)
+	       '(key)
+	       (_ "[SKK] previous completion candidate")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-special-midashi-key '("<Shift>>" "<Shift><" "<Shift>?")
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] skk-special-midashi-key?")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-vi-escape-key '("escape" "<Control>[")
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] skk-vi-escape-key?")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-state-direct-no-preedit-nop-key '("<IgnoreCase><Control>j")
+               '(skk-keys-advanced1)
+	       '(key)
+	       (_ "[SKK] skk-state-direct-no-preedit-nop-key?")
+	       (_ "long description will be here"))
+
+;; should not be changed
+(define-key skk-plain-space-key? '(" "))
+;;(define-custom 'skk-plain-space-key '(" ")
+;;               '(skk-keys-advanced1)
+;;	       '(key)
+;;	       (_ "[SKK] plain space")
+;;	       (_ "long description will be here"))
+
+;;
+;; advanced 2
+;;
+
+(define-custom 'skk-next-candidate-key '(generic-next-candidate-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] next candidate")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-prev-candidate-key '("<IgnoreCase>x" generic-prev-candidate-key) ;; "x"
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] previous candidate")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-next-page-key '(generic-next-page-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] next page of candidate window")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-prev-page-key '(generic-prev-page-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] previous page of candidate window")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-backspace-key '(generic-backspace-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] backspace")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-go-left-key '(generic-go-left-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] go left")
+	       (_ "long description will be here"))
+
+(define-custom 'skk-go-right-key '(generic-go-right-key)
+               '(skk-keys-advanced2)
+	       '(key)
+	       (_ "[SKK] go right")
+	       (_ "long description will be here"))

Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm	2005-02-01 18:28:30 UTC (rev 467)
+++ trunk/scm/skk.scm	2005-02-01 20:30:10 UTC (rev 468)
@@ -46,37 +46,13 @@
 (require "japanese.scm")
 (require-custom "generic-key-custom.scm")
 (require-custom "skk-custom.scm")
-;;(require-custom "skk-key-custom.scm")
+(require-custom "skk-key-custom.scm")
 
 
-;; key defs
-(define-key skk-latin-key? '("l" generic-off-key?))
-(define-key skk-wide-latin-key? "L")
-(define-key skk-begin-conv-key? 'generic-begin-conv-key?)
-(define-key skk-begin-completion-key? '("tab" "<Control>i" "<Control>I"))
-(define-key skk-next-completion-key? '("." skk-begin-completion-key?))
-(define-key skk-prev-completion-key? ",")
-(define-key skk-on-key? '("<Control>j" "<Control>J" generic-on-key?))
-(define-key skk-hankaku-kana-key? '("<Control>q" "<Control>Q"))
-(define-key skk-return-key? 'generic-return-key?)
-(define-key skk-commit-key? '("<Control>j" "<Control>J"))
-(define-key skk-next-candidate-key? 'generic-next-candidate-key?)
-(define-key skk-prev-candidate-key? '("x" generic-prev-candidate-key?))
-(define-key skk-next-page-key? 'generic-next-page-key?)
-(define-key skk-prev-page-key? 'generic-prev-page-key?)
-(define-key skk-kana-toggle-key? "q")
-(define-key skk-cancel-key? 'generic-cancel-key?)
-(define-key skk-backspace-key? 'generic-backspace-key?)
-(define-key skk-go-left-key? 'generic-go-left-key?)
-(define-key skk-go-right-key? 'generic-go-right-key?)
-(define-key skk-latin-conv-key? "/")
-(define-key skk-kanji-mode-key? "Q")
-(define-key skk-special-midashi-key? '(">" "<" "?"))
-(define-key skk-conv-wide-latin-key? '("<Control>q" "<Control>Q"))
-(define-key skk-plain-space-key? " ")  ;; should not be changed
-(define-key skk-vi-escape-key? '("escape" "<Control>["))
-(define-key skk-state-direct-no-preedit-nop-key? '("<Control>j" "<Control>J"))
+;;; user config
 
+;; TODO: Support new custom type string-list. It involves character
+;; encoding conversion problem.  -- YamaKen 2005-02-02
 (define skk-auto-start-henkan-keyword-list '("¤ò" "¡¢" "¡£" "¡¥" "¡¤" "¡©" "¡×" "¡ª" "¡¨" "¡§" ")" ";" ":" "¡Ë" "¡É" "¡Û" "¡Ù" "¡Õ" "¡Ó" "¡Ñ" "¡Ï" "¡Í" "}" "]" "?" "." "," "!"))
 
 ;; style specification



More information about the Uim-commit mailing list