Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 //
0003 // Copyright (C) 2018 Sean Young <sean@mess.org>
0004 
0005 #include <media/rc-map.h>
0006 #include <linux/module.h>
0007 
0008 //
0009 // Note that this remote has a stick which its own IR protocol,
0010 // with 16 directions. This is supported by the imon_rsc BPF decoder
0011 // in v4l-utils.
0012 //
0013 static struct rc_map_table imon_rsc[] = {
0014     { 0x801010, KEY_EXIT },
0015     { 0x80102f, KEY_POWER },
0016     { 0x80104a, KEY_SCREENSAVER },  /* Screensaver */
0017     { 0x801049, KEY_TIME },     /* Timer */
0018     { 0x801054, KEY_NUMERIC_1 },
0019     { 0x801055, KEY_NUMERIC_2 },
0020     { 0x801056, KEY_NUMERIC_3 },
0021     { 0x801057, KEY_NUMERIC_4 },
0022     { 0x801058, KEY_NUMERIC_5 },
0023     { 0x801059, KEY_NUMERIC_6 },
0024     { 0x80105a, KEY_NUMERIC_7 },
0025     { 0x80105b, KEY_NUMERIC_8 },
0026     { 0x80105c, KEY_NUMERIC_9 },
0027     { 0x801081, KEY_SCREEN },   /* Desktop */
0028     { 0x80105d, KEY_NUMERIC_0 },
0029     { 0x801082, KEY_ZOOM },     /* Maximise */
0030     { 0x801048, KEY_ESC },
0031     { 0x80104b, KEY_MEDIA },    /* Windows key */
0032     { 0x801083, KEY_MENU },
0033     { 0x801045, KEY_APPSELECT },    /* app launcher */
0034     { 0x801084, KEY_STOP },
0035     { 0x801046, KEY_CYCLEWINDOWS },
0036     { 0x801085, KEY_BACKSPACE },
0037     { 0x801086, KEY_KEYBOARD },
0038     { 0x801087, KEY_SPACE },
0039     { 0x80101e, KEY_RESERVED }, /* shift tab */
0040     { 0x801098, BTN_0 },
0041     { 0x80101f, KEY_TAB },
0042     { 0x80101b, BTN_LEFT },
0043     { 0x80101d, BTN_RIGHT },
0044     { 0x801016, BTN_MIDDLE },   /* drag and drop */
0045     { 0x801088, KEY_MUTE },
0046     { 0x80105e, KEY_VOLUMEDOWN },
0047     { 0x80105f, KEY_VOLUMEUP },
0048     { 0x80104c, KEY_PLAY },
0049     { 0x80104d, KEY_PAUSE },
0050     { 0x80104f, KEY_EJECTCD },
0051     { 0x801050, KEY_PREVIOUS },
0052     { 0x801051, KEY_NEXT },
0053     { 0x80104e, KEY_STOP },
0054     { 0x801052, KEY_REWIND },
0055     { 0x801053, KEY_FASTFORWARD },
0056     { 0x801089, KEY_FULL_SCREEN }   /* full screen */
0057 };
0058 
0059 static struct rc_map_list imon_rsc_map = {
0060     .map = {
0061         .scan     = imon_rsc,
0062         .size     = ARRAY_SIZE(imon_rsc),
0063         .rc_proto = RC_PROTO_NECX,
0064         .name     = RC_MAP_IMON_RSC,
0065     }
0066 };
0067 
0068 static int __init init_rc_map_imon_rsc(void)
0069 {
0070     return rc_map_register(&imon_rsc_map);
0071 }
0072 
0073 static void __exit exit_rc_map_imon_rsc(void)
0074 {
0075     rc_map_unregister(&imon_rsc_map);
0076 }
0077 
0078 module_init(init_rc_map_imon_rsc)
0079 module_exit(exit_rc_map_imon_rsc)
0080 
0081 MODULE_LICENSE("GPL");
0082 MODULE_AUTHOR("Sean Young <sean@mess.org>");