[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: terminal with right-click = paste?



On 4/18/19, bw <bwtnguy@yahoo.com> wrote:
> In-Reply-To:
> <[🔎] CAD8GWsuBwSUoZHXEou7-dUGZdqXeVjjF_T8-4cBQkn2-VFLiog@mail.gmail.com>
>
> Thanks for your posts, it was very helpful and nice of you to follow up.
> I have some isssue on the list, so CC: your email to make sure you get my
> thanks for your time!
>
>>If anybody knows where the modifiers (Meta, Ctrl, Lock, etc) and
>>qualifiers (~!@ etc) are documented, please share.
>
> The xterm FAQ said XTerm's manpage does not document the syntax for X
> resources it is:
>
> "...in the X documentation." but I don't know myself, there's some old
> guys that may know. I hope they post some more info in this thread.

Yeah.. I was hoping someone would give me some links to the official
documentation but apparently this is the wrong mailing list for those
kind of questions.

> I like xterm!  I started using it yrs ago, stabbing at it in blind
> ignorance.  After a few yrs, I'm thinking this program was written by
> some really intelligent people, to be really useful in many different
> environments, and really stable and reliable.  It's hard to configure, but
> once you set it up the way you want, you won't have any problems.

I agree.  On the one hand, it's impressive that it can be customized
so much.  On the other hand, the documentation leaves much to be
desired.

In any case, the man pages and
https://invisible-island.net/xterm/xterm.html  eventually got me
there.  I think.

What I have now:

- left double-click selects a "word"
- the "word" definition is expanded from alphanumeric to alphanumeric
+ characters I normally use in a filename
- left triple-click selects a line
- left click <here> and shift+left-click <there> selects all the
characters from <here> to <there>
- left-click-and-hold, move the mouse, let go of the mouse button
selects all the characters you moused over
- right click pastes

NB: my testing was minimal & I don't know what the default behavior is
supposed to be, so it's quite possible I've introduced breakage
without realizing it.  I quit testing when 'left double-click on a
filename, right click' pasted the filename & 'left click here,
shift+left click there, right click' pasted in everything from here to
there.

$ cat .Xresources
XTerm*faceName: DejaVu Sans Mono
XTerm*faceSize: 12

XTerm*scrollBar: true
XTerm*rightScrollBar: true

XTerm*VT100.geometry: 120x24
! NOTE: XTerm*geometry: NxN  also changes the popup menu size!

XTerm*VT100.Translations: #override \n\
   None              <Btn1Down>:  select-start() \n\
   None              <Btn1Motion>:select-extend() \n\
  ~Ctrl ~Meta  Shift <Btn1Down>:  start-extend() \n\
  ~Ctrl ~Meta        <Btn1Up>:    select-end(PRIMARY, CUT_BUFFER0) \n\
  ~Ctrl ~Meta ~Shift <Btn3Down>:  ignore() \n\
  ~Ctrl ~Meta ~Shift <Btn3Up>:    insert-selection(SELECT, CUT_BUFFER0)

! ---     https://invisible-island.net/xterm/xtoolkit/intrinsics.html#Translation_Table_Syntax
!  If the modifier list has no entries it means "don't care" on all modifiers.
!  If "None" is specified, it means no modifiers can be asserted.
!  An exclamation point (!) at the beginning of the modifier list
means that the listed
!    modifiers must be in the correct state and no other modifiers can
be asserted.
!  If any modifiers are specified and an exclamation point (!) is not
specified, it means that the listed
!    modifiers must be in the correct state and "don't care" about any
other modifiers.
!  If a modifier is preceded by a tilde (~), it means that modifier
must not be asserted.
!
! select-start()
!   This action begins text selection at the current pointer location.
! select-extend()
!   This action tracks the pointer and extends the selection. It
should only be bound to Motion events.

------------ <aside> I came across the Unix Haters Handbook while
trying to figure out  how to modify the xterm button behavior..  I
also have the bad habit of
  What documentation was actually written—the infamous Unix “man pages”—was
  really nothing more than a collection of reminders  for  people  who
 already  knew
  what  they  were  doing.
------------ </aside>

XTerm*VT100.charClass: 45-47:48,95:48,126:48
! I like being able to double-click on a filename & having the text selected
! So add dash (45), period (46), slash (47), underscore (95) and tilde (126)
! to the aplhanumeric character class (48)
!   man xterm
!   / int charClass
! the number below the character is the character class
! notice that all the letters & digits are character class 48
!
! $ echo -n "-./_~" | od -a -td1
! 0000000    -    .    /    _    ~
!           45   46   47   95  126
! 0000005


Regards,
Lee


Reply to: