diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-03 21:30:05 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-03 21:30:05 +1200 |
| commit | e9cc5756dbb0a2d079a7b5e3438d79945f819df5 (patch) | |
| tree | 3881cb6bed150ef11252ef04a5e11c05d5af05f8 /commands.cpp | |
| parent | 01bc6a33eb235cd10851e2c31b99e6840603ca7d (diff) | |
| download | YATwm-e9cc5756dbb0a2d079a7b5e3438d79945f819df5.tar.gz YATwm-e9cc5756dbb0a2d079a7b5e3438d79945f819df5.zip | |
feat: Keybind updates
Re added the ability to swap super and mod as a config parameter (the
~swapmods~) command).
Finally fixed keybinds sometimes not working because of numlock,
bitwise & with the modifiers I actually care about.
Diffstat (limited to 'commands.cpp')
| -rw-r--r-- | commands.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/commands.cpp b/commands.cpp index 09bdf62..c41536d 100644 --- a/commands.cpp +++ b/commands.cpp @@ -12,30 +12,15 @@ using std::cout, std::endl, std::string, std::vector, std::tolower; -const void CommandsModule::printHello(const CommandArg* argv) -{ - cout << "Hello" << endl; -} - -const void CommandsModule::echo(const CommandArg* argv) -{ - cout << "Echo: '" << argv[0].str << '\'' << endl; -} - CommandsModule::CommandsModule() { - addCommand("printHello", &CommandsModule::printHello, 0, {}, this); - CommandArgType* args0 = new CommandArgType[1]; - args0[0] = STR_REST; - addCommand("echo", &CommandsModule::echo, 1, args0, this); } CommandsModule::~CommandsModule() { for(Command c : commandList) { - // This is probably needed but its not working - //if(c.argc > 0) - //delete[] c.argTypes; + if(c.argc > 0) + delete[] c.argTypes; } } @@ -150,7 +135,6 @@ CommandArg* CommandsModule::getCommandArgs(vector<string>& split, const CommandA void CommandsModule::runCommand(string command) { - cout << command << endl; vector<string> split = splitCommand(command); Command* cmd = lookupCommand(split[0]); if(cmd == nullptr) |
