vt-middleware / passay

Password policy enforcement for Java.
http://www.passay.org
Other
275 stars 63 forks source link

Added keyboard sequence for german QWERTZ layout. #133

Closed giraone closed 2 years ago

giraone commented 2 years ago

I have added the keyboard sequence for the standard german keyboard layout, where y and z (and some other special characters) are placed differently compared to the english layout. I did not copy the full tests, that are made for USQwerty, but this is not necessary - the functionality does not depend on the layout itself.

I was unsure about the naming - you may also name the enum entry "DEQwertz", if the focus is on ISO country codes and not language codes. "DE" would be the correct ISO 3166 Alpha-2 country code for Germany. In the long run, this would be correct, because e.g. Switzerland has a slightly different keyboard layout, than Germany.

dfish3r commented 2 years ago

Thanks for the patch! I will rename the enum as the prefix is intended to match the keyboard layout for the country. Admittedly I'm not sure what the prefix for the Swiss layout would be. CHDE perhaps? But that's a problem for another day.