Um, if your primary use is typing accented letters, why don't you just set a compose key? The character sequences you need to type are much more intuitive, and you don't get this type of problem.
In my case, I have scroll lock (the most useless key on the keyboard) set as a compose key. To get "é", I type scroll lock, then e, then '.
You can set a compose key using setxkbmap, for instance setxkbmap -option compose:sclk
. (If scroll lock isn't to your liking, there are a number of other modifier keys that can be used instead—list here, starting around line 810.) You can also specify it permanently using X configuration files, although I don't know the exact method.