Skip to content

Commit 8d63537

Browse files
committed
release key when unmapping
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
1 parent e74f688 commit 8d63537

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mapping_list.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <syslog.h>
3232
#include "mapping_list.h"
3333
#include "parse_config.h"
34+
#include "uinput.h"
3435

3536
//#define DEBUG_MAPPING_LIST
3637
#define ERROR_MAPPING_LIST
@@ -133,7 +134,9 @@ void clear_mapping_list(mapping_list_t *list)
133134
if (tmp->value.command != NULL) {
134135
free(tmp->value.command);
135136
}
136-
}
137+
} else if (tmp->activated == true) {
138+
sendKey(tmp->value.keycode, 0);
139+
}
137140
free(tmp);
138141
}
139142
}
@@ -233,6 +236,9 @@ bool remove_mapping(mapping_list_t *list, mapping_t *mapping)
233236
break;
234237

235238
case MAPPING_KEY:
239+
if (tmp->activated == true) {
240+
sendKey(tmp->value.keycode, 0);
241+
}
236242
break;
237243

238244
default:

0 commit comments

Comments
 (0)