Top Document: Motif FAQ (Part 4 of 9) Previous Document: 102) Is there an emacs binding for the text widget? Next Document: 104) How can I use a file as the text source for a Text widget? See reader questions & answers on this topic! - Help others by sharing your knowledge [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. User Contributions:Top Document: Motif FAQ (Part 4 of 9) Previous Document: 102) Is there an emacs binding for the text widget? Next Document: 104) How can I use a file as the text source for a Text widget? Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: kenton@rahul.net (Ken Lee)
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: