diff options
Diffstat (limited to 'library/entry.tcl')
-rw-r--r-- | library/entry.tcl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/entry.tcl b/library/entry.tcl index 0cc9ffb..8d1b1b3 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -277,6 +277,18 @@ bind Entry <Meta-Delete> { } } +# Bindings for IME text input. + +bind Entry <<TkStartIMEMarkedText>> { + dict set ::tk::Priv(IMETextMark) "%W" [%W index insert] +} +bind Entry <<TkEndIMEMarkedText>> { + %W selection range [dict get $::tk::Priv(IMETextMark) "%W"] insert +} +bind Entry <<TkClearIMEMarkedText>> { + %W delete [dict get $::tk::Priv(IMETextMark) "%W"] [%W index insert] +} + # A few additional bindings of my own. bind Entry <2> { |