I am using mainly an English keyboard layout for convenience while programming, but my main language has some letters that aren't available in that layout. Since using two different layouts is really confusing to me I decided to always use the English layout if possible. If the letter I want to type doesn't exist in the English layout I switch the layout for that one letter only.
Currently I am doing that using a keyboard shortcut to switch the layout (see here: How to switch language keyboard combination?)
So what I do is:
switch layout
hit desired key
switch layout back to English
It would be much more convenient to have the layout switch back after one keystroke automatically.
Does anyone have an idea how I could do that?