More tab fixes
[kugel-rb.git] / apps / keymaps / keymap-newtarget.c
blob6c0918493170a1a0cacb66183175705e907a46f1
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 200
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 */
24 #include "config.h"
25 #include "action.h"
26 #include "button.h"
28 #define LAST_ITEM_IN_LIST { ACTION_NONE,BUTTON_NONE,BUTTON_NONE }
29 /* {Action Code, Button code, Prereq button code } */
31 /**
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
40 **/
42 /*
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[] = {
50 LAST_ITEM_IN_LIST
51 }; /* button_context_standard */
53 static const struct button_mapping button_context_wps[] = {
55 LAST_ITEM_IN_LIST
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)
63 switch (context)
65 case CONTEXT_STD:
66 return button_context_standard;
67 case CONTEXT_WPS:
68 return button_context_wps;
70 case CONTEXT_TREE:
71 case CONTEXT_LIST:
72 case CONTEXT_MAINMENU:
74 case CONTEXT_SETTINGS:
75 case CONTEXT_SETTINGS|CONTEXT_REMOTE:
76 default:
77 return button_context_standard;
79 return button_context_standard;