Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2599  / 3 Years ago, mon, june 28, 2021, 6:13:48

I was wondering if it is possible to add a keybind to paste the x-clipboard in Lubuntu.
(primary selection)



If possible to keybind it, would you still be able to use the middle-click too?
Is there perhaps a clipboard manager that supports this?



Thanks in advance,
Zarnaik



Edit: Thanks to Kupiakos for providing a solution. I have not tested it in Ubuntu, Lubuntu only.


This is how I did it.

First run




sudo apt-get install xsel xvkbd




to install the necessary packages. Then open the openbox configuration file as so




gedit ~/.config/openbox/lubuntu-rc.xml




replacing gedit by whatever text-editor you use.


Once inside the file look for the <keyboard> tag and add the below code.



<keybind key="W-v">
<action name="Execute">
<command>sh -c 'xsel | xvkbd -xsendevent -file -'</command>
</action>
</keybind>


I configured it to work with Super + v, but you can easily adjust that. Save the file and make openbox notice the change by executing




openbox --reconfigure




That's all there is to it.

Again thanks to Kupiakos for providing the command that I still fail to understand.


More From » xorg

 Answers
3

  1. Run this command to install the necessary X utilities: sudo apt-get
    install xsel xvkbd


  2. Navigate to the Shortcuts section of the Keyboard Settings in System
    Settings.


  3. Create a new custom shortcut. Put whatever you want in the Name
    field.


  4. In the Command field, put this: sh -c 'xsel | xvkbd -xsendevent
    -file -'
    .


  5. Click Apply.


  6. Click on the far right of the new row you created (where it says Disabled) and set the new keyboard shortcut.


  7. Try it out!



[#31931] Tuesday, June 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
azaaburge

Total Points: 266
Total Questions: 85
Total Answers: 109

Location: Djibouti
Member since Sat, Oct 29, 2022
2 Years ago
;