summaryrefslogtreecommitdiff
path: root/apps/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'apps/keymaps')
-rw-r--r--apps/keymaps/keymap-h1x0_h3x0.c40
-rw-r--r--apps/keymaps/keymap-ondio.c11
-rw-r--r--apps/keymaps/keymap-recorder.c15
-rw-r--r--apps/keymaps/keymap-x5.c12
4 files changed, 78 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c
index 0c0b61d201..af52b5c60d 100644
--- a/apps/keymaps/keymap-h1x0_h3x0.c
+++ b/apps/keymaps/keymap-h1x0_h3x0.c
@@ -259,6 +259,18 @@ const struct button_mapping button_context_keyboard[] = {
259 LAST_ITEM_IN_LIST 259 LAST_ITEM_IN_LIST
260}; /* button_context_keyboard */ 260}; /* button_context_keyboard */
261 261
262const struct button_mapping button_context_radio[] = {
263 { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE },
264 { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT },
265 { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE },
266 { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON },
267 { ACTION_FM_EXIT, BUTTON_MODE | BUTTON_REL, BUTTON_MODE },
268 { ACTION_FM_PLAY, BUTTON_ON | BUTTON_REL, BUTTON_ON },
269
270 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
271
272};
273
262/***************************************************************************** 274/*****************************************************************************
263 * Remote control mappings 275 * Remote control mappings
264 *****************************************************************************/ 276 *****************************************************************************/
@@ -650,6 +662,21 @@ const struct button_mapping button_context_keyboard_h300lcdremote[] = {
650 LAST_ITEM_IN_LIST 662 LAST_ITEM_IN_LIST
651}; /* button_context_keyboard_h300lcdremote */ 663}; /* button_context_keyboard_h300lcdremote */
652 664
665const struct button_mapping button_context_radio_h100remote[] = {
666 { ACTION_FM_MENU, BUTTON_RC_MENU | BUTTON_REPEAT, BUTTON_NONE },
667 { ACTION_FM_PRESET, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU },
668 { ACTION_FM_STOP, BUTTON_RC_STOP, BUTTON_NONE },
669 { ACTION_FM_MODE, BUTTON_RC_ON | BUTTON_REPEAT, BUTTON_RC_ON },
670 { ACTION_FM_EXIT, BUTTON_RC_MODE | BUTTON_REL, BUTTON_RC_MODE },
671 { ACTION_FM_PLAY, BUTTON_RC_ON | BUTTON_REL, BUTTON_RC_ON },
672 { ACTION_FM_NEXT_PRESET, BUTTON_RC_BITRATE, BUTTON_NONE },
673 { ACTION_FM_PREV_PRESET, BUTTON_RC_SOURCE, BUTTON_NONE },
674
675 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
676};
677
678const struct button_mapping *button_context_radio_h300lcdremote =
679 button_context_radio_h100remote;
653 680
654/* the actual used tables */ 681/* the actual used tables */
655static const struct button_mapping 682static const struct button_mapping
@@ -667,6 +694,7 @@ static const struct button_mapping
667 *remote_btn_ctxt_pitchscreen = 0, 694 *remote_btn_ctxt_pitchscreen = 0,
668 *remote_btn_ctxt_recscreen = 0, 695 *remote_btn_ctxt_recscreen = 0,
669 *remote_btn_ctxt_keyboard = 0; 696 *remote_btn_ctxt_keyboard = 0;
697 *remote_btn_ctxt_radio = 0;
670 698
671static int _remote_type = -1; /*safe value, forces the first press to init the mappings */ 699static int _remote_type = -1; /*safe value, forces the first press to init the mappings */
672 700
@@ -690,6 +718,7 @@ static void remap_remote(void)
690 remote_btn_ctxt_pitchscreen = NULL; 718 remote_btn_ctxt_pitchscreen = NULL;
691 remote_btn_ctxt_recscreen = NULL; 719 remote_btn_ctxt_recscreen = NULL;
692 remote_btn_ctxt_keyboard = NULL; 720 remote_btn_ctxt_keyboard = NULL;
721 remote_btn_ctxt_radio = NULL;
693 break; 722 break;
694 723
695 case REMOTETYPE_H100_LCD: 724 case REMOTETYPE_H100_LCD:
@@ -714,6 +743,8 @@ static void remap_remote(void)
714 = button_context_recscreen_h100remote, 743 = button_context_recscreen_h100remote,
715 remote_btn_ctxt_keyboard 744 remote_btn_ctxt_keyboard
716 = button_context_keyboard_h100remote; 745 = button_context_keyboard_h100remote;
746 remote_btn_ctxt_radio
747 = button_context_radio_h100remote;
717 break; 748 break;
718 749
719 case REMOTETYPE_H300_LCD: 750 case REMOTETYPE_H300_LCD:
@@ -738,6 +769,8 @@ static void remap_remote(void)
738 = button_context_recscreen_h300lcdremote, 769 = button_context_recscreen_h300lcdremote,
739 remote_btn_ctxt_keyboard 770 remote_btn_ctxt_keyboard
740 = button_context_keyboard_h300lcdremote; 771 = button_context_keyboard_h300lcdremote;
772 remote_btn_ctxt_radio
773 = button_context_radio_h300lcdremote;
741 break; 774 break;
742 775
743 case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */ 776 case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */
@@ -762,6 +795,8 @@ static void remap_remote(void)
762 = button_context_recscreen_h300lcdremote, 795 = button_context_recscreen_h300lcdremote,
763 remote_btn_ctxt_keyboard 796 remote_btn_ctxt_keyboard
764 = button_context_keyboard_h300lcdremote; 797 = button_context_keyboard_h300lcdremote;
798 remote_btn_ctxt_radio
799 = button_context_radio_h300lcdremote;
765#if 0 800#if 0
766 remote_btn_ctxt_std = 801 remote_btn_ctxt_std =
767 remote_btn_ctxt_wps = 802 remote_btn_ctxt_wps =
@@ -777,6 +812,7 @@ static void remap_remote(void)
777 remote_btn_ctxt_pitchscreen = 812 remote_btn_ctxt_pitchscreen =
778 remote_btn_ctxt_recscreen = 813 remote_btn_ctxt_recscreen =
779 remote_btn_ctxt_keyboard = 814 remote_btn_ctxt_keyboard =
815 remote_btn_ctxt_radio =
780#endif 816#endif
781 break; 817 break;
782 818
@@ -827,6 +863,8 @@ const struct button_mapping* get_context_mapping_remote(int context)
827 return remote_btn_ctxt_recscreen; 863 return remote_btn_ctxt_recscreen;
828 case CONTEXT_KEYBOARD: 864 case CONTEXT_KEYBOARD:
829 return remote_btn_ctxt_keyboard; 865 return remote_btn_ctxt_keyboard;
866 case CONTEXT_FM:
867 return remote_btn_ctxt_radio;
830 } 868 }
831 return remote_btn_ctxt_std; 869 return remote_btn_ctxt_std;
832} 870}
@@ -879,6 +917,8 @@ const struct button_mapping* get_context_mapping(int context)
879 return button_context_recscreen; 917 return button_context_recscreen;
880 case CONTEXT_KEYBOARD: 918 case CONTEXT_KEYBOARD:
881 return button_context_keyboard; 919 return button_context_keyboard;
920 case CONTEXT_FM:
921 return button_context_radio;
882 } 922 }
883 return button_context_standard; 923 return button_context_standard;
884} 924}
diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c
index ca1ae8d457..80b6923ffa 100644
--- a/apps/keymaps/keymap-ondio.c
+++ b/apps/keymaps/keymap-ondio.c
@@ -156,6 +156,17 @@ const struct button_mapping button_context_keyboard[] = {
156 LAST_ITEM_IN_LIST 156 LAST_ITEM_IN_LIST
157}; /* button_context_keyboard */ 157}; /* button_context_keyboard */
158 158
159const struct button_mapping button_context_radio[] = {
160 { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE },
161 { ACTION_FM_RECORD_DBLPRE, BUTTON_MENU, BUTTON_NONE},
162 { ACTION_FM_RECORD, BUTTON_MENU | BUTTON_REL, BUTTON_NONE },
163 { ACTION_FM_STOP, BUTTON_OFF | BUTTON_REL, BUTTON_OFF },
164 { ACTION_FM_EXIT, BUTTON_OFF | BUTTON_REPEAT, BUTTON_OFF },
165
166 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
167
168};
169
159const struct button_mapping* get_context_mapping( int context ) 170const struct button_mapping* get_context_mapping( int context )
160{ 171{
161 switch( context ) 172 switch( context )
diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c
index af28e51095..489f9fbd44 100644
--- a/apps/keymaps/keymap-recorder.c
+++ b/apps/keymaps/keymap-recorder.c
@@ -191,7 +191,22 @@ struct button_mapping button_context_bmark[] = {
191 { ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, 191 { ACTION_BMS_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
192 192
193 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), 193 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
194
194}; /* button_context_settings_bmark */ 195}; /* button_context_settings_bmark */
196
197const struct button_mapping button_context_radio[] = {
198 { ACTION_FM_MENU, BUTTON_F1, BUTTON_NONE },
199 { ACTION_FM_PRESET, BUTTON_F2, BUTTON_NONE },
200 { ACTION_FM_RECORD, BUTTON_F3, BUTTON_NONE },
201 { ACTION_FM_FREEZE, BUTTON_PLAY, BUTTON_NONE },
202 { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE },
203 { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON },
204 { ACTION_FM_EXIT, BUTTON_ON | BUTTON_REL, BUTTON_ON },
205
206 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
207
208};
209
195/***************************************************************************** 210/*****************************************************************************
196 * Remote control mappings 211 * Remote control mappings
197 *****************************************************************************/ 212 *****************************************************************************/
diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c
index 05985fedb1..1ef7d6a5c9 100644
--- a/apps/keymaps/keymap-x5.c
+++ b/apps/keymaps/keymap-x5.c
@@ -242,6 +242,18 @@ const struct button_mapping button_context_bmark[] = {
242 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 242 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
243}; /* button_context_settings_bmark */ 243}; /* button_context_settings_bmark */
244 244
245const struct button_mapping button_context_radio[] = {
246 { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE },
247 { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT },
248 { ACTION_FM_STOP, BUTTON_POWER, BUTTON_NONE },
249 { ACTION_FM_MODE, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY },
250 { ACTION_FM_EXIT, BUTTON_REC | BUTTON_REL, BUTTON_REC },
251 { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY },
252
253 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
254
255};
256
245static const struct button_mapping* get_context_mapping_remote( int context ) 257static const struct button_mapping* get_context_mapping_remote( int context )
246{ 258{
247 context ^= CONTEXT_REMOTE; 259 context ^= CONTEXT_REMOTE;