summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2010-04-01 03:14:44 +0000
committerJeffrey Goode <jeffg7@gmail.com>2010-04-01 03:14:44 +0000
commitd5e6bc7a8c413218ec1372fd54157e9639ab67b4 (patch)
tree2be93c700ef9c5e8f85cc7dbbfab7f9f842c92f0 /apps
parent39e78993f317349dacfc4e8d1abb703117636696 (diff)
downloadrockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.tar.gz
rockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.tar.bz2
rockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.zip
FS#11081 - Hotkey patch. Many targets supported, but some keymaps need work before they can be switched on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/action.h2
-rw-r--r--apps/features.txt4
-rw-r--r--apps/gui/wps.c4
-rw-r--r--apps/keymaps/keymap-av300.c3
-rw-r--r--apps/keymaps/keymap-c100.c3
-rw-r--r--apps/keymaps/keymap-c200.c3
-rw-r--r--apps/keymaps/keymap-clip.c7
-rw-r--r--apps/keymaps/keymap-creativezv.c7
-rw-r--r--apps/keymaps/keymap-creativezvm.c7
-rw-r--r--apps/keymaps/keymap-e200.c3
-rw-r--r--apps/keymaps/keymap-fuze.c3
-rw-r--r--apps/keymaps/keymap-gigabeat-s.c7
-rw-r--r--apps/keymaps/keymap-gigabeat.c7
-rw-r--r--apps/keymaps/keymap-h10.c3
-rw-r--r--apps/keymaps/keymap-h1x0_h3x0.c3
-rw-r--r--apps/keymaps/keymap-hdd1630.c7
-rw-r--r--apps/keymaps/keymap-hdd6330.c7
-rw-r--r--apps/keymaps/keymap-iaudio67.c7
-rw-r--r--apps/keymaps/keymap-ipod.c3
-rw-r--r--apps/keymaps/keymap-m3.c3
-rw-r--r--apps/keymaps/keymap-meizu-m6sl.c7
-rw-r--r--apps/keymaps/keymap-mini2440.c7
-rw-r--r--apps/keymaps/keymap-mr100.c7
-rw-r--r--apps/keymaps/keymap-player.c3
-rw-r--r--apps/keymaps/keymap-recorder.c3
-rw-r--r--apps/keymaps/keymap-sa9200.c7
-rw-r--r--apps/keymaps/keymap-touchscreen.c7
-rw-r--r--apps/keymaps/keymap-vibe500.c7
-rw-r--r--apps/keymaps/keymap-yh8xx_yh9xx.c7
-rw-r--r--apps/lang/english.lang68
-rw-r--r--apps/menu.c17
-rw-r--r--apps/menus/settings_menu.c61
-rw-r--r--apps/onplay.c206
-rw-r--r--apps/onplay.h2
-rw-r--r--apps/playlist_catalog.c2
-rw-r--r--apps/root_menu.h1
-rw-r--r--apps/settings.h7
-rw-r--r--apps/settings_list.c7
-rw-r--r--apps/tree.c6
39 files changed, 493 insertions, 32 deletions
diff --git a/apps/action.h b/apps/action.h
index 63ec905e51..ec9727c120 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -136,6 +136,7 @@ enum {
ACTION_WPS_ABSETA_PREVDIR, /* these should be safe to put together seen as */
ACTION_WPS_ABSETB_NEXTDIR, /* you shouldnt want to change dir in ab-mode */
ACTION_WPS_ABRESET,
+ ACTION_WPS_HOTKEY,
/* list and tree page up/down */
ACTION_LISTTREE_PGUP,/* optional */
@@ -151,6 +152,7 @@ enum {
ACTION_TREE_PGRIGHT,/* optional */
ACTION_TREE_STOP,
ACTION_TREE_WPS,
+ ACTION_TREE_HOTKEY,
/* radio */
ACTION_FM_MENU,
diff --git a/apps/features.txt b/apps/features.txt
index af0da5b355..0bfe695aeb 100644
--- a/apps/features.txt
+++ b/apps/features.txt
@@ -70,6 +70,10 @@ hold_button
remote_button_hold
#endif
+#if defined(HAVE_HOTKEY)
+hotkey
+#endif
+
#if defined(HAVE_LCD_BITMAP)
lcd_bitmap
#endif
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index b6a42769fe..afd7f3f2d0 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -888,10 +888,12 @@ long gui_wps_show(void)
switch(button)
{
case ACTION_WPS_CONTEXT:
+ case ACTION_WPS_HOTKEY:
{
+ bool hotkey = button == ACTION_WPS_HOTKEY;
gwps_leave_wps();
int retval = onplay(wps_state.id3->path,
- FILE_ATTR_AUDIO, CONTEXT_WPS);
+ FILE_ATTR_AUDIO, CONTEXT_WPS, hotkey);
/* if music is stopped in the context menu we want to exit the wps */
if (retval == ONPLAY_MAINMENU
|| !audio_status())
diff --git a/apps/keymaps/keymap-av300.c b/apps/keymaps/keymap-av300.c
index 7d66921c3a..b80219f232 100644
--- a/apps/keymaps/keymap-av300.c
+++ b/apps/keymaps/keymap-av300.c
@@ -75,7 +75,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_MENU, BUTTON_F1|BUTTON_REL, BUTTON_F1 },
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT },
{ ACTION_WPS_QUICKSCREEN, BUTTON_F2|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
+ { ACTION_WPS_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_WPS_BROWSE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_WPS_ID3SCREEN, BUTTON_F1|BUTTON_ON, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_UP, BUTTON_ON },
@@ -106,6 +106,7 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
+ { ACTION_TREE_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP, BUTTON_ON },
{ ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_ON|BUTTON_UP },
diff --git a/apps/keymaps/keymap-c100.c b/apps/keymaps/keymap-c100.c
index 3312da3e1d..58f1f5f42b 100644
--- a/apps/keymaps/keymap-c100.c
+++ b/apps/keymaps/keymap-c100.c
@@ -69,7 +69,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_VOLUP, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_VOLDOWN, BUTTON_SELECT },
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
+ { ACTION_WPS_HOTKEY, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_WPS_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN },
LAST_ITEM_IN_LIST
@@ -104,6 +104,7 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_TREE_HOTKEY, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-c200.c b/apps/keymaps/keymap-c200.c
index 487a2db1a7..f19440019c 100644
--- a/apps/keymaps/keymap-c200.c
+++ b/apps/keymaps/keymap-c200.c
@@ -81,7 +81,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_WPS_QUICKSCREEN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_REC|BUTTON_REL, BUTTON_REC },
+ { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
LAST_ITEM_IN_LIST
}; /* button_context_wps */
@@ -123,6 +123,7 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
+ { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-clip.c b/apps/keymaps/keymap-clip.c
index afef805681..942968b20f 100644
--- a/apps/keymaps/keymap-clip.c
+++ b/apps/keymaps/keymap-clip.c
@@ -82,7 +82,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_SELECT },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+#endif
#ifndef HAS_BUTTON_HOLD /* Clip+ */
{ ACTION_STD_KEYLOCK, BUTTON_HOME|BUTTON_SELECT, BUTTON_NONE },
@@ -131,6 +135,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_HOME|BUTTON_SELECT, BUTTON_HOME },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-creativezv.c b/apps/keymaps/keymap-creativezv.c
index fb8e542520..4108980720 100644
--- a/apps/keymaps/keymap-creativezv.c
+++ b/apps/keymaps/keymap-creativezv.c
@@ -92,7 +92,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_POWER, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_POWER, BUTTON_NONE },
+#endif
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
@@ -109,6 +113,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-creativezvm.c b/apps/keymaps/keymap-creativezvm.c
index 37563248a1..5d1b25aa8d 100644
--- a/apps/keymaps/keymap-creativezvm.c
+++ b/apps/keymaps/keymap-creativezvm.c
@@ -91,7 +91,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_POWER, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_POWER, BUTTON_NONE },
+#endif
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
@@ -108,6 +112,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-e200.c b/apps/keymaps/keymap-e200.c
index 367fdcb88f..aca8a9d7e3 100644
--- a/apps/keymaps/keymap-e200.c
+++ b/apps/keymaps/keymap-e200.c
@@ -80,7 +80,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN },
{ ACTION_WPS_MENU, BUTTON_DOWN|BUTTON_REL, BUTTON_DOWN },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_REC|BUTTON_REL, BUTTON_REC },
+ { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
{ ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT },
@@ -115,6 +115,7 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
+ { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-fuze.c b/apps/keymaps/keymap-fuze.c
index 416674f814..7463b5d3bb 100644
--- a/apps/keymaps/keymap-fuze.c
+++ b/apps/keymaps/keymap-fuze.c
@@ -83,7 +83,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT },
{ ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_SELECT },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
+ { ACTION_WPS_HOTKEY, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
LAST_ITEM_IN_LIST
}; /* button_context_wps */
@@ -114,6 +114,7 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP },
{ ACTION_TREE_STOP, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
+ { ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REL, BUTTON_HOME },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-gigabeat-s.c b/apps/keymaps/keymap-gigabeat-s.c
index d690b24e77..343d6b4f9c 100644
--- a/apps/keymaps/keymap-gigabeat-s.c
+++ b/apps/keymaps/keymap-gigabeat-s.c
@@ -100,7 +100,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_BACK|BUTTON_UP, BUTTON_BACK },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_BACK|BUTTON_DOWN, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_BACK|BUTTON_DOWN, BUTTON_NONE },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -134,6 +138,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY,BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-gigabeat.c b/apps/keymaps/keymap-gigabeat.c
index ccb6084ada..61d0a593c8 100644
--- a/apps/keymaps/keymap-gigabeat.c
+++ b/apps/keymaps/keymap-gigabeat.c
@@ -93,7 +93,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_A|BUTTON_UP, BUTTON_A },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_A|BUTTON_DOWN, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_A|BUTTON_DOWN, BUTTON_NONE },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -127,6 +131,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c
index 8597e24023..ffda90c4e8 100644
--- a/apps/keymaps/keymap-h10.c
+++ b/apps/keymaps/keymap-h10.c
@@ -87,7 +87,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_CONTEXT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
{ ACTION_WPS_QUICKSCREEN, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
{ ACTION_WPS_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_POWER|BUTTON_PLAY, BUTTON_NONE },
+ { ACTION_WPS_HOTKEY, BUTTON_POWER|BUTTON_PLAY, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_PLAY|BUTTON_LEFT, BUTTON_PLAY },
{ ACTION_WPS_ID3SCREEN, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_PLAY },
@@ -146,6 +146,7 @@ static const struct button_mapping remote_button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_TREE_HOTKEY, BUTTON_POWER|BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c
index 64d0f30b8e..31e38533f3 100644
--- a/apps/keymaps/keymap-h1x0_h3x0.c
+++ b/apps/keymaps/keymap-h1x0_h3x0.c
@@ -92,7 +92,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_ABRESET, BUTTON_ON|BUTTON_SELECT, BUTTON_ON },
{ ACTION_WPS_ID3SCREEN, BUTTON_ON|BUTTON_MODE, BUTTON_NONE },
{ ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_REC|BUTTON_REL, BUTTON_REC },
+ { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
LAST_ITEM_IN_LIST
}; /* button_context_wps */
@@ -112,6 +112,7 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-hdd1630.c b/apps/keymaps/keymap-hdd1630.c
index d43fcd837d..b8de5eb84b 100644
--- a/apps/keymaps/keymap-hdd1630.c
+++ b/apps/keymaps/keymap-hdd1630.c
@@ -93,7 +93,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -127,6 +131,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-hdd6330.c b/apps/keymaps/keymap-hdd6330.c
index d43fcd837d..b8de5eb84b 100644
--- a/apps/keymaps/keymap-hdd6330.c
+++ b/apps/keymaps/keymap-hdd6330.c
@@ -93,7 +93,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -127,6 +131,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-iaudio67.c b/apps/keymaps/keymap-iaudio67.c
index ec700c5411..45e85d439b 100644
--- a/apps/keymaps/keymap-iaudio67.c
+++ b/apps/keymaps/keymap-iaudio67.c
@@ -71,7 +71,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
+#endif
{ ACTION_WPS_STOP, BUTTON_STOP, BUTTON_NONE },
LAST_ITEM_IN_LIST
@@ -111,6 +115,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
// { ACTION_TREE_WPS, BUTTON_REC|BUTTON_VOLUP, BUTTON_REC },
// { ACTION_TREE_STOP, BUTTON_REC|BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_REC|BUTTON_VOLUP },
+#ifdef HAVE_HOTKEY
+ // { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index 751c6d89aa..8b65f96130 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -59,6 +59,7 @@ static const struct button_mapping button_context_standard[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_TREE_HOTKEY, BUTTON_SELECT|BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_tree */
@@ -91,7 +92,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
- { ACTION_WPS_VIEW_PLAYLIST, BUTTON_SELECT|BUTTON_PLAY, BUTTON_NONE },
+ { ACTION_WPS_HOTKEY, BUTTON_SELECT|BUTTON_PLAY, BUTTON_NONE },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
diff --git a/apps/keymaps/keymap-m3.c b/apps/keymaps/keymap-m3.c
index 4449d77068..b6968e6ff0 100644
--- a/apps/keymaps/keymap-m3.c
+++ b/apps/keymaps/keymap-m3.c
@@ -292,6 +292,7 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_NONE, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_MODE, BUTTON_REC },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_tree */
@@ -352,7 +353,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_CONTEXT, BUTTON_MODE|BUTTON_REPEAT, BUTTON_MODE },
{ ACTION_WPS_MENU, BUTTON_REC|BUTTON_REL, BUTTON_REC },
{ ACTION_WPS_QUICKSCREEN, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC },
- { ACTION_WPS_VIEW_PLAYLIST,BUTTON_REC|BUTTON_MODE, BUTTON_REC },
+ { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_MODE, BUTTON_REC },
LAST_ITEM_IN_LIST
}; /* button_context_wps */
diff --git a/apps/keymaps/keymap-meizu-m6sl.c b/apps/keymaps/keymap-meizu-m6sl.c
index 2dcb81bec0..c81b25729c 100644
--- a/apps/keymaps/keymap-meizu-m6sl.c
+++ b/apps/keymaps/keymap-meizu-m6sl.c
@@ -88,7 +88,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_PLAY|BUTTON_UP, BUTTON_PLAY },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_PLAY|BUTTON_DOWN, BUTTON_PLAY },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_PLAY|BUTTON_DOWN, BUTTON_PLAY },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -114,6 +118,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-mini2440.c b/apps/keymaps/keymap-mini2440.c
index c53b9ae1c9..db145aa480 100644
--- a/apps/keymaps/keymap-mini2440.c
+++ b/apps/keymaps/keymap-mini2440.c
@@ -95,7 +95,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_A|BUTTON_UP, BUTTON_A },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_A|BUTTON_DOWN, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_A|BUTTON_DOWN, BUTTON_NONE },
+#endif
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
@@ -129,6 +133,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-mr100.c b/apps/keymaps/keymap-mr100.c
index dd2539f381..5a13f31402 100644
--- a/apps/keymaps/keymap-mr100.c
+++ b/apps/keymaps/keymap-mr100.c
@@ -94,7 +94,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_ABSETA_PREVDIR,BUTTON_DISPLAY|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_WPS_ABRESET, BUTTON_DISPLAY|BUTTON_SELECT, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_DISPLAY|BUTTON_UP, BUTTON_DISPLAY },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_DISPLAY|BUTTON_DOWN, BUTTON_DISPLAY },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_DISPLAY|BUTTON_DOWN, BUTTON_DISPLAY },
+#endif
{ ACTION_WPS_ID3SCREEN, BUTTON_DISPLAY|BUTTON_MENU, BUTTON_NONE },
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
@@ -119,6 +123,9 @@ static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-player.c b/apps/keymaps/keymap-player.c
index 5fce6be83e..193413e473 100644
--- a/apps/keymaps/keymap-player.c
+++ b/apps/keymaps/keymap-player.c
@@ -63,7 +63,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_WPS_ID3SCREEN, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
{ ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_STOP, BUTTON_NONE },
- { ACTION_WPS_VIEW_PLAYLIST,BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
+ { ACTION_WPS_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST
};
@@ -79,6 +79,7 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON, BUTTON_NONE },
+ { ACTION_TREE_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_listtree */
diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c
index c2ac45e0d6..8b395e2700 100644
--- a/apps/keymaps/keymap-recorder.c
+++ b/apps/keymaps/keymap-recorder.c
@@ -76,7 +76,7 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_MENU, BUTTON_F1|BUTTON_REL, BUTTON_F1 },
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_WPS_QUICKSCREEN, BUTTON_F2|BUTTON_REPEAT, BUTTON_NONE },
- { ACTION_WPS_VIEW_PLAYLIST,BUTTON_F2|BUTTON_REL, BUTTON_F2 },
+ { ACTION_WPS_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_WPS_BROWSE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_WPS_ID3SCREEN, BUTTON_F1|BUTTON_ON, BUTTON_NONE },
{ ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_UP, BUTTON_ON },
@@ -107,6 +107,7 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON },
{ ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
+ { ACTION_TREE_HOTKEY, BUTTON_F2|BUTTON_REL, BUTTON_F2 },
{ ACTION_NONE, BUTTON_ON, BUTTON_NONE },
{ ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP, BUTTON_ON },
{ ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_ON|BUTTON_UP },
diff --git a/apps/keymaps/keymap-sa9200.c b/apps/keymaps/keymap-sa9200.c
index d7405588b5..3c98484b26 100644
--- a/apps/keymaps/keymap-sa9200.c
+++ b/apps/keymaps/keymap-sa9200.c
@@ -100,7 +100,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_WPS_PITCHSCREEN, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
+#endif
{ ACTION_WPS_ID3SCREEN, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST
@@ -124,6 +128,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_TREE_STOP, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-touchscreen.c b/apps/keymaps/keymap-touchscreen.c
index 6d3a515da7..8c2397f48c 100644
--- a/apps/keymaps/keymap-touchscreen.c
+++ b/apps/keymaps/keymap-touchscreen.c
@@ -92,7 +92,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_MENU, BUTTON_TOPLEFT|BUTTON_REL, BUTTON_TOPLEFT },
{ ACTION_WPS_QUICKSCREEN, BUTTON_BOTTOMLEFT|BUTTON_REL, BUTTON_BOTTOMLEFT },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_BOTTOMRIGHT|BUTTON_REL, BUTTON_BOTTOMRIGHT },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_BOTTOMRIGHT|BUTTON_REL, BUTTON_BOTTOMRIGHT },
+#endif
{ ACTION_WPS_REC, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT },
{ ACTION_WPS_PITCHSCREEN, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_BOTTOMLEFT },
{ ACTION_WPS_ID3SCREEN, BUTTON_BOTTOMRIGHT|BUTTON_REPEAT, BUTTON_BOTTOMRIGHT },
@@ -122,6 +126,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
{ ACTION_TREE_STOP, BUTTON_BOTTOMRIGHT|BUTTON_REL, BUTTON_BOTTOMRIGHT },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_TREE)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-vibe500.c b/apps/keymaps/keymap-vibe500.c
index 0a4cf83921..ae0756d1d3 100644
--- a/apps/keymaps/keymap-vibe500.c
+++ b/apps/keymaps/keymap-vibe500.c
@@ -66,7 +66,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
{ ACTION_WPS_BROWSE, BUTTON_OK|BUTTON_REL, BUTTON_OK },
{ ACTION_WPS_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_CANCEL, BUTTON_NONE },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_CANCEL, BUTTON_NONE },
+#endif
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_WPS_QUICKSCREEN, BUTTON_OK|BUTTON_REPEAT, BUTTON_OK },
@@ -76,6 +80,9 @@ static const struct button_mapping button_context_wps[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_tree */
diff --git a/apps/keymaps/keymap-yh8xx_yh9xx.c b/apps/keymaps/keymap-yh8xx_yh9xx.c
index 7ae787a291..c64263d809 100644
--- a/apps/keymaps/keymap-yh8xx_yh9xx.c
+++ b/apps/keymaps/keymap-yh8xx_yh9xx.c
@@ -96,7 +96,11 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_QUICKSCREEN, BUTTON_LEFT|BUTTON_DOWN|BUTTON_REPEAT,
BUTTON_LEFT|BUTTON_DOWN|BUTTON_REPEAT },
+#ifdef HAVE_HOTKEY
+ { ACTION_WPS_HOTKEY, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
+#else
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
+#endif
{ ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST
@@ -117,6 +121,9 @@ static const struct button_mapping button_context_list[] = {
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+#ifdef HAVE_HOTKEY
+// { ACTION_TREE_HOTKEY, BUTTON_NONE, BUTTON_NONE },
+#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
}; /* button_context_tree */
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 60bf9902c7..b64ab859ec 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13394,3 +13394,71 @@
lineout_poweroff: "Line Out"
</voice>
</phrase>
+<phrase>
+ id: LANG_SET_HOTKEY
+ desc: hotkey splash
+ user: core
+ <source>
+ *: none
+ hotkey: "Set Hotkey: %s"
+ </source>
+ <dest>
+ *: none
+ hotkey: "Set Hotkey: %s"
+ </dest>
+ <voice>
+ *: none
+ hotkey: "Set Hotkey: %s"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_HOTKEY_NOT_SET
+ desc: hotkey splash
+ user: core
+ <source>
+ *: none
+ hotkey: "Hotkey Not Set"
+ </source>
+ <dest>
+ *: none
+ hotkey: "Hotkey Not Set"
+ </dest>
+ <voice>
+ *: none
+ hotkey: "Hotkey Not Set"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_HOTKEY
+ desc: hotkey menu
+ user: core
+ <source>
+ *: none
+ hotkey: "Hotkey"
+ </source>
+ <dest>
+ *: none
+ hotkey: "Hotkey"
+ </dest>
+ <voice>
+ *: none
+ hotkey: "Hotkey"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_VIEW_HOTKEY
+ desc: hotkey menu
+ user: core
+ <source>
+ *: none
+ hotkey: "View Hotkey Settings"
+ </source>
+ <dest>
+ *: none
+ hotkey: "View Hotkey Settings"
+ </dest>
+ <voice>
+ *: none
+ hotkey: "View Hotkey Settings"
+ </voice>
+</phrase>
diff --git a/apps/menu.c b/apps/menu.c
index 670a235202..b640905c0f 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -61,6 +61,12 @@
#include "list.h"
#include "buttonbar.h"
+/* hotkey settings */
+#ifdef HAVE_HOTKEY
+const struct menu_item_ex *selected_menu_item;
+bool hotkey_settable_menu = false;
+#endif
+
#define MAX_MENUS 8
/* used to allow for dynamic menus */
#define MAX_MENU_SUBITEMS 64
@@ -426,6 +432,17 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
done = true;
}
#endif
+#ifdef HAVE_HOTKEY
+ else if (hotkey_settable_menu &&
+ ((action == ACTION_WPS_HOTKEY) ||
+ (action == ACTION_TREE_HOTKEY)))
+ {
+ ret = MENU_SELECTED_HOTKEY;
+ done = true;
+ selected = get_menu_selection(gui_synclist_get_sel_pos(&lists),menu);
+ selected_menu_item = menu->submenus[selected];
+ }
+#endif
else if (action == ACTION_TREE_WPS)
{
ret = GO_TO_PREVIOUS_MUSIC;
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index b695d9265b..8a83a3b240 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -47,6 +47,10 @@
#ifdef HAVE_DIRCACHE
#include "dircache.h"
#endif
+#ifdef HAVE_HOTKEY
+#include "list.h"
+#include "settings_list.h"
+#endif
/***********************************/
/* TAGCACHE MENU */
@@ -400,6 +404,58 @@ MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice,
/***********************************/
+/* HOTKEY MENU */
+#ifdef HAVE_HOTKEY
+static void view_hotkey_info(void)
+{
+ struct simplelist_info info;
+ simplelist_info_init(&info, str(LANG_VIEW_HOTKEY), 0, NULL);
+ info.hide_selection = true;
+ simplelist_set_line_count(2);
+ simplelist_addline(0, "WPS: %s",
+ str(global_settings.hotkey_wps_desc_id));
+ simplelist_addline(1, "Tree: %s",
+ str(global_settings.hotkey_tree_desc_id));
+ simplelist_show_list(&info);
+}
+
+/* reset hotkey settings to their defaults */
+static void reset_hotkey_settings(void)
+{
+ void *vars[] = {
+ &global_settings.hotkey_tree,
+ &global_settings.hotkey_tree_desc_id,
+ &global_settings.hotkey_wps,
+ &global_settings.hotkey_wps_desc_id,
+ };
+ const int num_settings = sizeof(vars) / sizeof(vars[0]);
+ int i;
+
+ for (i = 0; i < num_settings; i++)
+ {
+ const struct settings_list *setting =
+ find_setting(vars[i], NULL);
+ reset_setting(setting, setting->setting);
+ }
+
+ settings_save();
+ splash(HZ, str(LANG_RESET_DONE_CLEAR));
+}
+
+MENUITEM_FUNCTION(hotkey_view, 0, ID2P(LANG_VIEW_HOTKEY),
+ (int(*)(void))view_hotkey_info, NULL,
+ NULL, Icon_NOICON);
+MENUITEM_FUNCTION(hotkey_reset, 0, ID2P(LANG_RESET),
+ (int(*)(void))reset_hotkey_settings, NULL,
+ NULL, Icon_NOICON);
+MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON,
+ &hotkey_view, &hotkey_reset);
+#endif /*have_hotkey */
+/* HOTKEY MENU */
+/***********************************/
+
+
+/***********************************/
/* SETTINGS MENU */
static int language_browse(void)
{
@@ -415,7 +471,10 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
&tagcache_menu,
#endif
&display_menu, &system_menu,
- &bookmark_settings_menu, &browse_langs, &voice_settings_menu
+ &bookmark_settings_menu, &browse_langs, &voice_settings_menu,
+#ifdef HAVE_HOTKEY
+ &hotkey_menu,
+#endif
);
/* SETTINGS MENU */
/***********************************/
diff --git a/apps/onplay.c b/apps/onplay.c
index f9c75ab253..5a28c53cd4 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -528,7 +528,7 @@ static int remove_dir(char* dirname, int len)
/* share code for file and directory deletion, saves space */
-static bool delete_handler(bool is_dir)
+static bool delete_file_dir(void)
{
char file_to_delete[MAX_PATH];
strcpy(file_to_delete, selected_file);
@@ -551,7 +551,7 @@ static bool delete_handler(bool is_dir)
splash(0, str(LANG_DELETING));
int res;
- if (is_dir)
+ if (selected_file_attr & ATTR_DIRECTORY) /* true if directory */
{
char pathname[MAX_PATH]; /* space to go deep */
cpu_boost(true);
@@ -568,16 +568,6 @@ static bool delete_handler(bool is_dir)
return (res == 0);
}
-static bool delete_file(void)
-{
- return delete_handler(false);
-}
-
-static bool delete_dir(void)
-{
- return delete_handler(true);
-}
-
static bool rename_file(void)
{
char newname[MAX_PATH];
@@ -988,9 +978,9 @@ MENUITEM_FUNCTION(clipboard_copy_item, 0, ID2P(LANG_COPY),
MENUITEM_FUNCTION(clipboard_paste_item, 0, ID2P(LANG_PASTE),
clipboard_paste, NULL, clipboard_callback, Icon_NOICON);
MENUITEM_FUNCTION(delete_file_item, 0, ID2P(LANG_DELETE),
- delete_file, NULL, clipboard_callback, Icon_NOICON);
+ delete_file_dir, NULL, clipboard_callback, Icon_NOICON);
MENUITEM_FUNCTION(delete_dir_item, 0, ID2P(LANG_DELETE_DIR),
- delete_dir, NULL, clipboard_callback, Icon_NOICON);
+ delete_file_dir, NULL, clipboard_callback, Icon_NOICON);
MENUITEM_FUNCTION(create_dir_item, 0, ID2P(LANG_CREATE_DIR),
create_dir, NULL, clipboard_callback, Icon_NOICON);
@@ -1180,19 +1170,205 @@ static int onplaymenu_callback(int action,const struct menu_item_ex *this_item)
}
return action;
}
-int onplay(char* file, int attr, int from)
+
+#ifdef HAVE_HOTKEY
+/* direct function calls, no need for menu callbacks */
+static bool delete_item(void)
+{
+#ifdef HAVE_MULTIVOLUME
+ /* no delete for volumes */
+ if ((selected_file_attr & FAT_ATTR_VOLUME) ||
+ (selected_file_attr & ATTR_VOLUME))
+ return false;
+#endif
+ return delete_file_dir();
+}
+
+static bool open_with(void)
+{
+ /* only open files */
+ if (selected_file_attr & ATTR_DIRECTORY)
+ return false;
+#ifdef HAVE_MULTIVOLUME
+ if (selected_file_attr & ATTR_VOLUME)
+ return false;
+#endif
+ return list_viewers();
+}
+
+extern const struct menu_item_ex *selected_menu_item;
+extern bool hotkey_settable_menu;
+
+#define HOT_MASK 0x0FF
+#define HOT_WPS 0x100
+#define HOT_TREE 0x200
+
+struct hotkey_assignment {
+ int item;
+ struct menu_func func;
+ int return_code;
+ const struct menu_item_ex *menu_addr;
+};
+
+#define HOTKEY_FUNC(func, param) {{(void *)func}, param}
+
+/* Any desired hotkey functions go here... */
+enum hotkey_settings {
+ HOTKEY_OFF = 0,
+ HOTKEY_VIEW_PLAYLIST = 1,
+ HOTKEY_SHOW_TRACK_INFO,
+ HOTKEY_PITCHSCREEN,
+ HOTKEY_OPEN_WITH,
+ HOTKEY_DELETE,
+ HOTKEY_INSERT,
+};
+
+/* ... and here. Order is not important. */
+static struct hotkey_assignment hotkey_items[] = {
+ { HOTKEY_VIEW_PLAYLIST | HOT_WPS,
+ HOTKEY_FUNC(NULL, NULL),
+ ONPLAY_PLAYLIST, &view_cur_playlist },
+ { HOTKEY_SHOW_TRACK_INFO| HOT_WPS,
+ HOTKEY_FUNC(browse_id3, NULL),
+ ONPLAY_RELOAD_DIR, &browse_id3_item },
+#ifdef HAVE_PITCHSCREEN
+ { HOTKEY_PITCHSCREEN | HOT_WPS,
+ HOTKEY_FUNC(gui_syncpitchscreen_run, NULL),
+ ONPLAY_RELOAD_DIR, &pitch_screen_item },
+#endif
+ { HOTKEY_OPEN_WITH | HOT_WPS | HOT_TREE,
+ HOTKEY_FUNC(open_with, NULL),
+ ONPLAY_RELOAD_DIR, &list_viewers_item },
+ { HOTKEY_DELETE | HOT_WPS | HOT_TREE,
+ HOTKEY_FUNC(delete_item, NULL),
+ ONPLAY_RELOAD_DIR, &delete_file_item },
+ { HOTKEY_DELETE | HOT_TREE,
+ HOTKEY_FUNC(delete_item, NULL),
+ ONPLAY_RELOAD_DIR, &delete_dir_item },
+ { HOTKEY_INSERT | HOT_TREE,
+ HOTKEY_FUNC(playlist_insert_func, (intptr_t*)PLAYLIST_INSERT),
+ ONPLAY_START_PLAY, &i_pl_item },
+};
+
+static const int num_hotkey_items = sizeof(hotkey_items) / sizeof(hotkey_items[0]);
+
+/* Execute the hotkey function, if listed for this screen */
+static int execute_hotkey(bool is_wps)
+{
+ int i;
+ struct hotkey_assignment *this_item;
+ const int context = is_wps ? HOT_WPS : HOT_TREE;
+ const int this_hotkey = (is_wps ? global_settings.hotkey_wps :
+ global_settings.hotkey_tree);
+
+ /* search assignment struct for a match for the hotkey setting */
+ for (i = 0; i < num_hotkey_items; i++)
+ {
+ this_item = &hotkey_items[i];
+ if ((this_item->item & context) &&
+ ((this_item->item & HOT_MASK) == this_hotkey))
+ {
+ /* run the associated function (with optional param), if any */
+ const struct menu_func func = this_item->func;
+ if (func.function != NULL)
+ {
+ if (func.param != NULL)
+ (*(func.function_w_param))(func.param);
+ else
+ (*(func.function))();
+ }
+ /* return with the associated code */
+ return this_item->return_code;
+ }
+ }
+
+ /* no valid hotkey set */
+ splash(HZ, ID2P(LANG_HOTKEY_NOT_SET));
+ return ONPLAY_RELOAD_DIR;
+}
+
+/* Set the hotkey to the current context menu function, if listed */
+static void set_hotkey(bool is_wps)
+{
+ int i;
+ struct hotkey_assignment *this_item;
+ const int context = is_wps ? HOT_WPS : HOT_TREE;
+ int *hk_func = is_wps ? &global_settings.hotkey_wps :
+ &global_settings.hotkey_tree,
+ *hk_desc = is_wps ? &global_settings.hotkey_wps_desc_id :
+ &global_settings.hotkey_tree_desc_id;
+ int this_hk,
+ this_id;
+ bool match_found = false;
+
+ /* search assignment struct for a function that matches the current menu item */
+ for (i = 0; i < num_hotkey_items; i++)
+ {
+ this_item = &hotkey_items[i];
+ if ((this_item->item & context) &&
+ (this_item->menu_addr == selected_menu_item))
+ {
+ this_hk = this_item->item & HOT_MASK;
+ this_id = P2ID((selected_menu_item->callback_and_desc)->desc);
+ match_found = true;
+ break;
+ }
+ }
+
+ /* ignore the hotkey if no match found or no change to setting */
+ if (!match_found || (this_hk == *hk_func)) return;
+
+ char line1_buf[100];
+ char line2_buf[101];
+ char *line1 = line1_buf;
+ char *line2 = line2_buf;
+ char **line1_ptr = &line1;
+ char **line2_ptr = &line2;
+ const struct text_message message={(const char **)line2_ptr, 1};
+ const struct text_message yes_message={(const char **)line1_ptr, 1};
+
+ snprintf(line1, 100, str(LANG_SET_HOTKEY), str(this_id));
+ strcat(strcpy(line2, line1), "?");
+
+ /* confirm the hotkey setting change */
+ if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES)
+ {
+ /* store the hotkey settings */
+ *hk_func = this_hk;
+ *hk_desc = this_id;
+
+ settings_save();
+ splash(HZ*2, line1);
+ }
+}
+#endif /* HOTKEY */
+
+int onplay(char* file, int attr, int from, bool hotkey)
{
const struct menu_item_ex *menu;
onplay_result = ONPLAY_OK;
context = from;
selected_file = file;
selected_file_attr = attr;
+#ifdef HAVE_HOTKEY
+ if (hotkey)
+ return execute_hotkey(context == CONTEXT_WPS);
+ hotkey_settable_menu = true;
+#else
+ (void)hotkey;
+#endif
if (context == CONTEXT_WPS)
menu = &wps_onplay_menu;
else
menu = &tree_onplay_menu;
switch (do_menu(menu, NULL, NULL, false))
{
+#ifdef HAVE_HOTKEY
+ hotkey_settable_menu = false;
+ case MENU_SELECTED_HOTKEY:
+ set_hotkey(context == CONTEXT_WPS);
+ return ONPLAY_RELOAD_DIR;
+#endif
case GO_TO_WPS:
return ONPLAY_START_PLAY;
case GO_TO_ROOT:
diff --git a/apps/onplay.h b/apps/onplay.h
index b0f1a187a3..4eb7c823b8 100644
--- a/apps/onplay.h
+++ b/apps/onplay.h
@@ -21,7 +21,7 @@
#ifndef _ONPLAY_H_
#define _ONPLAY_H_
-int onplay(char* file, int attr, int from_screen);
+int onplay(char* file, int attr, int from_screen, bool hotkey);
enum {
ONPLAY_MAINMENU = -1,
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index c5d4df0684..44fd42f7f2 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -281,7 +281,7 @@ static int display_playlists(char* playlist, bool view)
sel_file);
if (onplay(playlist, FILE_ATTR_M3U,
- CONTEXT_TREE) != ONPLAY_OK)
+ CONTEXT_TREE, false) != ONPLAY_OK)
{
result = 0;
exit = true;
diff --git a/apps/root_menu.h b/apps/root_menu.h
index 4113b64495..d3ef817d5b 100644
--- a/apps/root_menu.h
+++ b/apps/root_menu.h
@@ -53,6 +53,7 @@ enum {
GO_TO_BROWSEPLUGINS,
GO_TO_TIMESCREEN,
GO_TO_PLAYLIST_VIEWER,
+ MENU_SELECTED_HOTKEY,
};
extern const struct menu_item_ex root_menu_;
diff --git a/apps/settings.h b/apps/settings.h
index 62f85254aa..029f056da7 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -816,6 +816,13 @@ struct user_settings
bool morse_input; /* text input method setting */
#endif
+#ifdef HAVE_HOTKEY
+ int hotkey_wps;
+ int hotkey_wps_desc_id;
+ int hotkey_tree;
+ int hotkey_tree_desc_id;
+#endif
+
};
/** global variables **/
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 2638eac5a0..2492178577 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1660,6 +1660,13 @@ const struct settings_list settings[] = {
#ifdef HAVE_MORSE_INPUT
OFFON_SETTING(0, morse_input, LANG_MORSE_INPUT, false, "morse input", NULL),
#endif
+
+#ifdef HAVE_HOTKEY
+ CHOICE_SETTING(0, hotkey_wps, 0, 1, "hotkey wps", 0, NULL, 0),
+ CHOICE_SETTING(0, hotkey_wps_desc_id, 0, LANG_VIEW_DYNAMIC_PLAYLIST, "hotkey wps desc id", 0, NULL, 0),
+ CHOICE_SETTING(0, hotkey_tree, 0, 0, "hotkey tree", 0, NULL, 0),
+ CHOICE_SETTING(0, hotkey_tree_desc_id, 0, LANG_OFF, "hotkey tree desc id", 0, NULL, 0),
+#endif
};
const int nb_settings = sizeof(settings)/sizeof(*settings);
diff --git a/apps/tree.c b/apps/tree.c
index 9053dcfcdb..c8234d5e97 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -757,12 +757,14 @@ static int dirbrowse()
#endif
case ACTION_STD_CONTEXT:
+ case ACTION_TREE_HOTKEY:
{
+ bool hotkey = button == ACTION_TREE_HOTKEY;
int onplay_result;
int attr = 0;
if(!numentries)
- onplay_result = onplay(NULL, 0, curr_context);
+ onplay_result = onplay(NULL, 0, curr_context, hotkey);
else {
#ifdef HAVE_TAGCACHE
if (id3db)
@@ -788,7 +790,7 @@ static int dirbrowse()
snprintf(buf, sizeof buf, "/%s",
dircache[tc.selected_item].name);
}
- onplay_result = onplay(buf, attr, curr_context);
+ onplay_result = onplay(buf, attr, curr_context, hotkey);
}
switch (onplay_result)
{