as3525: fix r26308
[kugel-rb.git] / apps / keymaps / keymap-meizu-m6sp.c
blob962b8b55795ae48dfa6230d8e8a4d263f083a057
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 Jonathan Gordon
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 the toshiba gigabeat target */
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdlib.h>
27 #include "config.h"
28 #include "action.h"
29 #include "button.h"
30 #include "settings.h"
33 * The format of the list is as follows
34 * { Action Code, Button code, Prereq button code }
35 * if there's no need to check the previous button's value, use BUTTON_NONE
36 * Insert LAST_ITEM_IN_LIST at the end of each mapping
39 /* CONTEXT_CUSTOM's used in this file...
41 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
42 CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
43 i.e where up/down is inc/dec
44 CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
48 /* copied from Meizu M6SP keymap */
49 static const struct button_mapping button_context_standard[] = {
50 #if 0 /* disabled for now, there is no BUTTON_UP/DOWN yet */
51 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
52 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
53 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
54 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
55 #endif
56 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
58 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT },
60 { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
61 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
63 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
64 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
66 LAST_ITEM_IN_LIST
67 }; /* button_context_standard */
70 const struct button_mapping* get_context_mapping(int context)
72 (void)context;
74 /* TODO add more button contexts */
75 return button_context_standard;