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.


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.

  • Thanks a lot. Very interesting suggestion. I will give this a try. – JasperKov Oct 17 '12 at 4: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 5: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 5:28
  • Unfortunately I don't have enough reputation to vote a question as answered yet. – JasperKov Oct 17 '12 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.