LO writer: insert special characters by shortcut keys

Hi there. Is there any way to choose shortcut key to insert special character while using LO Writer? I often use this: « and this: » and it’s quite annoying always having to open the Special Characters menu and insert them manually. If I could choose any shortcut keys, it’d be really easier and quicker. Thanks.

OP: @ggbb84

See also → Special characters
(I. Macro · II. Extension “Compose Special Characters”)

The advantage over "AutoCorrect Replace":

You don’t need a space in front of the key combo for the special character.

Adapted explanation – sample: « »



I. Macro

Replace "Sub insert_integral" with (e.g.) "Sub left_guillemet"

Replace "&H222B" with "&H00AB"

Replace "Sub insert_integral" with (e.g.) "Sub right_guillemet"

Replace "&H222B" with "&H00BB"

II. Extension "Compose Special Characters"

A. Compose Special Characters (CSC)

Type: << → CSC shortcut

Result: «

Type: >> → CSC shortcut

Result: »

(my CSC shortcut: Alt+F8)

B. Compose Unicode Characters (CUC)

Type: 00AB → CUC shortcut

Result: «

Type: 00BB → CUC shortcut

Result: »

(my CUC shortcut: Alt+F9)

EDIT 2012-12-10

Don’t forget to set (and type) a flag character for Calc, e.g.: *

(see the image above: Instructions · Spreadsheets).

Shortcut keys don’t work but you can use the autocorrect option to insert your special characters.

Insert e.g. « into your text as you do normally, then highlight it and go to Tools->Autocorrect Options … ; the replacement window pops up and has the symbol already in the “With”-box entered, enter << in the replace-box, check “Text only” and click New and OK.

Repeat for all special characters you want.

Next time you have only to type << and with the next character you type after that it changes to «.

I think almost as fast as a shortcut key.

Here’s a non-LibreOffice solution that will work in any Windows app, including LibreOffice:

  1. Install AutoHotkey and start it

  2. After it’s running, right-click the program icon and click “Edit this script”

  3. Insert lines like this:

     ::<<::« ;  left guillemet
     ::>>::» ; right guillemet
  4. Save the script

  5. Right-click the icon again and “Reload this script”

Now when you type >> in any program, it will be converted to ». If that happens too often, you can add some escape character like this:

::|<<::« ;  left guillemet
::|>>::» ; right guillemet

So it will only be converted when you type |>>, or you can make up whatever combination of keys you want.

I tried to repeat above explanations but Writer does not replace the short character string I type with the long character string set as replacement.
When opening Tools menu there is a item AutoCorrect, clicking the item does not change the behavior of Writer.
Is there somewhere a setting (check mark) needed to enable the AutoCorrection function?

LibO 3.5.7 on XP/SP3

(1) Menu Format → AutoCorrect → ☑ While Typing (enabled) — (2) Replacement and exceptions for language: [All] or your text language.

@manj_k all is set as you indicated, but still it doesn’t replace the short string with the long string.
Do you possibly have another idea???

Great! I’ve just installed Compose Special Characters extension and have chosen the shortcut key. At first I wasnt able to make the extension work, then I realized I first have to type the key that’s already assigned by the extension, then the key that I’ve chosen. Now it works perfectly and I guess it’ll turn out to be useful in the future, too.

I chose the extension also because I totally dont know how to deal with Macro’s.

Thanks a lot anyway! :slight_smile:

Oh well, now there’s a little problem: typing “Shift + s” in order to get the capital “s”, doesnt work. I’ve also tried to uninstall both the extension and LibreOffice, and then reinstall LO, but it doesnt work. If the extension is installed, “Shift + s” simply doesnt lead anywhere. If the extension is not installed, this is what I get:

The translation of the first words is: “Error in the scripting scheme during the execution of the script Basic […]”. What can I do now? Thanks.

It seems that you have selected "Shift+S" as CSC shortcut.
How to remove it (with the installed extension):
Menu Insert → Compose Character... → CSC shortcut →
Select ☑ Shift → Select ☑ character → s → Press "Clear shortcut". You will be asked to remove the shortcut: press Yes.

(2) If you don’t remember the shortcut: Open Writer, menu Tools → Customize → Keyboard tab → *Category:* LibreOffice Macros → user → ComposeSpecialChars → modCode → *Function:* ComposeSpecialChar. That will show your assigned shortcut key, press "Delete" → "OK". (The same for Calc.)

These answers seem much more involved than simply using an ALT+nnn combination (on the numeric keypad) in order to insert a special character. LibreOffice used to work this way: for instance, I could insert an a with an umlaut by simply holding down the ALT key and pressing 132 on my numeric keypad. However, this recently stopped working. Does anyone know if LibreOffice recently changed the way special characters are inserted, requiring the “Insert” menu?

Still works for me in LO3.6.4. BUT you have to use the left ALT-key. The right ALT-key is actually ALT+CTRL.

I think that’s an OS thing, not a LO thing. I think setting up an AHK shortcut is easier in the long run than memorizing a bunch of completely arbitrary numbers. |>> is way more memorable than Alt + 0187.

These two are mainly use in Arabic text a lot. The easiest way to do it as follows bellow;

We are actually going to make it work as auto text…

1- enter both characters (« ») manually from Insert > Special Characters
2- select of them (say « ) and press ctrl+f3, Name it, and give it a shortcut (I use single quote ’ for «, and double quote ‘’ for »).
3- Click on Autotext dropdown menu, and choose “New”.
4- Click Close.

Now, do the same for the next sign » and follow the above steps. Give it a different name and shortcut, I give double quotes ‘’ as name and shortcut.

From now on, whenever you want to insert these signs, press the shortcut and then press F3, and you are done.
عطاء رفیع

For those ust to the - shortcuts in MS Word, this is the equivalent. Excellent answer.