Applied patch 1547642, key broadcasting. Modified the patch to conform

to style guidelines.  Also enhanced it to allow binding hot keys to not
only toggling broadcasting but also turning it on or off, resized the
hot key dialog to accommodate the keyboard broadcasting option, changed
the configuration string for the keyboard broadcasting option, and
added documentation.

This change does not include the VS8 fix included in the patch.
This commit is contained in:
crs23
2007-09-10 00:59:51 +00:00
parent d001ca488a
commit b728885e25
12 changed files with 415 additions and 58 deletions

View File

@@ -1203,6 +1203,36 @@ CConfig::parseAction(CConfigReadContext& s,
action = new CInputFilter::CLockCursorToScreenAction(mode);
}
else if (name == "keyboardBroadcast") {
if (args.size() > 2) {
throw XConfigRead(s, "syntax for action: keyboardBroadcast([{off|on|toggle}[,screens]])");
}
CInputFilter::CKeyboardBroadcastAction::Mode mode =
CInputFilter::CKeyboardBroadcastAction::kToggle;
if (args.size() >= 1) {
if (args[0] == "off") {
mode = CInputFilter::CKeyboardBroadcastAction::kOff;
}
else if (args[0] == "on") {
mode = CInputFilter::CKeyboardBroadcastAction::kOn;
}
else if (args[0] == "toggle") {
mode = CInputFilter::CKeyboardBroadcastAction::kToggle;
}
else {
throw XConfigRead(s, "syntax for action: keyboardBroadcast([{off|on|toggle}[,screens]])");
}
}
std::set<CString> screens;
if (args.size() >= 2) {
parseScreens(s, args[1], screens);
}
action = new CInputFilter::CKeyboardBroadcastAction(mode, screens);
}
else {
throw XConfigRead(s, "unknown action argument \"%{1}\"", name);
}