Subject: FVWM: Motif osfCopy in fvwm 2.4.15

From: Charles Gagnon <[email-masked]>
Date: Mon, 10 Feb 2003 11:32:07 -0500

It there a way to map the Motif osfCopy and osfPaste functions on
myh keyboard somewhere using fvwm 2.4.15.

I run fvwm on a Sun running Solaris 8. I have a commercial
application that uses those two funtions. Using dtwm, those
functions are normally mapped to the Copy and Paste key of the Sun
keyboard.

I'd like to reproduce this in fvwm2. Any ideas?

-- 
Charles Gagnon                   | My views are my views and they
http://unixrealm.com             | do not represent those of anybody
[email-masked]           | but me.

   Do they use sterilized needles for lethal injections?
        -- Dennis Miller
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Mon, 10 Feb 2003 13:00:05 -0500

> I'd like to reproduce this in fvwm2. Any ideas?

This doesn't have anything to do with Fvwm.

Under CDE take a look at the environment variable
XKEYSYMDB.  Make sure you set it to point at the same file
when running Fvwm.

I'm pretty sure that will do it for you.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Charles Gagnon <[email-masked]>
Date: Mon, 10 Feb 2003 15:00:32 -0500

I think it is fvwm but maybe I'm explaining wrong.

That application remaps the entire keyboard and mouse functions. So
inside the application, the Cut/Copy/Paste keys work fine. The
problem starts when I'm trying to Cut/Copy/Paste from outside (say,
from an Xterm) to that app.

In normal CDE, the Cut/Copy/Paste keys are mapped to osfCut, osfCopy
and osfPaste functions. So I select some text somewhere and hit the
Copy button, I can than go inside the app and hit the paste button
and it works fine.

When running fvww, those keys are not mapped to anything so of
course, it doesn't work.

And since the app remaps the entire keyboard layout and mouse
functions, the middle-mouse-button pasts function does NOT work.

Any ideas?

   What was the best thing BEFORE sliced bread?
        -- Dennis Miller

---

From: Dan Espen <[email-masked]>
Date: Tue, 11 Feb 2003 21:34:36 -0500

> functions, the middle-mouse-button pasts function does NOT work.

I'm not sure I understand.  Maybe this will help.

The copy key, like any key generates a key code.
Thats a number.

X associates the key code with a keysym.
You can see the key code and the keysym by using
/usr/openwin/demo/xev

just start it up, move the pointer into the window and press the
key.

Motif apps, for some crazy reason, have their own names for
the keys, thats the name "osfCopy", etc.

As far as I know, most Motif apps have a KEYSYMDB that they
use to understand keys.

Heres one line from one of the many KEYSYMDB files on my system:

osfCopy                         :1004FF02

I think what this is doing is telling the Motif app how to
convert the scan code to the Motif name "osfCopy".

"Normal" x application just use the keysym.

If you are trying to get an XTerm to understand the copy/paste keys,
you need to find out what X resources have been set for the xterm.
Try this in CDE:

appres XTerm

This might show some translations that have been set up so that
XTerm knows how to use a keysym to do a copy.
Look for something like this:

*VT100.Translations:    #override  ...
        <Key>F16: start-extend() select-end(PRIMARY, CUT_BUFFER0, CLIPBOARD) \n\
        <Key>F18: insert-selection(PRIMARY, CLIPBOARD) \n\

You can put those translations in a file and use
xrdb to load them when you start fvwm.