mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Rocker Add WPS and Tree Hotkey, button codes in debug menu
VolUp+VolDown becomes the wps and tree (file browser) hotkey Change-Id: I0cba96927420c318506bc0c15dabcb809cd81647
This commit is contained in:
parent
4e5499606b
commit
1a68856f52
3 changed files with 10 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#define BTN_VOL_COMBO (BUTTON_VOLUP | BUTTON_VOLDOWN)
|
||||||
/* {Action Code, Button code, Prereq button code } */
|
/* {Action Code, Button code, Prereq button code } */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -84,6 +84,7 @@ static const struct button_mapping button_context_wps[] = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{ ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_HOTKEY, BTN_VOL_COMBO|BUTTON_REL, BTN_VOL_COMBO},
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_wps */
|
}; /* button_context_wps */
|
||||||
|
@ -114,8 +115,9 @@ static const struct button_mapping button_context_list[] = {
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||||
}; /* button_context_list */
|
}; /* button_context_list */
|
||||||
|
|
||||||
#if 0
|
|
||||||
static const struct button_mapping button_context_tree[] = {
|
static const struct button_mapping button_context_tree[] = {
|
||||||
|
{ ACTION_TREE_HOTKEY, BTN_VOL_COMBO|BUTTON_REL, BTN_VOL_COMBO},
|
||||||
/* ACTION_TREE_ROOT_INIT,
|
/* ACTION_TREE_ROOT_INIT,
|
||||||
* ACTION_TREE_PGLEFT, optional
|
* ACTION_TREE_PGLEFT, optional
|
||||||
* ACTION_TREE_PGRIGHT, optional
|
* ACTION_TREE_PGRIGHT, optional
|
||||||
|
@ -129,7 +131,7 @@ static const struct button_mapping button_context_tree[] = {
|
||||||
*/
|
*/
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_tree */
|
}; /* button_context_tree */
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_yesno[] = {
|
static const struct button_mapping button_context_yesno[] = {
|
||||||
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
|
@ -230,6 +232,7 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
case CONTEXT_MAINMENU:
|
case CONTEXT_MAINMENU:
|
||||||
return button_context_mainmenu;
|
return button_context_mainmenu;
|
||||||
case CONTEXT_TREE:
|
case CONTEXT_TREE:
|
||||||
|
return button_context_tree;
|
||||||
case CONTEXT_LIST:
|
case CONTEXT_LIST:
|
||||||
return button_context_list;
|
return button_context_list;
|
||||||
|
|
||||||
|
|
|
@ -61,3 +61,6 @@
|
||||||
|
|
||||||
/* Generic HiBy stuff */
|
/* Generic HiBy stuff */
|
||||||
#include "hibylinux.h"
|
#include "hibylinux.h"
|
||||||
|
|
||||||
|
/* Define this if a programmable hotkey is mapped */
|
||||||
|
#define HAVE_HOTKEY
|
||||||
|
|
|
@ -70,6 +70,7 @@ bool dbg_hw_info(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
btn = button_read_device();
|
btn = button_read_device();
|
||||||
|
lcd_putsf(0, line++, "btn: %d", btn);
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ/16);
|
sleep(HZ/16);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue