4

Does anyone know how to write a macro for a special character?

I know LibreOffice currently doesn't have a way to set a special character to a keyboard shortcut. However, I want to work around this with a macro. My plan is to create a macro for a special character then set a keyboard shortcut to that macro. Problem is I don't know the first thing about writing a macro. Any one have a template or something that works?

I also know about the compose key, but I guess I am lazy and want to actually insert special characters with as few keys as possible.

1 Answers1

4

A macro would be overkill in this scenario. There's a much easier option: Autocorrect.

In LibreOffice Writer go to Tools --> Autocorrect:

enter image description here

Define a string and its replacement:

enter image description here

As you can see I used this method for a set of arrows and it works fine. It might not be the minimum-keystroke option you were searching for, but it sure is far less complicated than a macro.

Glutanimate
  • 21,393
  • Thanks a lot. Very interesting suggestion. I will give this a try. – JasperKov Oct 17 '12 at 04:54
  • Works just like you describe! Thanks for the insight! The only problem I see is that this only works for characters in isolation. auto-correct will not change the character if it is in the middle of a word. This is only a minor issue though. Thanks again for a great suggestion! So many props to you! – JasperKov Oct 17 '12 at 05:10
  • I'm glad my answer helped you. If your problem is solved please don't forget to mark the question as answered. That's only, of course, if noone else comes up with a better solution. – Glutanimate Oct 17 '12 at 05:28
  • Unfortunately I don't have enough reputation to vote a question as answered yet. – JasperKov Oct 17 '12 at 13:33