rc-medion-x10-or2x.c 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Medion X10 OR22/OR24 RF remote keytable
  4. *
  5. * Copyright (C) 2012 Anssi Hannula <[email protected]>
  6. *
  7. * This keymap is for several Medion X10 remotes that have the Windows MCE
  8. * button. This has been tested with a "RF VISTA Remote Control", OR24V,
  9. * P/N 20035335, but should work with other variants that have the same
  10. * buttons, such as OR22V and OR24E.
  11. */
  12. #include <linux/module.h>
  13. #include <media/rc-map.h>
  14. static struct rc_map_table medion_x10_or2x[] = {
  15. { 0x02, KEY_POWER },
  16. { 0x16, KEY_TEXT }, /* "T" in a box, for teletext */
  17. { 0x09, KEY_VOLUMEUP },
  18. { 0x08, KEY_VOLUMEDOWN },
  19. { 0x00, KEY_MUTE },
  20. { 0x0b, KEY_CHANNELUP },
  21. { 0x0c, KEY_CHANNELDOWN },
  22. { 0x32, KEY_RED },
  23. { 0x33, KEY_GREEN },
  24. { 0x34, KEY_YELLOW },
  25. { 0x35, KEY_BLUE },
  26. { 0x18, KEY_PVR }, /* record symbol inside a tv symbol */
  27. { 0x04, KEY_DVD }, /* disc symbol */
  28. { 0x31, KEY_EPG }, /* a tv schedule symbol */
  29. { 0x1c, KEY_TV }, /* play symbol inside a tv symbol */
  30. { 0x20, KEY_BACK },
  31. { 0x2f, KEY_INFO },
  32. { 0x1a, KEY_UP },
  33. { 0x22, KEY_DOWN },
  34. { 0x1d, KEY_LEFT },
  35. { 0x1f, KEY_RIGHT },
  36. { 0x1e, KEY_OK },
  37. { 0x1b, KEY_MEDIA }, /* Windows MCE button */
  38. { 0x21, KEY_PREVIOUS },
  39. { 0x23, KEY_NEXT },
  40. { 0x24, KEY_REWIND },
  41. { 0x26, KEY_FORWARD },
  42. { 0x25, KEY_PLAY },
  43. { 0x28, KEY_STOP },
  44. { 0x29, KEY_PAUSE },
  45. { 0x27, KEY_RECORD },
  46. { 0x0d, KEY_NUMERIC_1 },
  47. { 0x0e, KEY_NUMERIC_2 },
  48. { 0x0f, KEY_NUMERIC_3 },
  49. { 0x10, KEY_NUMERIC_4 },
  50. { 0x11, KEY_NUMERIC_5 },
  51. { 0x12, KEY_NUMERIC_6 },
  52. { 0x13, KEY_NUMERIC_7 },
  53. { 0x14, KEY_NUMERIC_8 },
  54. { 0x15, KEY_NUMERIC_9 },
  55. { 0x17, KEY_NUMERIC_0 },
  56. { 0x30, KEY_CLEAR },
  57. { 0x36, KEY_ENTER },
  58. { 0x37, KEY_NUMERIC_STAR },
  59. { 0x38, KEY_NUMERIC_POUND },
  60. };
  61. static struct rc_map_list medion_x10_or2x_map = {
  62. .map = {
  63. .scan = medion_x10_or2x,
  64. .size = ARRAY_SIZE(medion_x10_or2x),
  65. .rc_proto = RC_PROTO_OTHER,
  66. .name = RC_MAP_MEDION_X10_OR2X,
  67. }
  68. };
  69. static int __init init_rc_map_medion_x10_or2x(void)
  70. {
  71. return rc_map_register(&medion_x10_or2x_map);
  72. }
  73. static void __exit exit_rc_map_medion_x10_or2x(void)
  74. {
  75. rc_map_unregister(&medion_x10_or2x_map);
  76. }
  77. module_init(init_rc_map_medion_x10_or2x)
  78. module_exit(exit_rc_map_medion_x10_or2x)
  79. MODULE_DESCRIPTION("Medion X10 OR22/OR24 RF remote keytable");
  80. MODULE_AUTHOR("Anssi Hannula <[email protected]>");
  81. MODULE_LICENSE("GPL");