2011/01/05

tc2 で 3 ストローク

tc2 で「ます。」を 2 ストローク だけど、シフトキーを使うとどうもリズムが悪い。

"-" をプレフィクスとした 3 ストロークに変更してみた。

それはともかく https://github.com/naota/tc の tc2 はいいですね。ありがとうございます。

(add-hook
'tcode-ready-hook
(lambda ()

;; いろいろ他の設定。。。

;; フィルターによる拡張入力。
(progn
(defvar *my-t-code-filter-active-p* nil)

(defun my-t-code-filter-activate ()
(setq *my-t-code-filter-active-p* t))

(defun my-t-code-filter (x)
(setq *my-t-code-filter-active-p* nil)
(or (cdr (assoc x '((?で . "です。")
(?ま . "ます。")
(?し . "した。")
(?事 . "こと")
(?〜 . "から")
(?消 . "削")
(?願 . "お願いします。")
(?以 . "以上、")
(?メ . "foo.bar.baz@gmail.com")
(?住 . "横浜市中区上野町123-42")
)))
x))

(setq tcode-input-filter-functions
'((*my-t-code-filter-active-p* . my-t-code-filter)
((or tcode-katakana-mode tcode-shift-state) . japanese-katakana)
((and (boundp 'tcode-bushu-prefix-list)
tcode-bushu-prefix-list)
. tcode-bushu-prefix-convert)
(tcode-alnum-2-byte . tcode-1-to-2)))

(set-tcode-mode-key "-" 'my-t-code-filter-activate)
)))

0 件のコメント: