The two applications that I use are not open source, but are free.
For quick keyboard representations within Windows, I use
Keyboard Designer which is part of
Qliner Hotkeys. The main application (Hotkeys) is similar to AutoHotkey and the installer places a process in the Run key of your registry (I remove it because i don't use that feature).
You can set height and width of keys and spaces and even do multi-height keys like ISO Enter. You can not change the angle of keys, do a column-staggered layout, or multi-line text on the keys. Also, color and font options are global - you can't make the color of some keys different than others. The user interface looks like this:

If you need to do multi-line text, column-staggered layout, angled keys, or truly odd shaped keys, you will need a graphics or CAD program. If you ever want to turn you layout into a real keyboard, you will need CAD.
DeltaCad is the easiest, most intuitive CAD application that I have used and the full functional demo is good for 90 days before print/save is disabled (re-install to get another 90 days). The UI looks like this:
