summaryrefslogtreecommitdiff
path: root/apps/core_keymap.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-02-23 21:26:37 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2022-02-23 21:38:27 -0500
commit295ec3790d191c41006d04b41db878dc1091b117 (patch)
treebeafe7409e2722f199abb96a657e6a52adce9ea6 /apps/core_keymap.h
parentf7bb9e21672566308ab837c370f27c10c154e6fc (diff)
downloadrockbox-295ec3790d191c41006d04b41db878dc1091b117.tar.gz
rockbox-295ec3790d191c41006d04b41db878dc1091b117.zip
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
Diffstat (limited to 'apps/core_keymap.h')
-rw-r--r--apps/core_keymap.h4
1 files changed, 4 insertions, 0 deletions
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 @@
24#include <stdbool.h> 24#include <stdbool.h>
25#include <inttypes.h> 25#include <inttypes.h>
26#include "config.h" 26#include "config.h"
27#include "action.h"
27#define KEYREMAP_VERSION 1 28#define KEYREMAP_VERSION 1
28#define KEYREMAP_HEADERID (LAST_ACTION_PLACEHOLDER | (TARGET_ID << 8)) 29#define KEYREMAP_HEADERID (LAST_ACTION_PLACEHOLDER | (TARGET_ID << 8))
29 30
30/* If exists remap file will be loaded at startup */ 31/* If exists remap file will be loaded at startup */
31#define CORE_KEYREMAP_FILE ROCKBOX_DIR "/keyremap.kmf" 32#define CORE_KEYREMAP_FILE ROCKBOX_DIR "/keyremap.kmf"
32 33
34/* Allocates core buffer, copies keymap to allow buttons for actions to be remapped*/
35int core_set_keyremap(struct button_mapping* core_keymap, int count);
36
33/* open_key_remap(filename , *fd (you must close file_descriptor), *fsize) 37/* open_key_remap(filename , *fd (you must close file_descriptor), *fsize)
34 * checks/strips header and returns remaining count 38 * checks/strips header and returns remaining count
35 * fd is opened and set to first record 39 * fd is opened and set to first record