diff --git a/src/helpers/help.cpp b/src/helpers/help.cpp index 404fd0e..7de95c2 100644 --- a/src/helpers/help.cpp +++ b/src/helpers/help.cpp @@ -8,39 +8,63 @@ using namespace std; namespace help { + inline KeyboardFeatures operator|(KeyboardFeatures a, KeyboardFeatures b) { + return static_cast(static_cast(a) | static_cast(b)); + } + + KeyboardFeatures getKeyboardFeatures(string cmdName) { + if(cmdName == "g213-led") return KeyboardFeatures::g213; + else if(cmdName == "g410-led") return KeyboardFeatures::g410; + else if(cmdName == "g610-led") return KeyboardFeatures::g610; + else if(cmdName == "g810-led") return KeyboardFeatures::g810; + else if(cmdName == "g910-led") return KeyboardFeatures::g910; + return KeyboardFeatures::all; + } + + void usage(char *arg0) { string cmdName = utils::getCmdName(arg0); + KeyboardFeatures features = getKeyboardFeatures(cmdName); cout<