Operating System - HP-UX
1753701 Members
5163 Online
108799 Solutions
New Discussion

Re: Alt & Function keys - Common Development Environment?

 
RusticCajun
New Member

Alt & Function keys - Common Development Environment?

This must be a simple one for someone, but I'm stuck after trying it for a few hours....

 

Using a Windows PC, I'm connecting to an HPUX machine - version B.11.11 - through Xming, and bringing up the Common Development Environment.

 

I bring up a terminal - it looks like a dtterm.  I see "Window    Edit     Options" in the toolbar at the top.  I would like to use keyboard shortcuts to select those options - Alt+W, Alt+E, Alt+O.  The Alt key doesn't seem to function correctly.  I bring up the wdb debugger, and those shortcuts (F10, F11) do not function correctly either.

 

How can I set this up?  My TERM variable is set for dtterm, if that helps.

 

Thank you kindly,

Tom

1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Alt & Function keys - Common Development Environment?

http://www.straightrunning.com/XmingNotes/manual.php

 

Starting Xming with the -keyhook option might help, if the problem is that Windows is processing the Alt+key combinations before Xming can access them.

 

The TERM environment variable should be irrelevant for X11 applications.

 

Instead, you should run "xmodmap -pk |more" in a dtterm. The xmodmap command will contact your X server (i.e. Xming) and display a list of all X11 protocol keycodes and key symbols (keysyms) associated with them. You also should run "xmodmap -pm", which should list the keys that modify the meaning of other keys (Shift, Control, etc.). The Alt key might be known either as Meta or as Mode_switch in the X11 protocol; it depends on the overall design of Xming's keyboard mapping.

 

 

Once you have those lists, it's time to do some cross-checking. In a dtterm window, run "xev". It should open a small window on your screen; move your mouse cursor to that window and activate it. As long as the xev window is active, the command will dump information on all mouse and keyboard events to the dtterm window the xev command was started from. You can now press each of the keys and key combinations that gave you trouble and check the results. First check the modifier keys, then the "regular" keys and key combinations.

 

If pressing the key or key combination produces no output in a dtterm -> that key combination is special to Windows and it's grabbing the key event instead of passing it to Xming. The -keyhook option of Xming might help.

 

If pressing the key or key combination produces KeyPress / KeyRelease events, but the event information include "keycode <number> (keysym <something>, NoSymbol)", then the keycode is not associated with a key symbol. You should make a note of the keycode and the key symbol that should be associated with it: with the notes, you can create a text file that you can feed to xmodmap command to fix your key mappings. See "man xmodmap" for more information.

 

The same procedure applies if the key or key combination produces a wrong keysym.

 

Once you have a xmodmap file that fixes your keyboard issue, you can add the command to load it to your $HOME/.dtprofile file, so it will be automatically loaded when you start CDE. You might also want to send a copy of the xmodmap file (along with information of your Windows version and Windows keyboard settings) to the Xming developers, so that they might fix this issue in future Xming versions.

 

And by the way: CDE = Common Desktop Environment. It does not have anything special to do with development.

MK