As freddie has mention its very easy with hotkeynet

<Hotkey F1>
<SendWin aoc1>
<Key X>

<Hotkey F2>
<SendWin aoc2>
<Key Y>
This will work fine if you want to send 2 different keys to 2 different clients by pressing 2 different keys.

However the example freddie has provided does it all with one key. As you probably know, sometimes you only need 1 person to cast a spell, or cast and attack, so the separate hotkeys is always going to be useful.