decw$terminal.translations

Linux, Unix, Windows..

Moderator: Moderators

decw$terminal.translations

Postby zoli » Fri Apr 08, 2005 7:31 pm

hi,

I work in a mixed enviroment on X where I use Decterms (decw$terminal clients) together with other applications. It's very inconvenient to switch keyboard layout each time when I switch betwen the applications.

My questions is if decw$terminal is able to assign characters and escape sequences to keyboard events (similar to xterm's translation method (xresource xterm*vt100*translations). I've found that it can be done with any applications which use XmText widget (I don't know if decterm use this or not).

I've tried a lot of xresources but none of them worked:
decw$terminal.translations:
decw$terminal.main.translations:
decw$terminal.main.terminal.translations:
decw$terminal.XmText.translations:

I would like to know if decterm is able to do such a translation and if possible then how it can be set up.

This question is already asked on HP's ITRC without any response :(
Regards,
Z
---
Zoltan Arpadffy
zoli
Forum Admin
Forum Admin
 
Posts: 756
Joined: Mon Sep 30, 2002 1:27 am
Location: Stockholm, Sweden

Postby miker_alpha » Sun Apr 10, 2005 12:48 pm

Tis is the closest I could find to an answer:

---
Trying to use a Sun 5 keyboard with VMS apps that want a VT100/200 keyboard

There are (at least) two aspects of this - a mapping for the
Sun's xterm and a mapping for X as such (Xmodmap). The former
is used when you have an xterm local to the Sun and are telnetting
to the VMS box. The latter when you have a DECterm client running
on the VMS box and displaying on the Sun's screen.

Note that I did have some problems getting this all working right.
For example, sometimes (as I recall it, in the latter case) you
get this really irritating problem where the shift-comma and
shift-period keys don't send angle brackets, but rather just
commas and periods. (That was fixable via the Options->Keyboard
panel within DECterm.) But anyway, here goes.

1. xterm resource file. This goes into ~/Xdefaults

xterm*VT100.Translations: #override \n\
<Key>F3: string(0x1b) string("[A") \n\
<Key>F4: string(0x1b) string("[B") \n\
<Key>F5: string(0x1b) string("[D") \n\
<Key>F6: string(0x1b) string("[C") \n\
<Key>F7: string(0x1b) string("OS") \n\
<Key>SunF37: string(0x1b) string("Om") \n\
<Key>F9: string(0x1b) string("Ol") \n\
<Key>R1: string(0x1b) string("[A") \n\
<Key>R2: string(0x1b) string("[B") \n\
<Key>R3: string(0x1b) string("[D") \n\
<Key>Num_Lock: string(0x1b) string("[C") \n\
<Key>R4: string(0x1b) string("OP") \n\
<Key>R5: string(0x1b) string("OQ") \n\
<Key>R6: string(0x1b) string("OR") \n\
<Key>KP_Subtract: string(0x1b) string("OS") \n\
<Key>R7: string(0x1b) string("Ow") \n\
<Key>R8: string(0x1b) string("Ox") \n\
<Key>Up: string(0x1b) string("Ox") \n\
<Key>R9: string(0x1b) string("Oy") \n\
<Key>R10: string(0x1b) string("Ot") \n\
<Key>Left: string(0x1b) string("Ot") \n\
<Key>R11: string(0x1b) string("Ou") \n\
<Key>R12: string(0x1b) string("Ov") \n\
<Key>Right: string(0x1b) string("Ov") \n\
<Key>R13: string(0x1b) string("Oq") \n\
<Key>R14: string(0x1b) string("Or") \n\
<Key>Down: string(0x1b) string("Or") \n\
<Key>F35: string(0x1b) string("Os") \n\
<Key>KP_0: string(0x1b) string("Op") \n\
<Key>KP_Decimal: string(0x1b) string("On") \n\
<Key>KP_Enter: string(0x1b) string("OM") \n\
<Key>KP_Add: string(0x1b) string("Ol")

2. Xmodmap changes.

In your .xinitrc, you should run xmodmap:

xmodmap .Xmodmap.new # make keypad VT100ish

Xmodmap.new should look something like this:
(based upon Jim <pflugrath@cshl.org>'s posting):

!Jim <pflugrath@cshl.org>
!
! Last modified: 9-Sep-1990
!
! Input file for xmodmap. This file is used to re-map a Sun4 right keypad
! into a VT100 style right keypad.
!
! See 'man xmodmap' for more details.
!
! Usage: xmodmap this_file
!
! Or place following 3 lines into ~/.xinitrc
!if [ -f $HOME/.xmodmaprc ]; then
! xmodmap $HOME/.xmodmaprc # Install user-defined keyboard mapping
!fi

!
keycode 28 = Left
keycode 29 = Right
keycode 30 = KP_Separator comma
! keycode 52 = KP_F1 KP_Equal
keycode 105 = KP_F1 KP_Equal
keycode 53 = KP_F2 KP_Divide
keycode 54 = KP_F3 KP_Multiply
keycode 78 = KP_F4 KP_Subtract
!
! The Sun4 + key is really 2 VT100 keys: , and - so use the Shift modifier
! to mimic this. This means the loss of the normal Sun4 function
!
keycode 132 = KP_Separator KP_Subtract KP_Add
keycode 75 = KP_7
keycode 76 = KP_8 Up
keycode 77 = KP_9
keycode 98 = KP_4 Left
keycode 99 = KP_5
keycode 100 = KP_6 Right
keycode 119 = KP_1
keycode 120 = KP_2 Down
keycode 121 = KP_3
keycode 101 = KP_0
keycode 57 = KP_Decimal
keycode 97 = KP_Enter

--

... Maybe there's enough information here to start approaching the problem?

... Actually now I re-looked at it, this is a solution to the opposite problem: Going _from_ Unix *to* VMS...
but anyway,
HTH,
MikeR
Last edited by miker_alpha on Sun Apr 10, 2005 2:15 pm, edited 1 time in total.
Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby miker_alpha » Sun Apr 10, 2005 2:07 pm

Also, have a look at the OpenVMS FAQ, in the
http://eisner.decus.org/vms/vmsfaq_016.html#keymapping section.

Thinking it over again (that's three!)
Can the "Define/Key" command help you?
($ Help Define /Key ... )

MikeR
Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby zoli » Tue Apr 12, 2005 12:08 pm

Miker,
Thank you for help...
I'll try and come back with the result.
Regards,
Z
---
Zoltan Arpadffy
zoli
Forum Admin
Forum Admin
 
Posts: 756
Joined: Mon Sep 30, 2002 1:27 am
Location: Stockholm, Sweden


Return to Operating systems

Who is online

Users browsing this forum: No registered users and 5 guests

cron