1

Is there any way to configure that when I select text (anywhere in GUI) and then press the " key, the selected text do not get replaced by the quote char but instead gets wrapped in quotes char?

Where should I look for this functionality to be working? Should this be a gnome/kde? or more like a linux kernel thing?

jperelli
  • 113

1 Answers1

0

You can emulate this functionality using the tools xsel and xvkbd. They allow you to create a shortcut that simulates typing the last selected string enclosed with double quotes.

First, install them:

sudo apt-get install xsel xvkbd

Then assign this command below to a custom keyboard shortcut, like Ctrl+2:

bash -c 'xvkbd -file <(printf "\"%s\"" "$(xsel)")'

If you don't know how to create custom shortcuts, take a look at How to add keyboard shortcuts?

Byte Commander
  • 107,489