diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-13 16:02:14 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-13 16:02:14 +0200 |
| commit | ef7ee2fd0f64a1a0a0088b90d3cbaeb6b3436c32 (patch) | |
| tree | 01b50ec3fb7cf611fa4c54c8da115a8d1e5d4ad4 /src/debug/HyprCtl.cpp | |
| parent | e93b45615c726afd5f92db36205baedb6249a281 (diff) | |
added active keymap prop
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 67a20910..cdc04ff4 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -295,6 +295,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); result += getFormat( R"#( { "address": "0x%x", @@ -303,7 +304,8 @@ R"#( { "model": "%s", "layout": "%s", "variant": "%s", - "options": "%s" + "options": "%s", + "active_keymap": "%s" },)#", &k, k.keyboard->name, @@ -311,7 +313,8 @@ R"#( { k.currentRules.model.c_str(), k.currentRules.layout.c_str(), k.currentRules.variant.c_str(), - k.currentRules.options.c_str() + k.currentRules.options.c_str(), + KM ); } @@ -377,7 +380,8 @@ R"#( { result += "\n\nKeyboards:\n"; for (auto& k : g_pInputManager->m_lKeyboards) { - result += getFormat("\tKeyboard at %x:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%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()); + const auto KM = xkb_keymap_layout_get_name(wlr_keyboard_from_input_device(k.keyboard)->keymap, 0); + 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); } result += "\n\nTablets:\n"; |
