File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ int main() {
46
46
47
47
if (hwKeyboard.length () > 0 ) {
48
48
auto found = false ;
49
+ auto foundModel = false ;
49
50
std::ifstream keyboardDefault (defaultKeyboardFile);
50
51
if (keyboardDefault.is_open ()) {
51
52
while (!keyboardDefault.eof ()) {
@@ -54,11 +55,14 @@ int main() {
54
55
if (toCheck.find (" XKBLAYOUT=" ) != std::string::npos && toCheck.find (hwKeyboard) != std::string::npos) {
55
56
found = true ;
56
57
}
58
+ if (toCheck.find (" XKBMODEL=" ) != std::string::npos) {
59
+ foundModel = true ;
60
+ }
57
61
}
58
62
} else {
59
63
std::cout << " Failed to open file: " << defaultKeyboardFile << std::endl;
60
64
}
61
- if (!found) {
65
+ if (!found || foundModel ) {
62
66
auto setKeymap = " localectl set-x11-keymap " + hwKeyboard;
63
67
auto err = system (setKeymap.c_str ());
64
68
std::cout << setKeymap << " : " << err << " \n " ;
You can’t perform that action at this time.
0 commit comments