mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 13:15:33 +08:00
Added ignoreNumLock boolean per-screen option. When true, NumLock
is ignored on that client (it has no effect on the server). This is useful for keyboards that don't have separate number pads and the user often uses the client's keyboard directly, when turning on NumLock interferes with normal typing.
This commit is contained in:
@@ -646,6 +646,9 @@ CConfig::getOptionName(OptionID id)
|
||||
if (id == kOptionXTestXineramaUnaware) {
|
||||
return "xtestIsXineramaUnaware";
|
||||
}
|
||||
if (id == kOptionIgnoreNumLock) {
|
||||
return "ignoreNumLock";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -655,7 +658,8 @@ CConfig::getOptionValue(OptionID id, OptionValue value)
|
||||
if (id == kOptionHalfDuplexCapsLock ||
|
||||
id == kOptionHalfDuplexNumLock ||
|
||||
id == kOptionScreenSaverSync ||
|
||||
id == kOptionXTestXineramaUnaware) {
|
||||
id == kOptionXTestXineramaUnaware ||
|
||||
id == kOptionIgnoreNumLock) {
|
||||
return (value != 0) ? "true" : "false";
|
||||
}
|
||||
if (id == kOptionModifierMapForShift ||
|
||||
@@ -891,6 +895,10 @@ CConfig::readSectionScreens(std::istream& s)
|
||||
addOption(screen, kOptionXTestXineramaUnaware,
|
||||
parseBoolean(value));
|
||||
}
|
||||
else if (name == "ignoreNumLock") {
|
||||
addOption(screen, kOptionIgnoreNumLock,
|
||||
parseBoolean(value));
|
||||
}
|
||||
else {
|
||||
// unknown argument
|
||||
throw XConfigRead("unknown argument");
|
||||
|
||||
Reference in New Issue
Block a user