1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 Mark Arigo
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
;
51 new_btn
= BUTTON_PLAY
;
55 new_btn
= BUTTON_FFWD
;
72 struct button_map bm
[] = {
73 #if defined (SAMSUNG_YH820)
74 { SDLK_KP_PLUS
, 330, 53, 23, "Record" },
75 { SDLK_KP7
, 132, 208, 21, "Left" },
76 { SDLK_KP5
, 182, 210, 18, "Play" },
77 { SDLK_KP9
, 234, 211, 22, "Right" },
78 { SDLK_KP8
, 182, 260, 15, "Up" },
79 { SDLK_KP4
, 122, 277, 29, "Menu" },
80 { SDLK_KP6
, 238, 276, 25, "Select" },
81 { SDLK_KP2
, 183, 321, 24, "Down" },
82 #elif defined (SAMSUNG_YH920) || defined (SAMSUNG_YH925)
83 { SDLK_KP9
, 370, 32, 15, "FF" },
84 { SDLK_KP5
, 369, 84, 25, "Play" },
85 { SDLK_KP5
, 367, 125, 27, "Play" },
86 { SDLK_KP3
, 369, 188, 17, "Rew" },
87 { SDLK_KP_PLUS
, 370, 330, 30, "Record" },
88 { SDLK_KP4
, 146, 252, 32, "Menu" },
89 { SDLK_KP8
, 204, 226, 27, "Up" },
90 { SDLK_KP6
, 257, 250, 34, "Select" },
91 { SDLK_KP2
, 205, 294, 35, "Down" },
93 { 0, 0, 0, 0, "None" }