diff --git a/src/main.cpp b/src/main.cpp index 83f7d0f..3a927ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,6 +46,96 @@ void usage() { cout< 1) { string argCmd = argv[1]; - if (argCmd == "-h" || argCmd == "--help") { usage(); return 0; } - else if (argCmd == "-s" && argc == 3) return setStartupEffect(argv[2]); - else if (argCmd == "-a" && argc == 3) return setAllKeys(argv[2], true); - else if (argCmd == "-an" && argc == 3) return setAllKeys(argv[2], false); - else if (argCmd == "-g" && argc == 4) return setGroupKeys(argv[2], argv[3], true); - else if (argCmd == "-gn" && argc == 4) return setGroupKeys(argv[2], argv[3], false); - else if (argCmd == "-k" && argc == 4) return setKey(argv[2], argv[3], true); - else if (argCmd == "-kn" && argc == 4) return setKey(argv[2], argv[3], false); - else if (argCmd == "-c" && argc == 2) return commit(); - else if (argCmd == "-p" && argc == 3) return loadProfile(argv[2]); + if (argCmd == "-h" || argCmd == "--help") { usage(); return 0; } + else if (argCmd == "-lk" || argCmd == "--list-keys") { listkeys(); return 0; } + else if (argCmd == "-s" && argc == 3) return setStartupEffect(argv[2]); + else if (argCmd == "-a" && argc == 3) return setAllKeys(argv[2], true); + else if (argCmd == "-an" && argc == 3) return setAllKeys(argv[2], false); + else if (argCmd == "-g" && argc == 4) return setGroupKeys(argv[2], argv[3], true); + else if (argCmd == "-gn" && argc == 4) return setGroupKeys(argv[2], argv[3], false); + else if (argCmd == "-k" && argc == 4) return setKey(argv[2], argv[3], true); + else if (argCmd == "-kn" && argc == 4) return setKey(argv[2], argv[3], false); + else if (argCmd == "-c" && argc == 2) return commit(); + else if (argCmd == "-p" && argc == 3) return loadProfile(argv[2]); } usage(); return 1;