summaryrefslogtreecommitdiff
path: root/src/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.c')
-rw-r--r--src/settings.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c
index affb7f2..a2ce3fb 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -29,6 +29,7 @@ THE SOFTWARE.
#include "config.h"
#include "ui.h"
#include "ui_dispatch.h"
+#include "hotkey.h"
#include <stdlib.h>
#include <assert.h>
#include <memory.h>
@@ -340,6 +341,20 @@ void BarSettingsRead (BarSettings_t *settings) {
break;
}
}
+ } else if (memcmp ("hk_act_", key, 7) == 0) {
+ size_t i;
+ char* actionKey = key + 3;
+ /* keyboard shortcuts */
+ for (i = 0; i < BAR_KS_COUNT; i++) {
+ if (streq (dispatchActions[i].configKey, actionKey)) {
+ BarHotKey_t hk = { 0 };
+ if (BarHotKeyParse(&hk, val)) {
+ hk.id = i;
+ BarHotKeyRegister(hk);
+ }
+ break;
+ }
+ }
} else if (streq ("audio_quality", key)) {
if (streq (val, "low")) {
settings->audioQuality = PIANO_AQ_LOW;