summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl24
1 files changed, 19 insertions, 5 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 0cc9ffb..2aab934 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -74,11 +74,6 @@ bind Entry <<TraverseIn>> {
# Standard Motif bindings:
-bind Entry <Map> {
- if {[tk windowingsystem] eq "aqua"} {
- ::tk::RegisterServiceWidget %W
- }
-}
bind Entry <1> {
tk::EntryButton1 %W %x
%W selection clear
@@ -277,6 +272,25 @@ bind Entry <Meta-Delete> {
}
}
+# Bindings for IME text input and accents.
+
+bind Entry <<TkStartIMEMarkedText>> {
+ dict set ::tk::Priv(IMETextMark) "%W" [%W index insert]
+}
+bind Entry <<TkEndIMEMarkedText>> {
+ if { [catch {dict get $::tk::Priv(IMETextMark) "%W"} mark] } {
+ bell
+ } else {
+ %W selection range $mark insert
+ }
+}
+bind Entry <<TkClearIMEMarkedText>> {
+ %W delete [dict get $::tk::Priv(IMETextMark) "%W"] [%W index insert]
+}
+bind Entry <<TkAccentBackspace>> {
+ tk::EntryBackspace %W
+}
+
# A few additional bindings of my own.
bind Entry <2> {