rc-mecool-kiii-pro.c 1.8 KB

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