1 // SPDX-License-Identifier: GPL-2.0+
2 //
3 // Copyright (C) 2021 Christian Hewitt <christianshewitt@gmail.com>
4
5 #include <media/rc-map.h>
6 #include <linux/module.h>
7
8 //
9 // Keytable for the Mecool Kii Pro remote control
10 //
11
12 static struct rc_map_table mecool_kii_pro[] = {
13 { 0x59, KEY_POWER },
14 { 0x19, KEY_MUTE },
15
16 { 0x42, KEY_RED },
17 { 0x40, KEY_GREEN },
18 { 0x00, KEY_YELLOW},
19 { 0x03, KEY_BLUE },
20
21 { 0x4a, KEY_REWIND },
22 { 0x48, KEY_FORWARD },
23 { 0x08, KEY_PREVIOUSSONG},
24 { 0x0b, KEY_NEXTSONG},
25
26 { 0x46, KEY_PLAYPAUSE },
27 { 0x44, KEY_STOP },
28 { 0x1f, KEY_FAVORITES},
29 { 0x04, KEY_PVR },
30
31 { 0x4d, KEY_EPG },
32 { 0x02, KEY_INFO },
33 { 0x09, KEY_SUBTITLE },
34 { 0x01, KEY_LANGUAGE }, // AUDIO
35
36 { 0x0d, KEY_HOME },
37 { 0x11, KEY_TV },
38 { 0x45, KEY_MENU },
39 { 0x05, KEY_EXIT },
40
41 { 0x5a, KEY_LEFT },
42 { 0x1b, KEY_RIGHT },
43 { 0x06, KEY_UP },
44 { 0x16, KEY_DOWN },
45 { 0x1a, KEY_OK },
46
47 { 0x13, KEY_VOLUMEUP },
48 { 0x17, KEY_VOLUMEDOWN },
49 { 0x58, KEY_APPSELECT }, // APPS
50 { 0x12, KEY_CONTEXT_MENU }, // MOUSE
51 { 0x55, KEY_CHANNELUP }, // PAGE_UP
52 { 0x15, KEY_CHANNELDOWN }, // PAGE_DOWN
53
54 { 0x52, KEY_1 },
55 { 0x50, KEY_2 },
56 { 0x10, KEY_3 },
57 { 0x56, KEY_4 },
58 { 0x54, KEY_5 },
59 { 0x14, KEY_6 },
60 { 0x4e, KEY_7 },
61 { 0x4c, KEY_8 },
62 { 0x0c, KEY_9 },
63 { 0x18, KEY_WWW },
64 { 0x0f, KEY_0 },
65 { 0x51, KEY_DELETE },
66 };
67
68 static struct rc_map_list mecool_kii_pro_map = {
69 .map = {
70 .scan = mecool_kii_pro,
71 .size = ARRAY_SIZE(mecool_kii_pro),
72 .rc_proto = RC_PROTO_NEC,
73 .name = RC_MAP_MECOOL_KII_PRO,
74 }
75 };
76
init_rc_map_mecool_kii_pro(void)77 static int __init init_rc_map_mecool_kii_pro(void)
78 {
79 return rc_map_register(&mecool_kii_pro_map);
80 }
81
exit_rc_map_mecool_kii_pro(void)82 static void __exit exit_rc_map_mecool_kii_pro(void)
83 {
84 rc_map_unregister(&mecool_kii_pro_map);
85 }
86
87 module_init(init_rc_map_mecool_kii_pro)
88 module_exit(exit_rc_map_mecool_kii_pro)
89
90 MODULE_LICENSE("GPL");
91 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
92