MCPcopy Create free account
hub / github.com/deskflow/deskflow / parseModifierKey

Method parseModifierKey

src/lib/server/Config.cpp:1746–1770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1744}
1745
1746OptionValue ConfigReadContext::parseModifierKey(const std::string &arg) const
1747{
1748 if (CaselessCmp::equal(arg, "shift")) {
1749 return static_cast<OptionValue>(kKeyModifierIDShift);
1750 }
1751 if (CaselessCmp::equal(arg, "ctrl")) {
1752 return static_cast<OptionValue>(kKeyModifierIDControl);
1753 }
1754 if (CaselessCmp::equal(arg, "alt")) {
1755 return static_cast<OptionValue>(kKeyModifierIDAlt);
1756 }
1757 if (CaselessCmp::equal(arg, "altgr")) {
1758 return static_cast<OptionValue>(kKeyModifierIDAltGr);
1759 }
1760 if (CaselessCmp::equal(arg, "meta")) {
1761 return static_cast<OptionValue>(kKeyModifierIDMeta);
1762 }
1763 if (CaselessCmp::equal(arg, "super")) {
1764 return static_cast<OptionValue>(kKeyModifierIDSuper);
1765 }
1766 if (CaselessCmp::equal(arg, "none")) {
1767 return static_cast<OptionValue>(kKeyModifierIDNull);
1768 }
1769 throw ServerConfigReadException(*this, "invalid argument \"%{1}\"", arg);
1770}
1771
1772OptionValue ConfigReadContext::parseCorner(const std::string &arg) const
1773{

Callers 1

readSectionScreensMethod · 0.80

Calls 1

Tested by

no test coverage detected