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:
crs
2003-07-12 18:13:36 +00:00
parent 476faea8ab
commit faff28de44
4 changed files with 40 additions and 1 deletions

View File

@@ -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");