This is where programable keyboards win out when using alternative layouts.
When the layout is at the hardware level, the OS only ever sees the actual keycode for the N key, instead of an "L" which is later transcribed into "N" by the OS's layout map.