forked from Shinonome/dots-hyprland
Fix bad keyboard layout if variant name has commas
This commit is contained in:
@@ -85,8 +85,8 @@ Singleton {
|
|||||||
const hyprlandKeyboard = parsedOutput["keyboards"].find(kb => kb.main === true);
|
const hyprlandKeyboard = parsedOutput["keyboards"].find(kb => kb.main === true);
|
||||||
root.layoutCodes = hyprlandKeyboard["layout"].split(",");
|
root.layoutCodes = hyprlandKeyboard["layout"].split(",");
|
||||||
root.currentLayoutName = hyprlandKeyboard["active_keymap"];
|
root.currentLayoutName = hyprlandKeyboard["active_keymap"];
|
||||||
// console.log("[HyprlandXkb] Fetched | Layouts (multiple: " + (root.layouts.length > 1) + "): "
|
// console.log("[HyprlandXkb] Fetched | Layouts (multiple: " + (root.layoutCodes.length > 1) + "): "
|
||||||
// + root.layouts.join(", ") + " | Active: " + root.currentLayoutName);
|
// + root.layoutCodes.join(", ") + " | Active: " + root.currentLayoutName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,10 +106,10 @@ Singleton {
|
|||||||
|
|
||||||
// Update when layout might have changed
|
// Update when layout might have changed
|
||||||
const dataString = event.data;
|
const dataString = event.data;
|
||||||
root.currentLayoutName = dataString.split(",")[1];
|
root.currentLayoutName = dataString.substring(dataString.indexOf(",") + 1);
|
||||||
|
|
||||||
// Update layout for on-screen keyboard (osk)
|
// Update layout for on-screen keyboard (osk)
|
||||||
Config.options.osk.layout = root.currentLayoutName;
|
Config.options.osk.layout = root.currentLayoutName
|
||||||
} else if (event.name == "configreloaded") {
|
} else if (event.name == "configreloaded") {
|
||||||
// Mark layout code list to be updated when config is reloaded
|
// Mark layout code list to be updated when config is reloaded
|
||||||
root.needsLayoutRefresh = true;
|
root.needsLayoutRefresh = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user