Media keys working again
This commit is contained in:
@@ -99,6 +99,17 @@ void UinputKeyboard::key_event(unsigned short code, bool down) {
|
||||
emit(EV_KEY, code, down ? 1 : 0);
|
||||
}
|
||||
|
||||
void UinputKeyboard::tap(unsigned short code) {
|
||||
if (fd_ < 0) {
|
||||
return;
|
||||
}
|
||||
key_event(code, true);
|
||||
sync();
|
||||
usleep(2000);
|
||||
key_event(code, false);
|
||||
sync();
|
||||
}
|
||||
|
||||
void UinputKeyboard::play(const std::vector<gkeymapper::ShortcutStep>& steps) {
|
||||
if (fd_ < 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user