I try to explain what is the problem here:
when you assign a keyboard function to an hardware button, many things may happen.
All of which you can simulate with your keyboard and a finger.
If you assign the actions "ON" and "OFF" to a hardware momentary button, when you press it it's like pressing the "L" key two times.
You get the lights on and off rapidly.
Then, if you also turn on in fsuipc the "AUTOREPEAT" function, holding down the button, will result in a repeated continous press and release of the L key, resuling in the strobing effect.
So you have to check what Peter told you about toggle and momentary.
Toggle switches are those which hold their position (like lever switches), momentary are those which hold the position only as long as you keep them pressed (like for example the keyes on your keyboard).
So if you assign a momentary action to a toggle switch, you will get repeated actions.
So please try to check you are using the correct type of action for your hardware.
If you have a two state knob or switch, use LANDING LIGHTS ON and LANDING LIGHTS OFF types for the two states of the knob/switch.
Hope this helps.