urxvt and function key middle mouse ibook

Mitchell Laks mlaks at post.harvard.edu
Tue May 24 01:03:57 CEST 2011


Hi,
I use urxvt on a mac ibook running Debian GNU/Linux and which does not have a right or middle button. When I change the settings in 
sysctl.conf
ie:
dev/mac_hid/mouse_button_emulation = 1
dev/mac_hid/mouse_button2_keycode = 87
dev/mac_hid/mouse_button3_keycode = 88

then I can copy and paste using F11
in place of the absent middle mouse button while
either 
1) in console when there is no X or 
2) in emacs while in X.

However within urxvt there is prepended 3~ in front
of the highlighted text that I want when I wish to copy.

Similarly with an attempt to use other function keys
I get similar added stuff in front of the buffer.

keys prepended 
F7   8~
F8   9~
F10  1~
F11  3~

Similarly with xterm
i get 3~ across the board (same behavior :( )

Now I would love to remove the prepended text.

I have read the man and man 7 pages and 
have only a glimmer of understanding of the complexity here.

Thus 
http://aperiodic.net/phil/archives/Geekery/term-function-keys.html

gave me some insight into the history  of function keys in the vt220 and vt100, and I am just beginning to
not understand 
echo -n "^[[?671" 

?????
or

\33]50; 
as in
          printf '\33]50;%s\007' 9x15,xft:Kochi" Mincho"
while 
"
Here's an example for a URxvt session started using "urxvt -name URxvt"

          URxvt.keysym.Prior:         \033[5~
          URxvt.keysym.Next:          \033[6~
          URxvt.keysym.Home:          \033[7~
          URxvt.keysym.End:           \033[8~
          URxvt.keysym.Up:            \033[A
          URxvt.keysym.Down:          \033[B
          URxvt.keysym.Right:         \033[C
          URxvt.keysym.Left:          \033[D
"
seems highly relevant (there are those 5~ things)
now I notice that the file /etc/X11/app-defaults/URxvt has some potential settings similar to that.

so I tried the following. 

I created a file .Xdefaults
in my home directory
and I put in a single entry

URxvt.keysym.F11:	\033[

notice i simply left out the 5~ stuff

now then i started a new urxvt 
(not from a daemon with urxvtc)
and what happens?

 with a middle button 'paste' using F11 is

1)  it no longer outputs the ~3 in front of the output, 
2)  but now it cuts off the first letter of the 
    content of the paste.

Then I tried this content in the .Xdefaults file

URxvt.keysym.F11:	\033[9

(I actually tried any \033[7 as well and they all worked
now it no longer cut off the first letter. 

So now

1. What is the meaning of this \033[8 or \033[7
which all work with no difference.
2. I understand that \033 is the escape key and [ is used
as well as part of escape sequence (???). what is the role of the placeholder 9 or 8 or 7 ??
 
So while writing this letter to you I got it working, but
I would love some insight :)
Thanks!

Mitchell Laks




----- End forwarded message -----




More information about the rxvt-unicode mailing list