rc-imon-rsc.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // SPDX-License-Identifier: GPL-2.0+
  2. //
  3. // Copyright (C) 2018 Sean Young <sean@mess.org>
  4. #include <media/rc-map.h>
  5. #include <linux/module.h>
  6. //
  7. // Note that this remote has a stick which its own IR protocol,
  8. // with 16 directions. This is not supported yet.
  9. //
  10. static struct rc_map_table imon_rsc[] = {
  11. { 0x801010, KEY_EXIT },
  12. { 0x80102f, KEY_POWER },
  13. { 0x80104a, KEY_SCREENSAVER }, /* Screensaver */
  14. { 0x801049, KEY_TIME }, /* Timer */
  15. { 0x801054, KEY_NUMERIC_1 },
  16. { 0x801055, KEY_NUMERIC_2 },
  17. { 0x801056, KEY_NUMERIC_3 },
  18. { 0x801057, KEY_NUMERIC_4 },
  19. { 0x801058, KEY_NUMERIC_5 },
  20. { 0x801059, KEY_NUMERIC_6 },
  21. { 0x80105a, KEY_NUMERIC_7 },
  22. { 0x80105b, KEY_NUMERIC_8 },
  23. { 0x80105c, KEY_NUMERIC_9 },
  24. { 0x801081, KEY_SCREEN }, /* Desktop */
  25. { 0x80105d, KEY_NUMERIC_0 },
  26. { 0x801082, KEY_MAX },
  27. { 0x801048, KEY_ESC },
  28. { 0x80104b, KEY_MEDIA }, /* Windows key */
  29. { 0x801083, KEY_MENU },
  30. { 0x801045, KEY_APPSELECT }, /* app launcher */
  31. { 0x801084, KEY_STOP },
  32. { 0x801046, KEY_CYCLEWINDOWS },
  33. { 0x801085, KEY_BACKSPACE },
  34. { 0x801086, KEY_KEYBOARD },
  35. { 0x801087, KEY_SPACE },
  36. { 0x80101e, KEY_RESERVED }, /* shift tab */
  37. { 0x801098, BTN_0 },
  38. { 0x80101f, KEY_TAB },
  39. { 0x80101b, BTN_LEFT },
  40. { 0x80101d, BTN_RIGHT },
  41. { 0x801016, BTN_MIDDLE }, /* drag and drop */
  42. { 0x801088, KEY_MUTE },
  43. { 0x80105e, KEY_VOLUMEDOWN },
  44. { 0x80105f, KEY_VOLUMEUP },
  45. { 0x80104c, KEY_PLAY },
  46. { 0x80104d, KEY_PAUSE },
  47. { 0x80104f, KEY_EJECTCD },
  48. { 0x801050, KEY_PREVIOUS },
  49. { 0x801051, KEY_NEXT },
  50. { 0x80104e, KEY_STOP },
  51. { 0x801052, KEY_REWIND },
  52. { 0x801053, KEY_FASTFORWARD },
  53. { 0x801089, KEY_ZOOM } /* full screen */
  54. };
  55. static struct rc_map_list imon_rsc_map = {
  56. .map = {
  57. .scan = imon_rsc,
  58. .size = ARRAY_SIZE(imon_rsc),
  59. .rc_proto = RC_PROTO_NEC,
  60. .name = RC_MAP_IMON_RSC,
  61. }
  62. };
  63. static int __init init_rc_map_imon_rsc(void)
  64. {
  65. return rc_map_register(&imon_rsc_map);
  66. }
  67. static void __exit exit_rc_map_imon_rsc(void)
  68. {
  69. rc_map_unregister(&imon_rsc_map);
  70. }
  71. module_init(init_rc_map_imon_rsc)
  72. module_exit(exit_rc_map_imon_rsc)
  73. MODULE_LICENSE("GPL");
  74. MODULE_AUTHOR("Sean Young <sean@mess.org>");