rc-kworld-pc150u.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* kworld-pc150u.c - Keytable for kworld_pc150u Remote Controller
  2. *
  3. * keymap imported from ir-keymaps.c
  4. *
  5. * Copyright (c) 2010 by Kyle Strickland
  6. * (based on kworld-plus-tv-analog.c by
  7. * Mauro Carvalho Chehab)
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. */
  14. #include <media/rc-map.h>
  15. #include <linux/module.h>
  16. /* Kworld PC150-U
  17. Kyle Strickland <kyle@kyle.strickland.name>
  18. */
  19. static struct rc_map_table kworld_pc150u[] = {
  20. { 0x0c, KEY_MEDIA }, /* Kworld key */
  21. { 0x16, KEY_EJECTCLOSECD }, /* -> ) */
  22. { 0x1d, KEY_POWER2 },
  23. { 0x00, KEY_1 },
  24. { 0x01, KEY_2 },
  25. { 0x02, KEY_3 },
  26. { 0x03, KEY_4 },
  27. { 0x04, KEY_5 },
  28. { 0x05, KEY_6 },
  29. { 0x06, KEY_7 },
  30. { 0x07, KEY_8 },
  31. { 0x08, KEY_9 },
  32. { 0x0a, KEY_0 },
  33. { 0x09, KEY_AGAIN },
  34. { 0x14, KEY_MUTE },
  35. { 0x1e, KEY_LAST },
  36. { 0x17, KEY_ZOOM },
  37. { 0x1f, KEY_HOMEPAGE },
  38. { 0x0e, KEY_ESC },
  39. { 0x20, KEY_UP },
  40. { 0x21, KEY_DOWN },
  41. { 0x42, KEY_LEFT },
  42. { 0x43, KEY_RIGHT },
  43. { 0x0b, KEY_ENTER },
  44. { 0x10, KEY_CHANNELUP },
  45. { 0x11, KEY_CHANNELDOWN },
  46. { 0x13, KEY_VOLUMEUP },
  47. { 0x12, KEY_VOLUMEDOWN },
  48. { 0x19, KEY_TIME}, /* Timeshift */
  49. { 0x1a, KEY_STOP},
  50. { 0x1b, KEY_RECORD},
  51. { 0x4b, KEY_EMAIL},
  52. { 0x40, KEY_REWIND},
  53. { 0x44, KEY_PLAYPAUSE},
  54. { 0x41, KEY_FORWARD},
  55. { 0x22, KEY_TEXT},
  56. { 0x15, KEY_AUDIO}, /* ((*)) */
  57. { 0x0f, KEY_MODE}, /* display ratio */
  58. { 0x1c, KEY_SYSRQ}, /* snapshot */
  59. { 0x4a, KEY_SLEEP}, /* sleep timer */
  60. { 0x48, KEY_SOUND}, /* switch theater mode */
  61. { 0x49, KEY_BLUE}, /* A */
  62. { 0x18, KEY_RED}, /* B */
  63. { 0x23, KEY_GREEN}, /* C */
  64. };
  65. static struct rc_map_list kworld_pc150u_map = {
  66. .map = {
  67. .scan = kworld_pc150u,
  68. .size = ARRAY_SIZE(kworld_pc150u),
  69. .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
  70. .name = RC_MAP_KWORLD_PC150U,
  71. }
  72. };
  73. static int __init init_rc_map_kworld_pc150u(void)
  74. {
  75. return rc_map_register(&kworld_pc150u_map);
  76. }
  77. static void __exit exit_rc_map_kworld_pc150u(void)
  78. {
  79. rc_map_unregister(&kworld_pc150u_map);
  80. }
  81. module_init(init_rc_map_kworld_pc150u)
  82. module_exit(exit_rc_map_kworld_pc150u)
  83. MODULE_LICENSE("GPL");
  84. MODULE_AUTHOR("Kyle Strickland <kyle@kyle.strickland.name>");