From 295ec3790d191c41006d04b41db878dc1091b117 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 23 Feb 2022 21:26:37 -0500 Subject: Core Keyremap Allow setting keymap from plugin Allow setting and removing keyremap on the fly It was pretty annoying trying to work out a keyremap with a restart required to set the remap and was quite annoying when I was no longer able to navigate to the plugin or filebrowser due to setting the wrong remap now you can try out a keymap and if it doesn't work a restart will sort things out Change-Id: I848fb3bd759f9684ac2497324a371f92b7464f7b --- apps/core_keymap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/core_keymap.h') diff --git a/apps/core_keymap.h b/apps/core_keymap.h index 39d35e9cd9..dad9875364 100644 --- a/apps/core_keymap.h +++ b/apps/core_keymap.h @@ -24,12 +24,16 @@ #include #include #include "config.h" +#include "action.h" #define KEYREMAP_VERSION 1 #define KEYREMAP_HEADERID (LAST_ACTION_PLACEHOLDER | (TARGET_ID << 8)) /* If exists remap file will be loaded at startup */ #define CORE_KEYREMAP_FILE ROCKBOX_DIR "/keyremap.kmf" +/* Allocates core buffer, copies keymap to allow buttons for actions to be remapped*/ +int core_set_keyremap(struct button_mapping* core_keymap, int count); + /* open_key_remap(filename , *fd (you must close file_descriptor), *fsize) * checks/strips header and returns remaining count * fd is opened and set to first record -- cgit v1.2.3