Re: Alt & Function keys - Common Development Environment? (585 Views)
Reply
Occasional Visitor
RusticCajun
Posts: 1
Registered: ‎01-13-2012
Message 1 of 2 (593 Views)

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

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 2 (585 Views)

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
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.