1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement.
14 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
15 * KIND, either express or implied.
17 ****************************************************************************/
19 /* Button Code Definitions for <new> target */
25 #define LAST_ITEM_IN_LIST { ACTION_NONE,BUTTON_NONE,BUTTON_NONE }
26 /* {Action Code, Button code, Prereq button code } */
29 This file is where all button mappings are defined.
30 In ../action.h there is an enum with all the used ACTION_ codes.
31 Ideally All the ACTION_STD_* and ACTION_WPS_* codes should be defined somehwere in this file.
33 Remeber to make a copy of this file and rename it to keymap-<targetname>.c and add it to apps/SOURCES
35 Good luck and thanks for porting a new target! :D
40 * The format of the list is as follows
41 * { Action Code, Button code, Prereq button code }
42 * if there's no need to check the previous button's value, use BUTTON_NONE
43 * Insert LAST_ITEM_IN_LIST at the end of each mapping
45 static const struct button_mapping button_context_standard
[] = {
48 }; /* button_context_standard */
50 static const struct button_mapping button_context_wps
[] = {
53 }; /* button_context_wps */
57 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
58 const struct button_mapping
* get_context_mapping(int context
)
63 return button_context_standard
;
65 return button_context_wps
;
69 case CONTEXT_MAINMENU
:
71 case CONTEXT_SETTINGS
:
72 case CONTEXT_SETTINGS
|CONTEXT_REMOTE
:
74 return button_context_standard
;
76 return button_context_standard
;