[uim-commit] r1197 - trunk/scm
yamamoto at freedesktop.org
yamamoto at freedesktop.org
Sun Aug 14 08:43:32 PDT 2005
Author: yamamoto
Date: 2005-08-14 08:43:29 -0700 (Sun, 14 Aug 2005)
New Revision: 1197
Modified:
trunk/scm/anthy-custom.scm
trunk/scm/anthy-key-custom.scm
trunk/scm/anthy.scm
trunk/scm/generic-key-custom.scm
Log:
* scm/{anthy.scm, anthy-custom.scm, anthy-key-custom.scm}:
New config option anthy-use-with-vi?.
It is anthy version of skk-use-with-vi?.
* scm/generic-key-custom.scm:
Add "<Control>[" to generic-cancel-key.
Modified: trunk/scm/anthy-custom.scm
===================================================================
--- trunk/scm/anthy-custom.scm 2005-08-14 06:43:59 UTC (rev 1196)
+++ trunk/scm/anthy-custom.scm 2005-08-14 15:43:29 UTC (rev 1197)
@@ -282,3 +282,9 @@
'custom-set-hooks
(lambda ()
(anthy-configure-widgets)))
+
+(define-custom 'anthy-use-with-vi? #f
+ '(anthy special-op)
+ '(boolean)
+ (_ "Friendly for vi user")
+ (_ "long description will be here."))
Modified: trunk/scm/anthy-key-custom.scm
===================================================================
--- trunk/scm/anthy-key-custom.scm 2005-08-14 06:43:59 UTC (rev 1196)
+++ trunk/scm/anthy-key-custom.scm 2005-08-14 15:43:29 UTC (rev 1197)
@@ -234,3 +234,9 @@
'(key)
(_ "[Anthy] go right")
(_ "long description will be here"))
+
+(define-custom 'anthy-vi-escape-key '("escape" "<Control>[")
+ '(anthy-keys3)
+ '(key)
+ (_ "[Anthy] anthy-vi-escape-key?")
+ (_ "long description will be here"))
Modified: trunk/scm/anthy.scm
===================================================================
--- trunk/scm/anthy.scm 2005-08-14 06:43:59 UTC (rev 1196)
+++ trunk/scm/anthy.scm 2005-08-14 15:43:29 UTC (rev 1197)
@@ -417,6 +417,14 @@
(direct (ja-direct (charcode->string key)))
(rule (anthy-context-input-rule ac)))
(cond
+ ((and anthy-use-with-vi?
+ (anthy-vi-escape-key? key key-state))
+ (begin
+ (anthy-flush ac)
+ (anthy-context-set-on! ac #f)
+ (anthy-context-set-wide-latin! ac #f)
+ (anthy-commit-raw ac)))
+
((anthy-wide-latin-key? key key-state)
(begin
(anthy-flush ac)
@@ -920,6 +928,13 @@
(w (or (ja-direct char)
(ja-wide char))))
(cond
+ ((and anthy-use-with-vi?
+ (anthy-vi-escape-key? key key-state))
+ (begin
+ (anthy-flush ac)
+ (anthy-context-set-wide-latin! ac #f)
+ (anthy-commit-raw ac)))
+
((anthy-on-key? key key-state)
(anthy-flush ac)
(anthy-context-set-on! ac #t))
@@ -946,8 +961,7 @@
(anthy-proc-wide-latin ac key key-state)
(anthy-proc-raw-state ac key key-state))))
;; preedit
- (anthy-update-preedit ac)
-))
+ (anthy-update-preedit ac)))
(define anthy-release-key-handler
Modified: trunk/scm/generic-key-custom.scm
===================================================================
--- trunk/scm/generic-key-custom.scm 2005-08-14 06:43:59 UTC (rev 1196)
+++ trunk/scm/generic-key-custom.scm 2005-08-14 15:43:29 UTC (rev 1197)
@@ -65,7 +65,7 @@
(_ "[Global] commit")
(_ "long description will be here"))
-(define-custom 'generic-cancel-key '("escape" "<IgnoreCase><Control>g")
+(define-custom 'generic-cancel-key '("escape" "<Control>[" "<IgnoreCase><Control>g")
'(global-keys1)
'(key)
(_ "[Global] cancel")
More information about the uim-commit
mailing list