Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6563623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:52:21+00:00 2026-05-25T13:52:21+00:00

I’ve got a Remote for my PC, which connects via USB. It requires no

  • 0

I’ve got a Remote for my PC, which connects via USB. It requires no drivers, but some multimedia keys are not supported. And i want to know is there a method to read the input data so I can handle the events myself?

Edit: I’ve found a software called USBlyzer which shows me all the information I need, and is capable of handling usb events. the problem is that it’s closed source

Edit: here is the same question: https://superuser.com/questions/179457/software-to-customise-this-usb-pc-remote-control but still no answer for me. I have this remote

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:52:21+00:00Added an answer on May 25, 2026 at 1:52 pm

    I think RawInput is what You need. Call RegisterRawInputDevices (using platform invoke) to subscribe to events. Then override WndProc of main window. And call GetRawInputData to read and parse raw data.

    Example:

    using System;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    
    namespace StackOverflow
    {
        static class Program
        {
            static void Main()
            {
                Application.Run(new Form1());
            }
        }
    
        public static class KeyboardRawInput
        {
            public struct RawKeyboard
            {
                public int Type;
                public int Size;
                public IntPtr Device;
                public IntPtr WParam;
    
                public ushort MakeCode;
                public ushort Flags;
                public ushort Reserved;
                public ushort VKey;
                public uint Message;
                public uint ExtraInformation;
    
            }
    
            public struct RawInputDevice
            {
                public ushort Page;
                public ushort Usage;
                public int Flags;
                public IntPtr HWnd;
            }
    
    
            [DllImport("user32", SetLastError = true)]
            public static extern bool RegisterRawInputDevices(
                [MarshalAs(UnmanagedType.LPArray)] RawInputDevice[] devs,
                uint count,
                int structSize);
    
            [DllImport("user32")]
            public static extern uint GetRawInputData(
                IntPtr hrawInput,
                uint command,
                ref RawKeyboard data,
                ref uint size,
                int headerSize);
        }
    
        class Form1 : Form
        {
            protected override void OnLoad(EventArgs e)
            {
                try {
                    KeyboardRawInput.RawInputDevice dev = new KeyboardRawInput.RawInputDevice();
                    dev.Page = 1;
                    dev.Usage = 6;
                    dev.Flags = 0x00000100 /*RIDEV_INPUTSINK*/;
                    dev.HWnd = this.Handle;
    
                    bool result = KeyboardRawInput.RegisterRawInputDevices(new KeyboardRawInput.RawInputDevice[] { dev }, 1, Marshal.SizeOf(typeof(KeyboardRawInput.RawInputDevice)));
                    if (!result)
                        throw new Exception(string.Format("LastError: 0x{0:x}", Marshal.GetLastWin32Error()));
    
                } catch (Exception ex) {
                    MessageBox.Show(ex.Message, "Error registering RawInput");
                }
    
                base.OnLoad(e);
            }
    
            protected override void WndProc(ref Message m)
            {
                if (m.Msg == 0xFF) {
                    KeyboardRawInput.RawKeyboard keyboard = new KeyboardRawInput.RawKeyboard();
                    uint size = (uint)Marshal.SizeOf(keyboard);
                    uint result = KeyboardRawInput.GetRawInputData(m.LParam, 0x10000003, ref keyboard, ref size, 4 + 4 + IntPtr.Size * 2);
                    if (result != uint.MaxValue) {
                        string parse = string.Format("MakeCode: 0x{0:X}\r\nMessage: 0x{1:X}\r\nVKey: 0x{2:X}", keyboard.MakeCode, keyboard.Message, keyboard.VKey);
                        MessageBox.Show(parse);
                    }
                }
    
                base.WndProc(ref m);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.