[add] azerty layout

This commit is contained in:
Knah 2016-03-24 15:47:07 +01:00
parent 9c3d5be2a2
commit c59702b5c5
4 changed files with 14 additions and 9 deletions

View File

@ -49,6 +49,7 @@
<div class="row" style="margin-top: 30px;">
<p>What's your Keyboard layout?</p>
<select type="text" name="keyboardlayout">
<option value="azerty">AZERTY</option>
<option value="qwerty">QWERTY</option>
<option value="qwertz">QWERTZ</option>
</select>

View File

@ -80,6 +80,10 @@ class Configuration
*/
public static function evalKeys($keys)
{
// Return azerty
if (strtolower($keys) === 'azerty') {
return 'AZERTYUIOPQSDFGHJKLMWXCVBN';
}
// Return qwertz
if (strtolower($keys) === 'qwertz') {
return 'QWERTZUIOPASDFGHJKLYXCVBNM';

View File

@ -105,7 +105,7 @@ class RequestUtils
{
if (
isset($_POST['keyboardlayout']) &&
preg_match("/qwerty|qwertz/", $_POST['keyboardlayout'])
preg_match("/azerty|qwerty|qwertz/", $_POST['keyboardlayout'])
) {
return strtolower($_POST['keyboardlayout']);
}