You could make your own keyboard layout with Ukelele or edit the keylayout files that come with it in a text editor. You'd have to use another modifier key like the right option though.
- Open
Serbian.keylayout and U.S..keylayout from Ukelele's disk image in a text editor.
- Copy
keyMap and keyMapSelect elements from the Serbian layout to the U.S. one, and increment their indexes, and add rightOption to the modifier tags in the keymaps.
- Change the modifier keys of the original keymaps so they only use the left option.
- Change the name and id of the new layout and save it to
/Library/Keyboard Layouts/.
- Log out and back in and enable the input source in the Language & Text preferences.
Applying changes to a keylayout file currenly requires logging out and back in after for example adding or removing a file in ~/Library/Keyboard Layouts/ or running touch ~/Library/Keyboard\ Layouts/.
It gets even more complicated though:
I found a nicer way to do it with KeyRemap4MacBook:
<?xml version="1.0"?>
<root>
<item>
<name>test</name>
<identifier>private.test</identifier>
<autogen>--KeyToKey-- KeyCode::F1, KeyCode::VK_NONE, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CHANGE_INPUTMODE_GERMAN, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CHANGE_INPUTMODE_ENGLISH</autogen>
</item>
</root>
VK_CHANGE_INPUTMODE_SERBIAN doesn't currently work, but you might be able to add Serbian to inputsourcedef.xml. You can remap caps lock to an F-key with PCKeyboardHack.