spiegel-keyman/linux/keyman-system-service/src/KeyboardDevice.h
Eberhard Beilharz 603c1d6ea0
feat(linux): Add system service to toggle capslock LED
This implements the server side.
2023-05-15 09:13:58 +02:00

25 lines
473 B
C++

#ifndef __KEYBOARDDEVICE_H__
#define __KEYBOARDDEVICE_H__
#include <libevdev/libevdev.h>
class KeyboardDevice
{
public:
KeyboardDevice();
virtual ~KeyboardDevice();
bool Initialize(const char* name);
bool HasCapsLockLed();
void SetCapsLockLed(bool on);
bool GetCapsLockLed();
void SetDebug(bool on) { debug = on; }
private:
struct libevdev *dev;
int fd;
int hasCapsLockLed;
bool debug;
};
#endif // __KEYBOARDDEVICE_H__