summaryrefslogtreecommitdiff
path: root/apps/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'apps/keymaps')
-rw-r--r--apps/keymaps/keymap-ipod.c15
-rw-r--r--apps/keymaps/keymap-x5.c17
2 files changed, 30 insertions, 2 deletions
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index 3b4c4c7a2d..4faf40d0d4 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -23,7 +23,6 @@
23#include "button.h" 23#include "button.h"
24#include "settings.h" 24#include "settings.h"
25 25
26
27/* 26/*
28 * The format of the list is as follows 27 * The format of the list is as follows
29 * { Action Code, Button code, Prereq button code } 28 * { Action Code, Button code, Prereq button code }
@@ -118,6 +117,18 @@ struct button_mapping button_context_bmark[] = {
118 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), 117 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
119}; /* button_context_settings_bmark */ 118}; /* button_context_settings_bmark */
120 119
120struct button_mapping button_context_quickscreen[] = {
121 { ACTION_QS_DOWN, BUTTON_PLAY, BUTTON_NONE },
122 { ACTION_QS_DOWN, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
123 { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
124 { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
125 { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
126 { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
127 { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
128
129 LAST_ITEM_IN_LIST
130}; /* button_context_quickscreen */
131
121/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ 132/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
122struct button_mapping* get_context_mapping(int context) 133struct button_mapping* get_context_mapping(int context)
123{ 134{
@@ -145,6 +156,8 @@ struct button_mapping* get_context_mapping(int context)
145 return button_context_yesno; 156 return button_context_yesno;
146 case CONTEXT_BOOKMARKSCREEN: 157 case CONTEXT_BOOKMARKSCREEN:
147 return button_context_bmark; 158 return button_context_bmark;
159 case CONTEXT_QUICKSCREEN:
160 return button_context_quickscreen;
148 default: 161 default:
149 return button_context_standard; 162 return button_context_standard;
150 } 163 }
diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c
index 33c1946e6c..666ce7819a 100644
--- a/apps/keymaps/keymap-x5.c
+++ b/apps/keymaps/keymap-x5.c
@@ -110,6 +110,20 @@ struct button_mapping button_context_yesno[] = {
110 LAST_ITEM_IN_LIST 110 LAST_ITEM_IN_LIST
111}; /* button_context_settings_yesno */ 111}; /* button_context_settings_yesno */
112 112
113struct button_mapping button_context_quickscreen[] = {
114 { ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
115 { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP },
116 { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
117 { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN },
118 { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
119 { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
120 { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
121 { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
122 { ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE },
123
124 LAST_ITEM_IN_LIST
125}; /* button_context_quickscreen */
126
113struct button_mapping* get_context_mapping( int context ) 127struct button_mapping* get_context_mapping( int context )
114{ 128{
115 switch( context ) 129 switch( context )
@@ -132,7 +146,8 @@ struct button_mapping* get_context_mapping( int context )
132 /* else fall through to CUSTOM|1 */ 146 /* else fall through to CUSTOM|1 */
133 case CONTEXT_CUSTOM|1: 147 case CONTEXT_CUSTOM|1:
134 return button_context_tree; 148 return button_context_tree;
135 149 case CONTEXT_QUICKSCREEN:
150 return button_context_quickscreen;
136 case CONTEXT_LIST: 151 case CONTEXT_LIST:
137 case CONTEXT_MAINMENU: 152 case CONTEXT_MAINMENU:
138 default: 153 default: