How do i add spanish accent marks

I sometimes write to a Spanish speaking friend and cannot find a way to add accent marks?

For versions V 5.1.x.y and newer see https://wiki.documentfoundation.org/ReleaseNotes/5.1#Unicode_character_input_with_Alt.2BX .
For older versions you may try the AOO extension ‘Compose Special Characters’. When I tested it some time ago it seemed to be compatible with LibO.

The easiest way is related to your operative system: just switch keyboard layout. You can either use the “English international” or directly the Spanish one. Both use the concept of “dead key”: first press the key for the accent (nothing happens), then the vowel (the accented vowel is inserted). On the “Spanish international” keyboard, on the middle right row you have K, then L, then Ñ, then [accent key].

I use for 2 decades the US-International Keyboard as main keyboard. My wife writes Spanish, I sometimes German. For us the fastest and easiest solution.