Seeing as it wasn't mentioned, there's a Ukelele[0] app for making keyboard layouts for macOS. After installing a layout, switching is as easy as tapping 'fn' by itself or using the keyboard menu icon. For Windows there's MS Keyboard Layout Creator[1].