Also if you are on Windows you can use Microsoft Keyboard Layout Creator (MSKLC) which is a free tool to develop keyboard layouts.