Deamon management
This commit is contained in:
30
daemon/action.h
Normal file
30
daemon/action.h
Normal 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
|
||||
Reference in New Issue
Block a user