Skip to content

Commit 24ca6d2

Browse files
Add default to KLM layout enum and reorder switch statement
1 parent f694064 commit 24ca6d2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

KeyboardLayoutManager/KeyboardLayoutManager.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,11 @@ KeyboardLayoutManager::KeyboardLayoutManager(KEYBOARD_LAYOUT layout, KEYBOARD_SI
345345

346346
switch(layout)
347347
{
348+
case KEYBOARD_LAYOUT::KEYBOARD_LAYOUT_DEFAULT:
349+
default:
350+
tmp_name = KEYBOARD_NAME_DEFAULT;
351+
break;
352+
348353
case KEYBOARD_LAYOUT::KEYBOARD_LAYOUT_ANSI_QWERTY:
349354
ChangeKeys(ansi_qwerty);
350355
tmp_name = KEYBOARD_NAME_ANSI;
@@ -371,11 +376,6 @@ KeyboardLayoutManager::KeyboardLayoutManager(KEYBOARD_LAYOUT layout, KEYBOARD_SI
371376
ChangeKeys(jis);
372377
tmp_name = KEYBOARD_NAME_JIS;
373378
break;
374-
375-
default:
376-
tmp_name = KEYBOARD_NAME_DEFAULT;
377-
tmp_name.append(KEYBOARD_NAME_QWERTY);
378-
break;
379379
}
380380

381381
/*---------------------------------------------------------------------*\

KeyboardLayoutManager/KeyboardLayoutManager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ enum KEYBOARD_SIZE
4040

4141
enum KEYBOARD_LAYOUT
4242
{
43-
KEYBOARD_LAYOUT_ANSI_QWERTY = 0,
43+
KEYBOARD_LAYOUT_DEFAULT = 0,
44+
KEYBOARD_LAYOUT_ANSI_QWERTY,
4445
KEYBOARD_LAYOUT_ISO_QWERTY,
4546
KEYBOARD_LAYOUT_ISO_QWERTZ,
4647
KEYBOARD_LAYOUT_ISO_AZERTY,

0 commit comments

Comments
 (0)