cancel
Showing results for 
Search instead for 
Did you mean: 

RXVT

SOLVED
Go to solution

RXVT

Rxvt appears not to take notice of the translation override within the .Xdefaults, without that how can I map ESC[OT to shift-F1 ? I've tried lots of ways but no luck so far. Has anyone had any experience of rxvt that would assist me?
12 REPLIES
Goran Koruga
Honored Contributor

Re: RXVT

Hi.

Why would you want to do that ?

G.

Re: RXVT

I'm using rxvt as a straight forward emulator but I've had to edit and recompile it to allow it to do slave printing as per vt100 terminals. The keyboard layout we use is a customised version of a vt100 with a PC layout. My ususal .Xdefaults with vt100*translation override works perfectly for xterm but rxvt appears to ignore it. I've tried messing with the terminfo for rxvt with no luck and am now resorting to the keysym settings. This has worked for F1 - F12 but when I came to do the shifted keys I found S-F1 S-F2 S-F11 S-F12 dont seem to have a keysym entry in keysymdef.h nor does Shift-Tab. I really need some assistance with this, I've spent the best part of a week trying to resolve a keyboard setting, and its starting to get to me.
Goran Koruga
Honored Contributor
Solution

Re: RXVT

OK, try this :

rxvt*keysym.0xFFC8: aaa

See what pressing Shift+F1 gives you.

G.

Re: RXVT

Fantastic ! That sorts my S-F1 and S-F2, what do I need for the S-F11, S-F12 and S-Tab? thank you very much.
Goran Koruga
Honored Contributor

Re: RXVT

Hi Simon.

I am not sure if you can modify the string that's generated for Shift+key variants.

I think this only allows one to alter the keystrings for keysyms 0xFF00 - 0xFFFF (function, cursor keys, etc).
Take a look at /usr/X11R6/include/X11/keysymdef.h, I am not sure if you can use it for multi-key combinations.

But it might work if you modify your configuration so that they generate unused keysym-s (i.e. F30 and up), and then assign desired keystrings to these.

I have tried to toy with this briefly, but to no avail. I'll try to figure it out later at home.

G.

Re: RXVT

The keys I now have a problem mapping are F11 and F12. The keysyms 0xffbe - 0xFFD5 seem to be fine for normal and then shifted F1 - F10. I'm having trouble getting the keysym for F11 and F12.

As for the back tab could I change that via an stty setting? similar to the way I can change the backspace from ^? to ^h?
Goran Koruga
Honored Contributor

Re: RXVT

Simon, as promised, here's the ugly hack to doit (sorry, but it's all I can come up with) :

1. remap they key that's generated with Shift-F11 (I opted for F10)

xmodmap -e 'keycode 95 = F11 F10'

2. override keystring as generated by rxvt

rxvt*keysym.0xFFD1: aaa

Repeat the procedure for F12 (its keycode is 96), but do not use F11 keysym.
Maybe it's best if you use F9 and F10 for Shift-F11 and Shift-F12, respectively.

My guess is that you can do the same with Shift-TAB, let me know if it doesn't work out for you and I'll have a look.

The downside of this is that Shift-F11 will generate Shift-F10 event in my case, I hope that's OK for you.

G.

Re: RXVT

Once again - thanks for the help. I now have my F11 and F12 working as I want (mapped them to XP_F1 and XP_F2 keysyms so I preserve the F1-F10). I think I understand xmodmap enough to get the Shifted F11 F12 sorted. The shift tab is going to be a redefinition of the ISO_Left_Tab.
Goran Koruga
Honored Contributor

Re: RXVT

Hmm the above should be a config to get F11 and F12 keys working too. It worked OK for me when i tested it at home.

G.

Re: RXVT

Can you confirm that this is what I should be doing.
To map shift Tab to ^P - I've done xmodmap 'keycode 23 = F30', then in my .Xdefaults I've got rxvt*keysym 0xFFDB: ^P

Re: RXVT

I must have been looking at this too closely. I'm type to map Tab and ShiftTab so that Tab produces a standard tab and shifttab produces ^p, I've run xmodmap -e 'keycode 23 = Tab F29' then in my .Xdefaults I have a mapping for the 0xFFDA (F29) to be ^P. Running xev in the rxvt window and pressing tab and shifttab shows my mappings as expected. When testing the actual codes produced in vi using control-V prior to pressing the key I get Tab correctly but the shift is not what I mapped. This is getting very confusing! Any ideas?

Re: RXVT

Thanks for the assistance and forget the last update - my ignorance of how the xmodmap mapping works, I've just twig'd and remapped SF11, SF12 and STab correctly.