Operating System - OpenVMS
1827465 Members
4912 Online
109965 Solutions
New Discussion

Re: change keyboard layout in DECterm

 
Bojan Nemec
Honored Contributor

change keyboard layout in DECterm

Hello,

It is possible to change, assign a different keyboard layout to the DECterm (maybe with some lines in the DECW$USER_DEFAULTS:DECW$TERMINAL_DEFAULT.DAT)?

Some more informations abbout the problem:

I have to build a Linux desktop for inexperted end users. They will use this desktop for running some applications on the Linux side (OpenOffice, Web browser, mail etc...) and normal VMS terminal applications.
I decided to use DECterm as the terminal emulator. The Linux box will be the X server for it.
The problem is the keyboard layout (Delete, PF keys and so on). It is possible to make a special keyboard description on the Linux box and change it with the keyboard layout switcher or xmodmap command. This works OK but can be confusing for an inexperted user (I use this on my desktop but forget several times to change the keyboard layout).
So I need a method to assign the keyboard layout only to DECterm windows and leave other windows to use the default keyboard.

For the completnes: You can see the thread I open int the linux forum:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=904310

Bojan
14 REPLIES 14
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

Sorry no solution for DECTerm or "xmodmap on the fly".
An alternative is to use xterm from the linux side, which allows You to remap keys for this use of xterm only.
The setup was posted on comp.os.vms some time ago, i have a copy in
http://wwwvms/~huber/vmsnet/vmsterm.readme
and
http://wwwvms/~huber/vmsnet/vmsterm

The version there is using ssh , but You can replace it by telnet if security is of no concern.
I had no problem using EDT or TPU editors through vmsterm so far.
http://www.mpp.mpg.de/~huber
Wim Van den Wyngaert
Honored Contributor

Re: change keyboard layout in DECterm

Bojan,

Read http://vms.tuwien.ac.at/info/tips/motif-keycodes-etc.txt

I will.

Joseph,

Can't open your url.

Wim
Wim
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

Bojan Nemec
Honored Contributor

Re: change keyboard layout in DECterm

Joseph,

I done a quick test with yours xterm solution. Its OK for a programmer (I use a similar script to run SIMH and VMS at home). But it is unacceptable for a user which works with an application and uses mostly the numeric keypad to enter numbers. The xterm sets the numeric keypad to application and does not switch between numeric and application mode (maybe I am wrong).

Wim,

I qet quick view to yours link. Mostly is speaking abbout xmodmap (I know it and I have a solution for it, it works perfectly). The last chapter (9) is interesting. Maybe a line like DECW$TERMINAL.translations: #override ... in DECW$USER_DEFAULTS:DECW$TERMINAL_DEFAULT.DAT will work, but is there any documentation abbout the syntax of this file? Need some more testing with this.

Bojan
Wim Van den Wyngaert
Honored Contributor

Re: change keyboard layout in DECterm

Bojan,

To make it more difficult : I use KEA!X on a PC as server, start the session manager on Linux and start a decterm on VMS (to PC).

Wim (reading and getting a pointy head)
Wim
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

Bojan, I don't know if it works (because just now I sit on a VMS system), but try in vmsterm to remove the keydefs for all the KP_* keys, and see if switching between KP numeric and applic. modes is working by trying with an editor.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

Wim, KEA is for Windows, no ?
Bojan wants from Linux (with it's X11 server) to VMS.
http://www.mpp.mpg.de/~huber
Bojan Nemec
Honored Contributor

Re: change keyboard layout in DECterm

Joseph,

Try to cut out the KP_1 - KP_9 keys strange things happen in editor. The same is if I cut out numlock and others.

Wim,

I am doing this to cut off Windows (to much problems). I have an xmodmap script which remaps the keyboard layout on my Linux. Maybe it will work with KEA. The problem is that you have to manualy switch the keyboard with the Linux keyboard layout switcher or with a direct xmodmap command. This is OK for me, but not for end users.

The second problem I have with end users is that they need a slovenian keyboard. On Linux they will use UTF or ISO-8859-2 character set. On VMS they use the old NRCS which replaces some 7 bit characters.

In the attachment is the file you can use to switch the keyboard. (note: the windows menu key is replaced with Do)


Bojan
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

So I suppose xterm does not implement the 'switch keypad mode" escape sequences (they are "DEC private", not ANSI escape sequences.

One last point to try out when connected through vmsterm: try the VMS commands
set term/numeric vs set term/application to see if it is switching keypad-mode.
http://www.mpp.mpg.de/~huber
Bojan Nemec
Honored Contributor

Re: change keyboard layout in DECterm

Joseph,

I try with set term/numeric -/application but the keyboard is always application.

Bojan
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

Yup, made just my own tests on Linux workstation: there is apparently no way to make xterm executing the switch keypad-mode escape sequences.
The nearest approch seems to be to have 2 vmsterm setups, one for the application keypad, one for numerical keypad. I don't know the exact xterm syntax, but one has to replace the "string(x)" part of the kp_x definitions by the plain text as written on the keycaps.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: change keyboard layout in DECterm

I made a version of vmsterm, which defines the numeric keypad:
http://wwwvms.mppmu.mpg.de/~huber/vmsnet/vmsterm_numkp

but of course for unexperienced users that's probably not convenient: if one enters a keypad editor in this mode, it's tough to come out !
http://www.mpp.mpg.de/~huber
Galen Tackett
Valued Contributor

Re: change keyboard layout in DECterm

Joseph, Bojan, and others,

The vmsterm script is just what I was looking for. I too will be using it with a simh VMS system running on OS X. The part about application vs. numeric keypad doesn't matter for me.

Thanks!

Galen

Bojan Nemec
Honored Contributor

Re: change keyboard layout in DECterm

Ok, I think I have found the solution.

Accidentaly I try the xterm from linux with the VMS keyboard set and I see that it work OK (except delete, which can be modified).
Now I take the source distribution of xterm and modify it to take two more arguments in the command line (-Fi focus in command and -Fo focus out command). When the xterm program receive the FocusIn or FocusOut event, I execute the shell command which is associated with the event. For the commands I inserted "xmodmap xmodmap.vms" for FocusIn and "xmodmap xmodmap.normal" for FocusOut.

The first tests looks good.

Bojan