This seems like it works, but also doesn't seem like the ideal way to specify whether a layout requires big keys.  I'd prefer if the big-key information were actually encoded in the layout.js JSON, either on a per-key or per-layout basis. Can you just add a flag there, and then test the flag below?  Then you wouldn't need to pass the layoutType flag.

That seems like the cleanest way to keep the modules separate to me.