Deamon management

This commit is contained in:
2026-10-17 03:53:51 +02:00
parent 335a4674d1
commit b77b4a3fc6
35 changed files with 2001 additions and 172 deletions

30
daemon/action.h Normal file
View File

@@ -0,0 +1,30 @@
// gKeyMapper daemon - executes the mapping configured for a G key.
#ifndef GKEYMAPPER_DAEMON_ACTION_H
#define GKEYMAPPER_DAEMON_ACTION_H
#include <string>
#include "keymap.h"
#include "mapping.h"
#include "uinput_keyboard.h"
namespace gkeymapper::daemon {
class ActionRunner {
public:
// Opens the virtual keyboard and the keyboard layout. Without the virtual
// keyboard, "key" mappings are skipped but "command" mappings still work.
bool init();
void run(const gkeymapper::Mapping& mapping);
private:
void run_command(const std::string& command);
UinputKeyboard keyboard_;
gkeymapper::Keymap keymap_;
};
} // namespace gkeymapper::daemon
#endif // GKEYMAPPER_DAEMON_ACTION_H