Tk Source Code

Check-in [e48b918d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add IME bindings for ttk::entry.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-39de9677aa
Files: files | file ages | folders
SHA3-256: e48b918ded2eb84d687b78661a6843c9e62524e304f5f02d23c35e07447906d6
User & Date: culler 2019-10-23 01:20:04
Context
2019-10-23
03:43
Add update idletasks for the text. Replace non-BMP characters by 0xfffd when pasting. check-in: 43e89771 user: culler tags: bug-39de9677aa
01:20
Add IME bindings for ttk::entry. check-in: e48b918d user: culler tags: bug-39de9677aa
2019-10-22
23:17
More progress on implementing IME check-in: 801f063d user: culler tags: bug-39de9677aa
Changes
Unified Diff Ignore Whitespace Patch
Changes to library/ttk/entry.tcl.
147
148
149
150
151
152
153












154
155
156
157
158
159
160
bind TEntry <<NextLine>>		{# nothing}

## Additional emacs-like bindings:
#
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 }













### Clipboard procedures.
#

## EntrySelection -- Return the selected text of the entry.
#	Raises an error if there is no selection.
#







>
>
>
>
>
>
>
>
>
>
>
>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
bind TEntry <<NextLine>>		{# nothing}

## Additional emacs-like bindings:
#
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.
#

## EntrySelection -- Return the selected text of the entry.
#	Raises an error if there is no selection.
#