This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Final solution on using AltGr keyboard definitions with HP-UX CDE/Motif/ X11R6 and Linux/ Cygwin


Hi all,

I posted some questions sometime ago on the problem of using Cygwin in
conjunction with HP-UX 11 CDE and other X-apps. Although xterm and
hpterm were working well after editing with xmodmap, dtterm and our Sas
application -which has a Motif/X11R6 interface- weren't.

After researching and finding mails from various user groups, I found
that setting the environment variable XKB_DISABLE=1 is the solution on a
HP-UX 11 platform. Setting this parameter disables Motif XKB
translations and puts Motif apps back to good old X-handling of keyboards.

My suggestion to the editors of the Cygwin manuals would be to put this
at least in the Cygwin documentation, since I saw others in your mailing
lists having this problem.

To get dtterm or your Motif/X11R6 application working well with the AltGr key on HP-UX 11 use:

start X environment
# XKB_DISABLE=1 dtterm
or
# XKB_DISABLE=1 <your app>

Next, you will need to reassign the AltGr key (thanks to A. Gottwald and
Philippe Auclair):

xmodmap -e "clear mod5"
xmodmap -e "clear mod3"
xmodmap -e "keycode 113 = Mode_switch Multi_key"
xmodmap -e "add mod3 = Mode_switch"

Then you can modify your keyboard further with xmodmap as desired.

For convenience I added a xmodmap.es.hpux file with the definitions for
a Spanish keyboard. It is a compilation of the definitions found in the
file /etc/X11/xkb/symbols/pc/es.

You can use xmodmap both on a terminal on your X-server as in the remote
application that is using your X-server.

Beware to use xmodmap with other X-servers like the ones of Linux or
XWin32, since those will have different keycodes mapped to the keyboard!

Following the documentation you should be able to prevent the above xmodmap commands, changing one of the keyboard configurations included with Cygwin as you like using the XF86Config file.
In my case I still needed to xmodmap keys with to use their 'third' or
AltGr definition, although others said this wouldn't be necessary and
the keyboard mapping will be brought over OK the the X-server.


I included the file /etc/X11/xkb/symbols/pc/es for a Spanish keyboard
and added the option "hpux" which defines the the keyboard using the
pc/es(basic) option, but with the Mode_switch definition of AltGr. You can change as you like, and make a definition for the nodeadkeys option for example.


Activate it in your XF86Config using:

        Option "XkbLayout"   "es"
        Option "XkbVariant"  "hpux"

        Option "LeftAlt"     "Meta"
        Option "RightAlt"    "ModeShift"												
or use this command when you don't have a XF86Config file:

# setxkbmap -layout es -variant hpux


Using Cygwin with HP-UX CDE:


When you are using CDE on HP-UX you can use the following procedure,
which I found on the Internet. Check the solution at
http://aa11.cjb.net/hpux_admin/2000/12/0212.html that came from the
community:

Create the file /etc/dt/config/Xsession.d/0050.disable_xkb with the
following content:

#!/usr/bin/ksh
#####################################################################
### File: 0050.disable_xkb
###
### Purpose: disable the XKEYBOARD extension in all R6
### client software.
#####################################################################
export XKB_DISABLE=1

and give it the 755 protection.

Then put in the .dtprofile of a user the command to change his/her
keyboard layout:

xmodmap /etc/xmodmap.es.hpux

which contains a copy of the enclosed keyboard mapping.

Again: beware to use xmodmap with other X-servers like the ones of Linux or XWin32, since those will have different keycodes mapped to the keyboard!

Attachment: es
Description: application/java-applet

clear shift
clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5
keycode  10 = 1 exclam bar
keycode  11 = 2 quotedbl at
keycode  12 = 3 periodcentered numbersign sterling
keycode  13 = 4 dollar asciitilde dollar
keycode  15 = 6 ampersand notsign
keycode  20 = apostrophe question backslash questiondown
keycode  21 = exclamdown questiondown asciitilde asciitilde
keycode  26 = e E EuroSign
keycode  34 = grave asciicircum bracketleft degree
keycode  35 = plus asterisk bracketright macron
keycode  47 = ntilde Ntilde asciitilde doubleacute
keycode  48 = acute diaeresis braceleft braceleft
keycode  49 = masculine ordfeminine backslash backslash
keycode  51 = ccedilla Ccedilla braceright breve
keycode  61 = minus underscore dead_belowdot abovedot
keycode 113 = Mode_switch Multi_key
add shift   = Shift_L Shift_R
add lock    = Caps_Lock
add control = Control_L Control_R
add mod1    = Alt_L
add mod2    = Num_Lock
add mod3    = Mode_switch
add mod4    = Super_L Super_R



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]