Operating System - HP-UX
1752749 Members
4756 Online
108789 Solutions
New Discussion юеВ

Re: Failure of Alt-Gr definition in X

 
Roberto_80
Occasional Advisor

Failure of Alt-Gr definition in X

The keyboard in use to connect from a WinXP PC in the LAN doesn't transmit AltGr
key combinations. Having used xmodmap -pk I see that the 3rd definition of a key
is not defined. I can define it by hand which works fine for hpterm and xterm,
NOT for dtterm.

firstly: what should I do to get this working from the start of a users session?
secondly: what should I do to get it working in dtterm?

The system is accessed through CDE at the HP and Cygwin at the client├В┬┤s side.
11 REPLIES 11
Mark Grant
Honored Contributor

Re: Failure of Alt-Gr definition in X

dtterm is a bit rubbish isn't it!

To get the users key map set up at start you just create a standard keymap file which you call $HOME/.xmodmaprc. You then put the xmodmap command in the users .profile.

If it is a system wide problem you can put the xmodmap command in /etc/profile, put your keymap file somewhere central like /etc/xmodmaprc and use /etc/xmodmaprc as an argument to your "xmodmap" command.

I do not know how you achieve the same thing with dtterm but I think you might have to use the -xrm argument and a resource string of some kind. The only X resources I know about for dtterm are here (near the bottom of the page)

http://www.biostat.wisc.edu/cgi-bcg/man.cgi?section=all&topic=dtterm
Never preceed any demonstration with anything more predictive than "watch this"
Rick Beldin
HPE Pro

Re: Failure of Alt-Gr definition in X

dtterm might be having problems if the PC Xserver supports the XKB (KEYBOARD) extension. HP's implementation of Xlib doesn't have full XKB support, and this can cause problems with systems that support it.

Prior to running dtterm:

# export XKB_DISABLE=1

to see if this addresses the problem.

The main difference between hpterm and dtterm in this area is that hpterm is based on X11R5 which never supported XKB and dtterm is based on X11R6 which did. Setting the environment variable forces dtterm down the 'old' path and may offer some relief.

Other symptoms of the XKB failure include the inability of the shift lock to operate properly.
Necessary questions: Why? What? How? When?
Roberto_80
Occasional Advisor

Re: Failure of Alt-Gr definition in X

the .xmodmaprc file I configured. I have put it in my home directory with the 755 protection, but it doesn't seem to execute. Please supply
more information on how to use it when logging on via X/ CDE.

I have put XKB_DISABLE in the /etc/profile file, but it doesn't make any difference to dtterm.
Mark Grant
Honored Contributor

Re: Failure of Alt-Gr definition in X

Roberto, I'm a bit unclear, are you saying that you have the xmodmaprc file AND you have put "xmodmap" either in the users startup scripts somehwhere (.dtsession,.xsession or the system wide Xsession or wherever makes sense with CDE)
Never preceed any demonstration with anything more predictive than "watch this"
Roberto_80
Occasional Advisor

Re: Failure of Alt-Gr definition in X

.xmodmaprc is just there without being called from .profile or
/etc/profile. It works if it is executed by hand.

I guess it should be executed as soon as a X-application is started.
Mark Grant
Honored Contributor

Re: Failure of Alt-Gr definition in X

Roberto,

I think you need to put the "xmodmap" command in .dtprofile
Never preceed any demonstration with anything more predictive than "watch this"
Roberto_80
Occasional Advisor

Re: Failure of Alt-Gr definition in X

Excuse me for the delay in replying you back.

I tried to put the xmodmap command in .dtprofile.

It helps to define the keys for hpterm and xterm. The altGr key is not
working for dtterm however, nor for the X-application of sas we use.

Please tell me what to do
Mark Grant
Honored Contributor

Re: Failure of Alt-Gr definition in X

Roberto,

This is quite an interesting link. It would seem dtterm, being Motif handles things slightly different. It seems you might need to put an override in the Xdefaults file. If your appliaction is based on Motif, it will have the same problrm as dtterm. Anyway, have a look and let us know if you need any help with it. At least, let us know how you get on!

http://www-h.eng.cam.ac.uk/help/tpl/unix/xkeys.html
Never preceed any demonstration with anything more predictive than "watch this"
Roberto_80
Occasional Advisor

Re: Failure of Alt-Gr definition in X

I could not find any information on the link you supplied :-(