Your confusion seems to be that diacritics are always typed the same way. It's not like that. Different languages type differently, different keyboard layouts type differently
The general use of non-Hungarian Latin special characters (and I guess this is the same of all the Latin keyboards) is the following: first the accent should be written, and then the base character should be pressed.
If the diacritic is typed before the character then it's called a dead key, because in real typewriters that key doesn't move the cursor which means what was typed will be combined with the base letter later. However some languages doesn't use dead keys at all. For example in the standard Vietnamese keyboard layout (which no one uses) all the diacritics are type after the base letter, producing a combining character. Vietnamese people actually use the US layout with an IME and type the diacritic according to some rules after the base letter and the sequence will be transformed to the correct word by the IME
Many other languages' keyboards have specific keys for the accented letters, so they don't use dead keys either. For example French keyboard have a dedicated key for é, è, à... so they just press those keys directly without any ` ́ accents
Some keyboard layouts use the AltGr key to produce accented letters instead. The international US layout uses just AltGr without any dead keys. Some other layouts use both dead keys and AltGr keys
AltGr generally produces the whole key, not dead key, so if ~ and ` are typed by AltGr in your layout then you can't use it to make accented letters. If there are ñ or è in any AltGr combination then you can use it, otherwise you have to use other ways to type those letters
- One of the ways is to use Alt codes. This is useful if you don't type that character frequently. Just enable hex numpad and press Alt+++code
- Another way is to create a keyboard layout for your own using Microsoft Keyboard Layout Creator. This way you can also remove unused keys or reorder keys to make typing more efficient. For example you can load the Hungarian layout and add dead keys for French/Spanish and now you can type multiple languages at once without changing layout. You can use any combination of dead keys and/or AltGr keys to type any Unicode characters
Of course AutoHotkey is also a solution
See also