mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
f7bb9e2167
commit
295ec3790d
5 changed files with 81 additions and 10 deletions
|
@ -24,12 +24,16 @@
|
|||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue