Hi,

I was going to ask the list for help with a problem configuring X
modifier keys, but I finally found a solution.  So instead I'll
describe the problem and solution in the hopes that it saves somebody
time in the future.

I was having trouble configuring the more unusual X modifiers keys
(Meta, Super, etc) to get them passed through VNC correctly.  I didn't
find a clear solution in the archives.

I am running vncserver on a RedHat 7.3 box and running vncviewer as
display :1 in full screen mode on the same computer with no window
manager.  I'm using VNC version 4.0-0b4.

My keyboard has a second set of "alt" keys.  When running without VNC,
these keys are processed as Super_L and Super_R, and are in the "mod4"
modifier group.  I've used those keys in lots of nifty gnome bindings.

But I couldn't get VNC to pass these keys through reliably.  I tried
lots of contortions with xmodmap before I found one that worked.

The first point is that, although X without VNC used mod4 for the
super modifier, I had to use mod5 within Xvnc.  (How is it decided
what name to give to each modifier, anyway?)  So I tried the obvious

    $ xmodmap -e 'add mod5 = Super_L Super_R'

This didn't give any error messages, but it didn't seem to have any
effect either, and "xmodmap -pm" showed mod5 still being empty.

A search through the mailing list archives gave me some ideas.  The
problem seems to have been that Super_L and Super_R were assigned
dynamic keycodes, and for some reason that prevented them from being
added to mod5 (why???).  What finally worked was to assign these keys
fixed keycodes right after starting Xvnc, but before setting the
modifier:

    $ xmodmap -e 'keycode 128 = Super_L'
    $ xmodmap -e 'keycode 129 = Super_R'
    $ xmodmap -e 'add mod5 = Super_L Super_R'

The numbers 128 and 129 are arbitrary except that they should be
outside the range of pre-assigned keycodes.  With these settings the
super keys work perfectly.

Yours,
Michael

--
Michael Haggerty
[EMAIL PROTECTED]
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to