mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 18:09:50 +01:00
added active keymap prop
This commit is contained in:
parent
e93b45615c
commit
ef7ee2fd0f
1 changed files with 7 additions and 3 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue