Auto switch input source to English when entering Spotlight, typing URL in Safari, etc I don't have files with non-english names, and don't type non-latin URL's, so question is how to auto switch system input source in these occasions.
Using KeyRemap4MacBook, you could save something like this as private.xml:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
&lt;item&gt;
&lt;name&gt;test1&lt;/name&gt;
&lt;identifier&gt;test1&lt;/identifier&gt;
&lt;only&gt;SAFARI&lt;/only&gt;
&lt;autogen&gt;__KeyToKey__ KeyCode::L, VK_COMMAND | ModifierFlag::NONE, KeyCode::L, VK_COMMAND, KeyCode::VK_CHANGE_INPUTMODE_ENGLISH&lt;/autogen&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;name&gt;test2&lt;/name&gt;
&lt;identifier&gt;test2&lt;/identifier&gt;
&lt;autogen&gt;__KeyToKey__ KeyCode::SPACE, VK_COMMAND | ModifierFlag::NONE, KeyCode::SPACE, VK_COMMAND, KeyCode::VK_CHANGE_INPUTMODE_ENGLISH&lt;/autogen&gt;
&lt;/item&gt;
&lt;/root&gt;


It only works with those two shortcuts and it doesn't change the input source back later though. See the source for the key code values and predefined settings.

Alfred has an option to always switch to a specific input source: