Allow CapsLocks to give digits on Azerty layouts

The Azerty keyboards used in France and Belgium have the digits on the
shift level instead of on the base level of the top row. In Windows
the corresponding layouts have the curious characteristic that CapsLock
locks also the digits, meaning that some users have acquired the habit
of engaging CapsLock when they need to type some digits.

Would it be possible to recreate this behavior on KDE plasma 6 (wayland) ?

That would be the caps:shiftlock XKB option, which can be enabled on System SettingsInput DevicesKeyboardAdvancedCaps Lock behaviorCaps Lock toggles Shift Lock (affects all keys).