Accent marks?

How do I modify the keyboard so that I can get an accent on vowels by hitting alt-a, alt-e, alt-i, etc.? The keyboard modifier only seems to go as far as actions, rather than reassigning characters. The help menu, when I ask about accents, seems to want me to stop mid-word, go to insert, and then thumb through a list of special characters. Since I use accents frequently in writing fiction, and fiction-writing does not flow well if you keep having to stop mid-word, this does not look to me like a solution. Archaic programs of various brands used to make it easy to modify keyboards to include frequently used characters (I also use n with ~ on top of it, too) but they don’t run well on modern computers.

Alternately, is there some other way to get accent marks quickly without interrupting the flow of writing? Like maybe some way of making the ` land on top of the a and the ~ land on top of the n?

You might have a look at → Special characters

Please specify your OS.

Depending on what keyboard layout you normally use, I might have a solutions that works for me since Win98. I have to use my german umlaute in US.
If you are using a US Keyboard layout with Windows, you can install the US-International Keyboard (comes with Win). Now you have 2 options to insert Umlaute or spanish, french special characters like this:

  1. Press right Alt-key also called AltChr (NOT the right one) and some letter and number keys to get your stuff. E.g. AltChr+n → ñ, weird but works AltChr+y → ü.
  2. Key combination of diacritical with corresponding letter. The diacriticals are “dead keys” when pressed do not show on screen only after you enter a letter. E.g. ~+n → ñ, "+u → ü. Works for all combination with: ~ ` ^ " ’ .
    Attached is keyboard1.ods which shows option 1 layout.keyboard1.ods

Supplemental screenshots to the answer by @horst