From 6e2467cc24f8afb70a4aaad3841a7c41fbc568b5 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Tue, 16 Aug 2022 16:10:20 +0200 Subject: fix active keymap in hyprctl devices --- src/debug/HyprCtl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/debug/HyprCtl.cpp') diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 21f4e23d..bee5ce79 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -300,7 +300,7 @@ R"#( { result += "\"keyboards\": [\n"; for (auto& k : g_pInputManager->m_lKeyboards) { - const auto KM = xkb_keymap_layout_get_name(wlr_keyboard_from_input_device(k.keyboard)->keymap, 0); + const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k); result += getFormat( R"#( { "address": "0x%x", @@ -385,7 +385,7 @@ R"#( { result += "\n\nKeyboards:\n"; for (auto& k : g_pInputManager->m_lKeyboards) { - const auto KM = xkb_keymap_layout_get_name(wlr_keyboard_from_input_device(k.keyboard)->keymap, 0); + const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k); result += getFormat("\tKeyboard at %x:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%s\"\n\t\t\tactive keymap: %s\n", &k, k.keyboard->name, k.currentRules.rules.c_str(), k.currentRules.model.c_str(), k.currentRules.layout.c_str(), k.currentRules.variant.c_str(), k.currentRules.options.c_str(), KM); } -- cgit v1.2.3