Thanks, but disciple had mentioned it already.slavvo67 wrote:I have another solution; it's called RoxTerm.
Copy any selection to clipboard
Mochi's syntax to copy the terminal selection into the clipboard via Shift+Ctrl+c is as follows:
This works fine on my system. I now also know I can use Shift+Insert to do the opposite - paste the clipboard into the terminal.
I would like to set up a keyboard shortcut similar to Mochi's but the other way around - I want to copy the clipboard into the terminal using the Shift+Ctrl+v shortcut. I have tried the following without success:
The syntax appears right (when I manually enter it into a terminal to see what it does) but it doesn't seem to work when I am working in a terminal, or in geany. I'm very hazy about the difference between primary selection, secondary selection, and clipboard selection - is my syntax failing to select the correct destination buffer before pasting? Am I totally going in the wrong direction?
Also - I notice a slight difference between:
and
The latter syntax (using capital 's') seems to operate twice.
Can anyone suggest a way to activate the shift+ctrl+v shortcut to paste the clipboard into the terminal?
I also tried the following but I'm totally stabbing in the dark here:
Code: Select all
<Key mask="CS" key="c">exec:xclip -o|xclip -sel clip</Key>
I would like to set up a keyboard shortcut similar to Mochi's but the other way around - I want to copy the clipboard into the terminal using the Shift+Ctrl+v shortcut. I have tried the following without success:
Code: Select all
<Key mask="CS" key="v">exec:xdotool key shift+Insert</Key>
Also - I notice a slight difference between:
Code: Select all
xdotool key shift+Insert
Code: Select all
xdotool key Shift+Insert
Can anyone suggest a way to activate the shift+ctrl+v shortcut to paste the clipboard into the terminal?
I also tried the following but I'm totally stabbing in the dark here:
Code: Select all
<Key mask="CS" key="v">exec:xclip -i|xclip -sel prim</Key>
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
No, you can't. That's why I said that it's getting complicated. You can paste the (primary) selection into a terminal with Shift+Insert, but not the clipboard content. In an ordinary application window it's the other way round: Shift+Insert can't paste the primary selection, instead it pastes the clipboard content.greengeek wrote:I now also know I can use Shift+Insert to do the opposite - paste the clipboard into the terminal.
As a gentle reminder: My subject here is copy, not paste. I know that they are related and I admit that pasting is a much more interesting subject, but with pasting clipboard/primary selection to/from terminal window/application window using mouse/keyboard offering endless opportunities for questions (and confusion) I would rather like to keep it separate.
I suggest to post questions related to paste in the recent thread keyboard shortcuts to copy/cut & paste urxvt text?
Hello Mochi.
In any case, thanks to you and BarryK's reminder, I have a brand new
xclip installed in my Puppy.
As for me, I find it easier to highlight in the console (by dragging the
mouse over a line) and drop in another console or in a X app (with
middle button).
Such confusion of words!!! BFN.
musher0
In any case, thanks to you and BarryK's reminder, I have a brand new
xclip installed in my Puppy.
As for me, I find it easier to highlight in the console (by dragging the
mouse over a line) and drop in another console or in a X app (with
middle button).
Such confusion of words!!! BFN.
musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
I pointed to the thread but not the jwm-working post (though I did say it needs xsel in addition to xdotool as xclip does not have the -x function, the board exchange)greengeek wrote:I want to copy the clipboard into the terminal using the Shift+Ctrl+v shortcut. I have tried the following without success:
The syntax appears right (when I manually enter it into a terminal to see what it does) but it doesn't seem to work when I am working in a terminal, or in geany.Code: Select all
<Key mask="CS" key="v">exec:xdotool key shift+Insert</Key>
This being a "copy" thread I just wanted to alert the tread owner in case interested.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- Puppus Dogfellow
- Posts: 1667
- Joined: Tue 08 Jan 2013, 01:39
- Location: nyc
have you triedgreengeek wrote:Mochi's syntax to copy the terminal selection into the clipboard via Shift+Ctrl+c is as follows:
This works fine on my system. I now also know I can use Shift+Insert to do the opposite - paste the clipboard into the terminal.Code: Select all
<Key mask="CS" key="c">exec:xclip -o|xclip -sel clip</Key>
I would like to set up a keyboard shortcut similar to Mochi's but the other way around - I want to copy the clipboard into the terminal using the Shift+Ctrl+v shortcut. I have tried the following without success:
The syntax appears right (when I manually enter it into a terminal to see what it does) but it doesn't seem to work when I am working in a terminal, or in geany. I'm very hazy about the difference between primary selection, secondary selection, and clipboard selection - is my syntax failing to select the correct destination buffer before pasting? Am I totally going in the wrong direction?Code: Select all
<Key mask="CS" key="v">exec:xdotool key shift+Insert</Key>
Also - I notice a slight difference between:andCode: Select all
xdotool key shift+Insert
The latter syntax (using capital 's') seems to operate twice.Code: Select all
xdotool key Shift+Insert
Can anyone suggest a way to activate the shift+ctrl+v shortcut to paste the clipboard into the terminal?
I also tried the following but I'm totally stabbing in the dark here:Code: Select all
<Key mask="CS" key="v">exec:xclip -i|xclip -sel prim</Key>
Code: Select all
<Key mask="CS" key="v">exec:xdotool click 2</Key>
(plus return)
on this page and entered xdotool click 2 into the terminal and it opened /mnt in rox--may be worth a shot. if it works you could make it a script called called m2 or c2, which may be just as easy.
________
there's also
from http://askubuntu.com/questions/302263/s ... -the-mousecontrol-A will take you to the beginning of the line.
control-K will kill the whole line that you have just entered.
control-Y will yank the text back.
yank apparently means paste rather than pull, or at least that's what it does. i guess it's yanking it from a buffer or a memory of having the cursor go over the path of the text--there's no highlighting that i can see, but ctrl+k cuts it, and ctrl+a copies it. short of something like > /root/thiscommand.txt added to the output (i don't know the syntax for print or echo or what else would be needed/better, but ctrl+Home echo Enter after adding > /blah appears to work), i don't see a way to get it off the terminal with the built in options--it's not using the primary or secondary to store what ever it's passing over/munching.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
While the JWM shortcut proposed in the initial post is very simple, here is an even simpler alternative:
Using a desktop icon for shortcut configuration.
Advantages:
1. Create icon as in screenshot (click on "(click to set)" to define shortcut)
2. Select text in console and press Ctrl+Shift+c or click icon to copy
3. Use normal Ctrl+v in to paste the selected text
Notes:
Using a desktop icon for shortcut configuration.
Advantages:
- Not restricted to a particular window manager
- No need to edit jwmrc-personal
- No need to restart JWM (hence no screen flicker!)
- Easy to change and disable
- Allows code execution with keyboard or mouse
1. Create icon as in screenshot (click on "(click to set)" to define shortcut)
2. Select text in console and press Ctrl+Shift+c or click icon to copy
3. Use normal Ctrl+v in to paste the selected text
Notes:
- Even for users who don't care for desktop icons (me !), the ease to enable/disable keyboard shortcuts make it an interesting alternative
- Works also for panel icons. As shortcuts only work as long as the panel is enabled/visible, switching panels allows different shortcut sets
- JWM and icon shortcuts apply system-wide and can override built-in shortcuts like Ctrl+c or Shift+Ins, so use whith care. If the same shortcut is defined in JWM and in an icon, JWM will prevail.
- Placing script code directly into the icon (or into jwmrc-personal) is my preference for short code. No scripts lying around, faster execution. Most users will find it easier to create a script. Create a script /usr/bin/mm_copy
Drag the file /usr/bin/mm_copy to the desktop and assign shortcut.
Code: Select all
#!/bin/sh xclip -o|xclip -sel clip
- Copying console text is only one example to copy stuff to the clipboard which normally can't be copied. Much more interesting is copying file selections in ROX. With a corresponding paste shortcut it is possible to forget drag&drop and use - hold your breath - genuine copy&paste in ROX ... nothing is impossible
- Attachments
-
- Shortcut_via_desktop_icon.png
- (20.48 KiB) Downloaded 318 times