KJN: The ntext package provides a bindtags binding tag named Ntext for use by text widgets in place of the default Text binding tag.
DOCUMENTATION
SUMMARY
The purpose of the ntext package is to make the text widget behave more like other text-editing applications. It makes the text widget more useful for implementing a text editor, and makes it behave in a way that will be more familiar to most users.
Package ntext's functions and variables are contained entirely in the ::ntext namespace; its other code is contained in the binding tag Ntext. ntext has no exports to the global or other namespaces, and no new widget commands. It uses modified copies of the Tk code, leaving the original code, and the Text binding tag, unchanged.
The differences between the Ntext binding tag and the default Text binding tag are in three categories:
DOWNLOAD
ntext is under consideration by one of the Tcl/Tk libraries. In the meantime it can be obtained from [L5 ]. Tcl licence applies.
FEEDBACK
Bug reports, feature requests, and discussion are most welcome, either to this page or to comp.lang.tcl (on c.l.t. please put ntext in the subject line). Tests on the following hardware are particularly welcome:
HISTORY
An earlier version was posted on this Wiki as Modern Bindings for the Text Widget.
What are sensible defaults for the text widget? The possibility of changing some of the default bindings was discussed on that page. Examination of the code for text shows that some of the apparent anachronisms of the text bindings are in fact deliberate choices - e.g. pasting with <Control-v> when a selection exists - on other platforms the selection is deleted, on X11 this is not the case, but this is not because of any limitation of X11: the code specifically checks whether it is using X11 so that it can behave differently on that windowing system.
Recent X11 desktops such as KDE and GNOME behave more like Windows or OS X than like Motif or CDE, so the question arises of whether Tk should follow the same trend. What would users prefer? As Vince suggested, a TIP would be the right way to propose any change, but it would be useful to have some feedback first on what users would prefer as the default. Opinions please, on this page or on c.l.t. (as above please put newText in the subject line).