Re: terminal with right-click = paste?
On 4/11/19, bw wrote:
>>for now I'm still of the opinion that the computer
>>should change to accommodate my work style - not the other way around.
>
> Yeah I'm down with that idea, I didn't say give up. I like the idea of
> only changing xterm, because the right click is so useful everywhere else
> you would not want to remap it globally...
>
> Looking manpage for xterm I didn't see a resource,
man xterm
<.. snip ..>
Default Key Bindings
The default bindings in the VTxxx window use the SELECT token,
which is set by the selectToClipboard resource. These are
for the vt100 widget:
Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\
Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\
Which seems to require much prior knowledge to understand, but that
seems par for the course with linux.
What I have now:
$ cat .Xresources
XTerm*.Translations: #override \
<Btn1Down>: select-start() \n\
<Btn1Motion>:select-extend() \n\
<Btn1Up>: select-end(PRIMARY, CUT_BUFFER0) \n\
<Btn3Down>: ignore() \n\
<Btn3Up>: insert-selection(SELECT, CUT_BUFFER0) \n
XTerm*charClass: 45-47:48,95:48,126:48
# Clicking the left pointer button twice in rapid succession (double-clicking)
# causes all characters of the same class (e.g., letters, white space,
punctuation)
# to be selected as a “word”. Since different people have different
preferences for
# what should be selected (for example, should filenames be selected
as a whole or
# only the separate subnames), the default mapping can be overridden through the
# use of the charClass (class CharClass) resource.
# eg. mintty: WordChars=-./_~
# 45: - (dash)
# 46: . (period)
# 47: / (slash)
# 95: _ (underscore)
# 126: ~ (tilde)
# are put in the same character class as letters & digits when selecting 'words'
lee@izzy ~
$
What's really confusing is starting xterm from the xfce4-terminal:
$ xterm &
[1] 819
lee@izzy ~
$ Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection
Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection
Warning: Actions not found: select-start, select-extend, select-end,
ignore, insert-selection
*BUT* clicking in the xterm window & doing something like
$ ls
Desktop Downloads Pictures Templates backup commands notes.bash x_home
Documents Music Public Videos bin notes.apt syncusb
and then typing "ls -l " move the mouse over "notes.bash", double
click, right click, press enter & I've got
$ ls -l notes.bash
-rw-r--r-- 1 lee lee 1313 Mar 27 16:50 notes.bash
So something fusses about the actions not being found but they still
seem to work anyway. wtf??
Obvious problem - the default menus don't happen when <ctrl>left or
right clicking in the window. I could use a pointer to which man page
describes the Meta, ~Meta, Ctrl, ~Ctrl, !Ctrl notation in the xterm
man since I'm not seeing it in 'man xterm'
> (there may be one not
> listed?) but there's an example that has some potential, but on a quick
> test here, it pastes after a right/left combination of clicks...
>
> *VT100*translations: #override \n\
> <Btn3Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\
>
> T test or refine the settings, you can drop similar snippets into
> ~.Xresources and run
>
> $ xrdb -merge ~/.Xresources
If I was more confident about how all this worked - yes. But I'm not,
so I make a change to ~/.Xresources, log out & back in to test. It's
slower, but seems like much less chance of screwing up :)
Thanks,
Lee
Reply to: