Ask Your Question

How can I create a keyboard shortcut for highlighting text in LO Writer?

asked 2019-09-20 02:01:53 +0100

tonyz gravatar image

I have set a custom KB shortcut under Tools -> Customize -> Keyboard but it isn't working. Any help would be appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2019-09-20 08:27:01 +0100

ajlittoz gravatar image

Highlighting text is not an "action" on text. It is an additional attribute on a character.

To achieve your goal, you must first define a character style with the specific colour selected as Background. Give a name to this style. You can now give it a keyboard shortcut.

This shortcut is not auto-toggling like Ctrl+B or I. I suggest you also associate a keyboard shortcut to character style Default Style so that you can cancel the effect of highlighting from the keyboard.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

edit flag offensive delete link more


Thanks a lot @ajlittoz I followed your logic and it worked. I created a character style (corrected by your bold text since I had first created a paragraph style) then assigned it a shortcut. But to undo the highlighting, I created another character style calling it "Unhighlight" then assigned it a shortcut. I'm so happy to have this shortcut as it will save me much time when typing. Thank you very much. Unfortunately I can't upvote your answer since I have less than 5 points. All the same, you've been of great help.

tonyz gravatar imagetonyz ( 2019-09-21 12:34:41 +0100 )edit

CAUTION! Applying a style with forced highlighting "None" is not the same as having no character style applied. If you want to cancel your highlighting style, it is better to apply Default Stylecharacter style. It is not a real style. Its effect is to remove any character style to restore formatting state to the one defined in the current paragraph style. This is why I gave you this advice.

ajlittoz gravatar imageajlittoz ( 2019-09-21 13:11:15 +0100 )edit

Thanks for that. I've just implemented your advice and it works well. Strangely though, upon closing Writer, my shortcut is not saved. The name of the new character style is no longer displaying in the "Category" and "Function" boxes while the shortcut key in the "Shortcut Keys" box is replaced by a string which looks like a reference. Is there something I am doing wrongly? By the way this happened even before implementing your followup advice.

tonyz gravatar imagetonyz ( 2019-09-21 21:49:19 +0100 )edit

I tested it just now. The shortcut is kept after close/reopen as expected. My OS is Linux.

Shortcuts are stored in user profile. Path to it is hinted in Tools>Options, LibreOffice>Paths. Check that write permission is enable on the main directory and all others above it.

ajlittoz gravatar imageajlittoz ( 2019-09-22 08:37:59 +0100 )edit

I'm using Win 10 and I've seen that the new character style and its shortcut are saved with the open document. If I reopen the document used to create the new style, both the style and shortcut are present and working. If I open a new Writer document, the style is missing and the s/cut indicates a reference instead of the KB keys set for the shortcut. I'm thinking of creating a template which has the s/cut working and using that.

tonyz gravatar imagetonyz ( 2019-09-22 17:58:40 +0100 )edit

Custom styles are always stored in the document. It is intentional. I don't know for shorcuts and, effectively, I reopened the same document. Consequently, my test is not conclusive.

A template is the recommended way to ensure all documents will look the same. It is also an excellent idea to store shortcuts inside.

ajlittoz gravatar imageajlittoz ( 2019-09-22 19:39:56 +0100 )edit

You've been of great help. Thanks and God bless you.

tonyz gravatar imagetonyz ( 2019-09-22 19:45:45 +0100 )edit

Thanks for the help.

xz1m gravatar imagexz1m ( 2020-07-18 18:42:57 +0100 )edit

answered 2020-11-25 05:41:17 +0100

houdini68 gravatar image

updated 2020-11-25 07:03:04 +0100

Creation of a new Character style e.g. HL_YELLOW
apply highlighting yellow and save the new HL_YELLOW character style.


Click into the shortcuts->type the desired shorctcut. e.g. CTRL+H

Into the function, Styles→Character→HL_YELLOW

Remark:we shouldn’t have to go to ‘Styles→Character’. Typing HL_YELLOW should be enough!

Click on ‘modify’

Do the same a same for CTRL+SHIFT+H and assign ‘default character style’.It is not a toggle. It means we put back the ‘default character style’.

Click on 'OK'



To the developers of Libre Office. In the keyboard shortcuts we can find 2x 'Highlight Color' and 1x 'Highlight fill'. It is misleading and fustrating to allow the user to assign those functions to keyboard shortcuts with no effect at all! If the function can't be used then do not list it! Read above. We should be able to type HL_YELLOW and assign it to a shortcut. This is extremely frustrating...

edit flag offensive delete link more



First, this is not an answer to the question.

Next, the audience here is peers - we are users just as you are and trying to help others with our experience.

Finally, all feature requests should be made to Bugzilla. See -> Feature Requests

Ratslinger gravatar imageRatslinger ( 2020-11-25 06:07:43 +0100 )edit

Thanks for the suggestion. I will fill a 'feature request'.

houdini68 gravatar imagehoudini68 ( 2020-11-25 06:54:54 +0100 )edit
Login/Signup to Answer

Question Tools



Asked: 2019-09-20 02:01:53 +0100

Seen: 918 times

Last updated: Nov 25 '20