From e2f61e267e1aaabd78d0eaf0b31c2af66f9d1304 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Tue, 9 Aug 2022 18:13:13 +0200 Subject: add parse errors for invalid kb layouts --- src/managers/input/InputManager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/managers/input') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index e23962a1..e8f204b7 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -536,6 +536,8 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { auto KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); if (!KEYMAP) { + g_pConfigManager->addParseError("Invalid keyboard layout passed. ( rules: " + RULES + ", model: " + MODEL + ", variant: " + VARIANT + ", options: " + OPTIONS + ", layout: " + LAYOUT + " )"); + Debug::log(ERR, "Keyboard layout %s with variant %s (rules: %s, model: %s, options: %s) couldn't have been loaded.", rules.layout, rules.variant, rules.rules, rules.model, rules.options); memset(&rules, 0, sizeof(rules)); -- cgit v1.2.3