Parent document is top of "Motif FAQ (Part 4 of 9)"
Previous document is "110) Is there an emacs binding for the text widget?"
Next document is "112) How can I use a file as the text source for a Text widget?"
111) What if I have problems with the backspace/delete keys?
[Last modified: Dec 94]
Answer: mclarnon@maths.ox.ac.uk (Gerald.McLarnon) writes:
I am running a precompiled program based on motif and am having some problems
with the backspace/delete keys. Following the instructions of the faq I put th
e following lines in my .Xdefaults file
*XmText.translations: #override <Key>osfDelete:
delete-previous-character()
*XmTextField.translations: #override <Key>osfDelete:
delete-previous-character()
This meant that in dialogue boxes (such as 'Open File') the delete key
deleted to the left, but not in the main application window.
Any hints for someone who isn't much of an X-pert?
David Kaelbling <drk@x.org> replied:
There are a couple possibilities. In addition to the precedence of loading
resource files (explained in section 2.3 of the X11R5 X Toolkit Intrinsics
manual), resource values in the database are chosen based on a "most explicit
match" algorithm (i.e. those with the most qualifiers on the left hand side
win -- see section 15.2 of the X11R5 Xlib - C Library manual). So if this
application's app-defaults file or fallback resources says
*Foo*XmText.translations:... that value will be used instead of yours.
Find the app-defaults file for your application and look to see if it
specifies translations for text widgets in the main application; if it does
you'll need to make yours at least as explicit.
If the app-defaults file isn't the problem then the application may be hard-
wiring the translations. If that's the case you'll probably have to change
your virtual key bindings so that the key you think of as osfDelete is really
osfBackSpace. You can do that for an individual application by setting its
defaultVirtualBindings resource, or for all Motif applications with a
$HOME/.motifbind file ("man xmbind" and "man VirtualBindings" give more detail
and alternatives). In either case you'll need to specify a complete list of
virtual key bindings; there is no equivalent to #override. To find out your
current virtual key bindings run "xprop -root | fgrep BINDINGS" and clean up
the result.
Parent document is top of "Motif FAQ (Part 4 of 9)"
Previous document is "110) Is there an emacs binding for the text widget?"
Next document is "112) How can I use a file as the text source for a Text widget?"