1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 Dan Everton
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 ****************************************************************************/
26 #include "buttonmap.h"
28 int key_to_button(int keyboard_button
)
30 int new_btn
= BUTTON_NONE
;
31 switch (keyboard_button
)
35 new_btn
= BUTTON_LEFT
;
39 new_btn
= BUTTON_RIGHT
;
47 new_btn
= BUTTON_DOWN
;
62 case SDLK_KP_MULTIPLY
:
72 new_btn
= BUTTON_PLAY
;
78 struct button_map bm
[] = {
79 #if defined (ARCHOS_RECORDER)
80 { SDLK_F1
, 94, 205, 22, "F1" },
81 { SDLK_F2
, 136, 204, 21, "F2" },
82 { SDLK_F3
, 174, 204, 24, "F3" },
83 { SDLK_KP_PLUS
, 75, 258, 19, "On" },
84 { SDLK_KP_ENTER
, 76, 307, 15, "Off" },
85 { SDLK_KP5
, 151, 290, 20, "Select" },
86 { SDLK_KP8
, 152, 251, 23, "Up" },
87 { SDLK_KP4
, 113, 288, 26, "Left" },
88 { SDLK_KP6
, 189, 291, 23, "Right" },
89 { SDLK_KP2
, 150, 327, 27, "Down" },
90 #elif defined (ARCHOS_FMRECORDER) || defined (ARCHOS_RECORDERV2)
91 { SDLK_F1
, 88, 210, 28, "F1" },
92 { SDLK_F2
, 144, 212, 28, "F2" },
93 { SDLK_F3
, 197, 212, 28, "F3" },
94 { SDLK_KP5
, 144, 287, 21, "Select" },
95 { SDLK_KP_PLUS
, 86, 320, 13, "Menu" },
96 { SDLK_KP_ENTER
, 114, 347, 13, "Stop" },
97 { SDLK_y
, 144, 288, 31, "None" },
98 { SDLK_KP8
, 144, 259, 25, "Up" },
99 { SDLK_KP2
, 144, 316, 31, "Down" },
100 { SDLK_KP6
, 171, 287, 32, "Right" },
102 { SDLK_KP4
, 117, 287, 31, "Left" },
103 { 0, 0, 0, 0, "None" }