diff options
author | culler <culler> | 2019-10-23 01:20:04 (GMT) |
---|---|---|
committer | culler <culler> | 2019-10-23 01:20:04 (GMT) |
commit | e766ee74b4cc2341eb5799f74958467d1792c310 (patch) | |
tree | f2d125b994c501c27efef01bea1799abe2fb94a8 /library/ttk | |
parent | 700099a55b64bc25128a2287a8cdd7f9655f89af (diff) | |
download | tk-e766ee74b4cc2341eb5799f74958467d1792c310.zip tk-e766ee74b4cc2341eb5799f74958467d1792c310.tar.gz tk-e766ee74b4cc2341eb5799f74958467d1792c310.tar.bz2 |
Add IME bindings for ttk::entry.
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/entry.tcl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 383eebd..8f21ecc 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -152,6 +152,18 @@ bind TEntry <Control-Key-d> { ttk::entry::Delete %W } bind TEntry <Control-Key-h> { ttk::entry::Backspace %W } bind TEntry <Control-Key-k> { %W delete insert end } +# Bindings for IME text input. + +bind TEntry <<TkStartIMEMarkedText>> { + dict set ::tk::Priv(IMETextMark) "%W" [%W index insert] +} +bind TEntry <<TkEndIMEMarkedText>> { + %W selection range [dict get $::tk::Priv(IMETextMark) "%W"] insert +} +bind TEntry <<TkClearIMEMarkedText>> { + %W delete [dict get $::tk::Priv(IMETextMark) "%W"] [%W index insert] +} + ### Clipboard procedures. # |