Solved

Number Pad on AIX 4.3.3 running mwm

Posted on 2004-04-13
16
1,263 Views
Last Modified: 2013-11-17
I have a network of NCD 88Ks running mwm from my AIX box and all is well.  Due to administration We are putting up WinXP PCs with Cygwin to get to the R/S6000.  This is working fine, except that the numbers on the number pad do not function at all.  The NumLock will toggle the indicator light, but nothing happens with the keys.  The / * - + and ENTER keys all work, nut not the numbers, or .  This is true on all the WinXP PCs and one PC running Red Hat 9.

When I instaled the NCD 88K X stations I had this problem, but was able to get the number pad to work by adding the following to .xinitrc    xmodmap -e "remove mod2 = Num_Lock" -e "add mod5 = NumLock".  Does anyone have any ideas??  Thanks

Chris
0
Comment
Question by:powellca
  • 7
  • 5
  • 2
16 Comments
 
LVL 20

Expert Comment

by:Gns
ID: 10821522
Um, is that remapping in effect  for your Cygwin X sessions too? Have you tried removing it?
On w2k/cygwin
XWin -query aix5.2_host
works OK... But I do realise that things might be (drastically:) different for that;-)

-- Glenn
0
 

Author Comment

by:powellca
ID: 10825621
If I get a shell on the Cygwin PC the number pad works fine.  I run the following to get to X on the AIX box:
start XWin -query %REMOTE_HOST% -lesspointer -kb -fp tcp/%REMOTE_HOST%:7100

The -kb switch is needed to get cygwin to work with AIX.

I also get the same behavior executing an rsh from a linux box to AIX.  Now wth that said, all the AIX sessions are using aixterm as the terminal.  I did open and xterm session and the numberpad numbers showed garbage when pressed - and it was the same garbage regardless of the numlock state.

0
 
LVL 20

Expert Comment

by:Gns
ID: 10831868
> The -kb switch is needed to get cygwin to work with AIX.
The qualifier should perhaps be "with AIX 4.3.3":-).
It seems to me this is in part what messes things up... When I run with this set, keypad is seriously messed up in xterm and dtterm (5.2 with CDE...), and no reaction whatsoever in aixterm.
Whith it unset, I get a fully working xterm (honouring the Num_Lock) and a dtterm that give numbers etc regardless of Num_Lock state... and still not a twitch in aixterm.
Using VT102 mode for aixterm (-v) correctly gives keypad escapes without Num_Lock, but the letter "X" for all the numbers with Num_Lock... Sigh. Not really wellbehaved:-). Also works pretty strange with vnc.

Are "locked into using aixterm" for some reason? Or could xterm be an alternative?

-- Glenn
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:powellca
ID: 10834265
I ran Xwin -query AIXHOST to start a session without the -kb switch.  The only change I found was that with NumLock active the keyboard was non-functional at the login screen.  If I turned NumLock off I could log in but the behavior was unchanged from when -kb was active.  I started xterm without the -kb switch and the number pad returned text, but was all garbled - regardless of the numlock state.

I am kind of locked into aixterm.  One application we run is character based and and is set for aixterm.  I suppose its possible to get it to run in xterm, but would take some changes to get it to "look right".

Chris
0
 
LVL 20

Expert Comment

by:Gns
ID: 10840407
> returned text, but was all garbled - regardless of the numlock state.
Do you still have the "Num_Lock remap" in effect? That lilely would make the numlock key nonfunctional (try the scroll_lock:).

Hm, I'm not giving up on you, but... I'm off to the dentist (removal of "wisdom-tooth"... <Shudder>), so likely wont have time until next week to look at this. It's not helping that I'm so far from the "exact same setup"... hmmm. I wish gheist would join us, I suspect he's got some likely candidate systems to test on (AIX 4.3.3 and cygwin-on-XP instead of 5.2ML2 and cygwin-on-w2kpro).

-- Glenn
0
 
LVL 62

Expert Comment

by:gheist
ID: 10848019
> One application we run is character based and and is set for aixterm
export TERM=xterms before runing anything inside aixterm, XFree86 uses a bit different key codes.
0
 
LVL 20

Expert Comment

by:Gns
ID: 10857671
Seems like aixterm is rejecting the KP_# ... If you "xmodmap -e 'keycode 79 = KP_Home 7" (instead of KP_7), you should get the numeral. Ugly. BTW gheist, on my setup, setting xterms didn't help.
BTW, do you get working arrow keys? I don't.

-- Glenn
0
 

Author Comment

by:powellca
ID: 10858992
Another Monday .....

Well, setting TERM=xterms had no effect.  I tried the xmodmap command, and that had no effect either.  I don't get any response from the 10 number keys or . (del) key regardless of numlock state.

I know this is probably an unanswerable question, but where are the places the mapping could be altered?  I can only guess that there is something, somewhere changing the mapping.

Chris
0
 
LVL 20

Expert Comment

by:Gns
ID: 10859077
Check this:
Start the XWin ... as usual
Open a terminal emulator (any:-), and allow the PC running cygwin to connect to the display:
xhost + localhost
start a cygwin bash shell in windoze
in that shell, set display and start an xterm with
export DISPLAY=:0
xterm
in the xterm (that should end up on the cygwin X session) start the xev application
place the mousepointer inside the "event window"
press one of the keypad keys... What keycode/keysym combination does it report? (read the text in the xterm...)

-- Glenn
0
 

Author Comment

by:powellca
ID: 10859415
When pressing the 7 (home) key I get:

keycode 79 (keysym 0xff95, KP_Home)

Chris
0
 
LVL 62

Expert Comment

by:gheist
ID: 10861615
and what does same action from old terminal show ????
0
 
LVL 20

Accepted Solution

by:
Gns earned 125 total points
ID: 10868119
Put this in a file afile :
keycode  79 = 7 Home
keycode  80 = 8 Up
keycode  81 = 9 Prior
keycode  82 = KP_Subtract
keycode  83 = 4 Left
keycode  84 = 5 KP_Begin
keycode  85 = 6 Right
keycode  86 = KP_Add
keycode  87 = 1 End
keycode  88 = 2 Down
keycode  89 = 3 Next
keycode  90 = 0 Insert
keycode  91 = Delete KP_Decimal

And then do
xmodmap aa
You should now have working numbers (and arrow keys) _without_ Num_lock. Could only get the reverse to work... incidentally:-).
Something seems to be up with aixterm, it seems to have a bit too much of a view on what it accepts as keysyms:-).
On AIX5.2 (with CDE) a remote client has to setup the keyboard itself... dtlogin/Xsession will only take care of local dislays (which is sane:)... You should perhaps try determine that it is so for your version too.

-- Glenn
0
 

Author Comment

by:powellca
ID: 10869293
Thank you - The above worked almost flawlessly.  The only key not working is keycode 91 . del  This now just prints garbage - but it does print something.  The keys work as numbers regardless of the num_lock state - but thats not a problem for me.  Thanks for the time, hope the points help.
0
 
LVL 20

Expert Comment

by:Gns
ID: 10869465
:-) ... Points are such ... edible things:-)
Take care.

-- Glenn
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sed -- search an replace multiple pattern 11 76
CPU monthly average? 12 119
Write an app 10 70
bash while loop reading input from data section in script 7 69
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question