[uim-commit] r749 - branches/composer/scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Mar 4 00:43:47 PST 2005
Author: yamaken
Date: 2005-03-04 00:43:44 -0800 (Fri, 04 Mar 2005)
New Revision: 749
Modified:
branches/composer/scm/evmap.scm
branches/composer/scm/im.scm
Log:
* scm/im.scm
- (key-press-handler, key-release-handler): Remove modifier-key
unfiltering to receive modifier key itself
* scm/evmap.scm
- (event-exp-collector-add-modifier!): Replace Siod-dependent bit-or
with bitwise-or of SRFI-60
- (event-exp-collector-exp): Simplify
- (qwerty-shift->space-ruleset): Modify matching rules
Modified: branches/composer/scm/evmap.scm
===================================================================
--- branches/composer/scm/evmap.scm 2005-03-04 07:25:18 UTC (rev 748)
+++ branches/composer/scm/evmap.scm 2005-03-04 08:43:44 UTC (rev 749)
@@ -125,7 +125,7 @@
(define event-exp-collector-add-modifier!
(lambda (evc mod)
(let ((modifier (event-exp-collector-modifier evc)))
- (event-exp-collector-set-modifier! evc (bit-or mod modifier)))))
+ (event-exp-collector-set-modifier! evc (bitwise-or mod modifier)))))
(define event-exp-collector-add-predicate!
(lambda (evc pred)
@@ -148,16 +148,14 @@
(lambda (evc)
(event-exp-collector-normalize-predicates! evc)
(let* ((modifier (event-exp-collector-modifier evc))
- (exp-list (filter (lambda (elem)
- elem)
+ (exp-list (remove not
(append
(list
(event-exp-collector-str evc)
(event-exp-collector-lkey evc)
- (event-exp-collector-pkey evc))
- (if (not (= modifier 0))
- (list modifier)
- ())
+ (event-exp-collector-pkey evc)
+ (and (not (= modifier 0))
+ modifier))
(event-exp-collector-predicates evc)))))
(if (= (length exp-list)
1)
@@ -863,9 +861,12 @@
((lkey_Shift_R lkey_Shift_R) (action_toggle_shift_lock))))
;; for functional test and demonstration
+;; TODO: strip any modifier and re-generate in evmap
(define qwerty-shift->space-ruleset
- '((((lkey_Shift press)) (($1 " " lkey_space mod_None)))
- (((lkey_Shift release)) (($1 " " lkey_space mod_None)))))
+ '((((lkey_Shift_L press)) (($1 " " lkey_space)))
+ (((lkey_Shift_L mod_Shift release)) (($1 " " lkey_space)))
+ (((lkey_Shift_R press)) (($1 " " lkey_space)))
+ (((lkey_Shift_R mod_Shift release)) (($1 " " lkey_space)))))
(define jp106-henkan-muhenkan->shift-ruleset
'((((lkey_Henkan press)) (($1 lkey_Shift_R)))
Modified: branches/composer/scm/im.scm
===================================================================
--- branches/composer/scm/im.scm 2005-03-04 07:25:18 UTC (rev 748)
+++ branches/composer/scm/im.scm 2005-03-04 08:43:44 UTC (rev 749)
@@ -266,27 +266,19 @@
;; codes is needed.
(define key-press-handler
(lambda (id key state)
- (let* ((c (find-context id))
- (im (and c (context-im c))))
- (cond
- ((and enable-im-switch
- (switch-im-key? key state))
- (switch-im id (im-name im)))
- ((modifier-key? key state)
- ;; don't discard modifier press/release edge for apps
- (im-commit-raw c))
- (else
- (invoke-handler im-key-press-handler id key state))))))
+ (cond
+ ((and enable-im-switch
+ (switch-im-key? key state))
+ (let* ((c (find-context id))
+ (im (and c
+ (context-im c))))
+ (switch-im id (im-name im))))
+ (else
+ (invoke-handler im-key-press-handler id key state)))))
(define key-release-handler
(lambda (id key state)
- (let ((c (find-context id)))
- (cond
- ((modifier-key? key state)
- ;; don't discard modifier press/release edge for apps
- (im-commit-raw c))
- (else
- (invoke-handler im-key-release-handler id key state))))))
+ (invoke-handler im-key-release-handler id key state)))
(define reset-handler
(lambda (id)
More information about the Uim-commit
mailing list