1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 /* Button Code Definitions for <new> target */
28 #define LAST_ITEM_IN_LIST { ACTION_NONE,BUTTON_NONE,BUTTON_NONE }
29 /* {Action Code, Button code, Prereq button code } */
32 This file is where all button mappings are defined.
33 In ../action.h there is an enum with all the used ACTION_ codes.
34 Ideally All the ACTION_STD_* and ACTION_WPS_* codes should be defined somehwere in this file.
36 Remeber to make a copy of this file and rename it to keymap-<targetname>.c and add it to apps/SOURCES
38 Good luck and thanks for porting a new target! :D
43 * The format of the list is as follows
44 * { Action Code, Button code, Prereq button code }
45 * if there's no need to check the previous button's value, use BUTTON_NONE
46 * Insert LAST_ITEM_IN_LIST at the end of each mapping
48 static const struct button_mapping button_context_standard
[] = {
51 }; /* button_context_standard */
53 static const struct button_mapping button_context_wps
[] = {
56 }; /* button_context_wps */
60 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
61 const struct button_mapping
* get_context_mapping(int context
)
66 return button_context_standard
;
68 return button_context_wps
;
72 case CONTEXT_MAINMENU
:
74 case CONTEXT_SETTINGS
:
75 case CONTEXT_SETTINGS
|CONTEXT_REMOTE
:
77 return button_context_standard
;
79 return button_context_standard
;