How to use keyboard with english variant that has accents?

For GNOME, see Problem with `xkbOptions` - it doesn't seem to take effect - #2 by jtojnar