[uim-commit] r1091 - trunk/scm
tkng at freedesktop.org
tkng at freedesktop.org
Mon Aug 1 15:03:50 EST 2005
Author: tkng
Date: 2005-07-31 22:03:47 -0700 (Sun, 31 Jul 2005)
New Revision: 1091
Modified:
trunk/scm/m17nlib.scm
Log:
* scm/m17nlib.scm:
-(m17nlib-press-key-handler): Improved key event handling.
Now special key event such as Ctrl-a, Shift-space when
preedit exist should be handled properly.
Modified: trunk/scm/m17nlib.scm
===================================================================
--- trunk/scm/m17nlib.scm 2005-08-01 02:00:59 UTC (rev 1090)
+++ trunk/scm/m17nlib.scm 2005-08-01 05:03:47 UTC (rev 1091)
@@ -265,17 +265,22 @@
(let* ((mid (m17nlib-context-mc-id mc)))
(if (m17nlib-context-on mc)
(if (m17nlib-push-key mc key key-state)
- #f ;; Discard key event
+ #f ; Key event is consumed in m17n-push-key
(let* ((result (m17nlib-lib-get-result mid))
(consumed? (car result))
(commit-str (cdr result)))
- (if (string=? commit-str "")
- (if (m17nlib-off-key? key key-state)
- (m17nlib-context-set-on! mc #f)
- (im-commit-raw mc))
+ (if (m17nlib-off-key? key key-state)
(begin
- (im-commit mc commit-str)
- (m17nlib-lib-commit mid)))))
+ (m17nlib-context-set-on! mc #f)
+ (if (not (string=? commit-str ""))
+ (im-commit mc commit-str)))
+ (if (string=? commit-str "")
+ (im-commit-raw mc)
+ (begin
+ (im-commit mc commit-str)
+ (m17nlib-lib-commit mid)
+ (if (not consumed?)
+ (im-commit-raw mc)))))))
(m17nlib-proc-direct-state mc key key-state))
(m17nlib-update-preedit mc)
(m17nlib-update-candidate mc))))
More information about the uim-commit
mailing list