diff options
author | culler <culler> | 2019-10-22 23:17:56 (GMT) |
---|---|---|
committer | culler <culler> | 2019-10-22 23:17:56 (GMT) |
commit | 700099a55b64bc25128a2287a8cdd7f9655f89af (patch) | |
tree | a0608c806be994093f8cd7d06be677515ad30598 /library/text.tcl | |
parent | 650e19c98ffa1384bee8bf2237a85cd524532ea1 (diff) | |
download | tk-700099a55b64bc25128a2287a8cdd7f9655f89af.zip tk-700099a55b64bc25128a2287a8cdd7f9655f89af.tar.gz tk-700099a55b64bc25128a2287a8cdd7f9655f89af.tar.bz2 |
More progress on implementing IME
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/text.tcl b/library/text.tcl index f43366b..7525588 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -397,6 +397,19 @@ bind Text <Meta-Delete> { } } +# Bindings for IME text input. + +bind Text <<TkStartIMEMarkedText>> { + dict set ::tk::Priv(IMETextMark) "%W" [%W index insert] +} +bind Text <<TkEndIMEMarkedText>> { + %W tag add IMEmarkedtext [dict get $::tk::Priv(IMETextMark) "%W"] insert + %W tag configure IMEmarkedtext -underline on +} +bind Text <<TkClearIMEMarkedText>> { + %W delete IMEmarkedtext.first IMEmarkedtext.last +} + # Macintosh only bindings: if {[tk windowingsystem] eq "aqua"} { |