1

In Microsoft Windows 10 and Notepad, or LibreOffice, or more generally, is there a way to add to the menu that pops up when right clicking an option to paste with quote marks added, so that I don't need to use the keyboard at all?

I find it quite a hassle to add quotes. If this is not possible how about a way print a single quote mark, so that I can add quotes at the start and finish of what I have pasted without using the keyboard?

For example, I'd like to be able to use only the mouse and screen to select and copy:

a hassle to add quotes

and then paste it in to Notepad, say, and see it with quotes around it:

"a hassle to add quotes"

I hope that makes my question clear.

I just found out from the XMBC website Microsoft has something called Intellipoint. Would that be able to solve the problem? "Originally, I wrote XMBC because Microsoft was slow to release a proper working Intellipoint package for Windows XP x64 back in 2003/4. They have released such a package now but as far as I'm concerned, they were too slow!. Anyway, XMBC is tiny in comparison, takes far fewer system resources and offers more functionality and configuration options, including different button mappings for individual applications!"

My need is for something that is safe, easy, and that I don't need to troubleshoot. I am not as nerdy as I would like to be.

  • What are you pasting that needs quotation marks? General text or specific text e.g. file paths with spaces? – Anaksunaman Nov 01 '21 at 12:04
  • @Anaksunaman I guess general text. I don't know what you mean by "specific text" or "file paths with spaces". – Matthew Christopher Bartsh Nov 01 '21 at 16:19
  • I was just trying to figure out any special needs you might have which could possibly influence an answer. Regarding file paths, paths with spaces often require quotes when used in e.g. scripts (which technically could be done in any text creation software). – Anaksunaman Nov 01 '21 at 16:47
  • @Anaksunaman I see. No worries :) – Matthew Christopher Bartsh Nov 01 '21 at 17:21
  • Any reason you don't want to use the keyboard? Because I find that the fastest way to do this is 1) Type 2 quotes; 2) Press the left arrow key once; 3) Press Ctrl+V. I don't think there's a general way to do this by using the mouse only. For any office application it would probably be possible to write a macro and add that to the context menu, but in Notepad that's definitely not an option. – Berend Nov 02 '21 at 11:04
  • @Berend I seem to have to use the mouse to select and copy the text, so it seems easier to continue with the mouse when accessing Notepad and then pasting in the text. It's a hassle to switch to the keyboard for the final part, don't you think? – Matthew Christopher Bartsh Nov 03 '21 at 04:45
  • For me it's moving my hand *to* the mouse in the first place that is a hassle ;-) As to your question, I just remembered I once had a mouse with some extra buttons that could be linked to certain actions. Maybe you could get one of those, and assign a 'quote-paste-quote' macro in AutoIt? – Berend Nov 03 '21 at 07:25
  • @Berend My mouse has left click, right click, two buttons on the left side, one button on the top, and a wheel that can be pushed down like a button. I have no idea what the extra buttons do. It says on the base: "GIGABYTE GM-M6800 optical mouse... Made in China". How hard would be to do it in AutoIt? I have mastered the basics of Python (I'm a beginner student), but not of BASIC, and Wikipedia says AutoIt is like BASIC. What else could I do with AutoIt? – Matthew Christopher Bartsh Nov 03 '21 at 09:54
  • I'm not quite sure. I remember having to install a vendor specific mouse driver first (in my case, Logitech), because the default driver only provides basic configuration. This added extra options to the Windows mouse configuration screen, in which I could set specific actions for each button. You could try and see if you can set one of the buttons to execute a keyboard shortcut. Then use that same shortcut in AutoIt to run a macro. I haven't used AutoIt myself, so I can't help you there, I only know what sort of things you can do with it. Feel free to ask about that in a new question. – Berend Nov 03 '21 at 11:17
  • There's also the [Mouse and Keyboard Center](https://support.microsoft.com/en-us/topic/how-do-i-reassign-mouse-buttons-8012f6b3-3b63-fd3f-39f0-30fde318db09). Gigabyte mice are not listed in the list of supported devices, but it may be worth to try anyway. – Berend Nov 03 '21 at 11:21
  • I saw this app in another question, and remembered yours. Apparently it lets you assign (multiple) keystrokes to a mouse button. So I think you could set this up to type `"`, `Ctrl+V`, `"`. https://www.highrez.co.uk/downloads/XMouseButtonControl.htm – Berend Nov 16 '21 at 09:02
  • @Berend Thanks for remembering. Which other question was that? – Matthew Christopher Bartsh Nov 18 '21 at 14:06
  • https://superuser.com/questions/1687600/is-it-possible-to-make-the-mouse-in-windows-click-on-the-down-press-without-the/1688074#1688074 – Berend Nov 18 '21 at 15:50

1 Answers1

0

Using macros it is possible to add this functionality directly into LibreOffice Writer

Enabling Recording of Macros

  • Choose Tools->Options...->Advanced
  • Ensure you have a Java Runtime Environment installed. If not then you should rerun the LibreOffice installer and ensure the option is ticked, then return to this dialog
  • Ensure the Enable macro recording (may be limited) checkbox is ticked
  • Click the OK button to save settings Advanced settings

Creating the Macro

  • Copy some text to the clipboard using another program
  • Choose Tools->Macros->Record Macro
  • Type a ", press ctrl + v, then type another "
  • Click the Stop Recording button in the little popup window
  • A dialog appears
  • Give the macro a useful name like "PasteQuoted" (no spaces allowed) and save under My Macros

Adding the Option to the Context Menu

  • Choose Tools->Customise...
  • Click the Context Menu tab
  • From the Target dropdown on the right-hand side, choose Text
  • From the Category dropdown on the left-hand side, choose Macros
  • Locate the macro you recorded earlier within the Function tree-view and select it
  • Click the -> button to add it to the context menu
  • The text can be customised
    • Ensure the newly added item is selected
    • Click Modify->Rename
    • Enter the desired text, e.g. "Paste with Quotes"
    • Click OK
  • You may also want to change the item position using the up and down arrows
  • Click OK to close the main dialog Customising menu

The right-click menu should now show the option and clicking it should do what you asked

enter image description here enter image description here

Many other applications also support macros and can have this functionality added using a similar procedure, for instance Notepad++ which is an powerful replacement for Notepad.

James P
  • 11,206
  • 5
  • 43
  • 50