Page 10 of 128 FirstFirst ... 891011122060110 ... LastLast
Results 91 to 100 of 1273

Thread: btnx: Send keyboard and mouse combination events with mouse buttons

  1. #91
    Join Date
    Jun 2007
    Beans
    85
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    This project seems to be exactly what I've been looking for.

    I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results. Mouse functions normally, but has no hexdump output.

    Not quite sure, where the problem is...

    cat /proc/bus/input/devices output is here

    Code:
    I: Bus=0003 Vendor=046d Product=c50e Version=0111
    N: Name="Logitech USB Receiver"
    P: Phys=usb-0000:00:02.0-1/input0
    S: Sysfs=/class/input/input2
    H: Handlers=mouse1 ts1 event2 
    B: EV=20007
    B: KEY=ffff0000 0 0 0 0 0 0 0 0
    B: REL=143
    B: LED=ff00
    and related part of Xorg.conf is here

    Code:
    Section "InputDevice"
        Identifier     "Logitech MX1000"
        Driver         "evdev"
        Option         "Name" "Logitech USB Receiver"
        Option         "Device" "/dev/input/event2"
        Option         "Resolution" "800"
        Option         "Emulate3Buttons" "no"
        Option         "ButtonNumber” “12"
        Option         "Buttons” “12"
        Option         "ButtonMapping” “1 2 3 8 9 10 11 12"
        Option         "ZAxisMapping” “4 5"
        Option         "XAxisMapping” “6 7"
    EndSection
    Last edited by tim71; June 3rd, 2007 at 03:07 AM.

  2. #92
    Join Date
    Aug 2006
    Location
    BEHIND YOU!
    Beans
    435
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Haha I'm a retard I didn't have the mouse synced with the receiver.
    There are 10 types of people in the world: those who understand binary, and those who don't.

  3. #93
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by tim71 View Post
    This project seems to be exactly what I've been looking for.

    I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results.

    Not quite sure, where the problem is...

    cat /proc/bus/input/devices output is here

    Code:
    I: Bus=0003 Vendor=046d Product=c50e Version=0111
    N: Name="Logitech USB Receiver"
    P: Phys=usb-0000:00:02.0-1/input0
    S: Sysfs=/class/input/input2
    H: Handlers=mouse1 ts1 event2 
    B: EV=20007
    B: KEY=ffff0000 0 0 0 0 0 0 0 0
    B: REL=143
    B: LED=ff00
    and related part of Xorg.conf is here

    Code:
    Section "InputDevice"
        Identifier     "Logitech MX1000"
        Driver         "evdev"
        Option         "Name" "Logitech USB Receiver"
        Option         "Device" "/dev/input/event2"
        Option         "Resolution" "800"
        Option         "Emulate3Buttons" "no"
        Option         "ButtonNumber” “12"
        Option         "Buttons” “12"
        Option         "ButtonMapping” “1 2 3 8 9 10 11 12"
        Option         "ZAxisMapping” “4 5"
        Option         "XAxisMapping” “6 7"
    EndSection
    I had a similar problem trying to get a hexdump off of an MX 600. I finally booted off of a 7.04 live CD, went through the process, and it worked immediately.

  4. #94
    Join Date
    Jan 2007
    Beans
    85

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by daou View Post
    If you are referring to the Super (Start) and Menu keys, they are KEY_LEFTMETA and KEY_RIGHTMETA and should be functional. If not, could you please elaborate.
    From post #28:
    The key you are looking for, the Start (or Super, or Windows, etc) is KEY_LEFTMETA

    For some reason, the Gnome keyboard shortcuts tool doesn't recognize it as a modifier key (meaning you can only use it by itself, not as a combination with another key). But in Beryl it should work.


    Yes, I definitely think there should be an automatic backup mechanism for the script. It could just as well be simple "rename if exists" command. Then the user would just have to copy it over the default one after upgrading. Will be added in the next release.
    The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.

  5. #95
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Think I have success now. Issue seems to have been with my xorg.conf. I did get the "3C" and "3D" with a wheel left and wheel right in a shell console. Now to be about exploring. Thanks much for your help.
    I don't know what your xorg.conf looks like now, but looking at the old one, I think you should try to do the following (making a backup first):
    • Merge your InputSections into one input section.
    • Remove evdev as the driver, use something more generic like "mouse"
    • Remove references to the product and vendor IDs
    • Use protocol "auto"
    • Use device "/dev/mouse" (assuming this is where that device is located in Mandriva).
    • Remove the HWheelRelative option, adding it later if necessary.
    I hope it works out.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  6. #96
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    I can't seem to get btnx to recognize my mouse properly. I have a Logitech Revolution MX mouse and a Logitech G15 keyboard.
    What's strage is that event3 is listed as a handler for the mouse but it doesn't exist. Touching event3 won't help because it won't get registered with the kernel's input interface.
    The cat command you gave wouldn't have worked without a "sudo" or without running as root. But it should have given a "permission denied" error.
    What version of Ubuntu are you running?

    Try modprobing evdev.
    Code:
    sudo modprobe evdev
    If you have rebooted your computer since you last looked at /proc/bus/input/devices, then find the event name again. Then search for that event name:

    Code:
    sudo find /dev -name *event3*
    Replacing event3 with whatever it is at the moment.

    A model troubleshooting post, by the way. I think I'll make a link to your post to show what information should be provided.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  7. #97
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    I am using an "obsolete" (discontinued) MX1000 mouse and MX 518. However for some weird reason I did not succeed to get the hexdump from any other input devices than keyboard - only 'event1' gave the response when the keys on the keyboard are pressed - all other event handlers gave no results.
    Try what blazoner suggested (LiveCD hexdumps).

    It looks like you've used some other methods to get your mice working before. You need to remove some of those changes. Backup your xorg.conf file and look to this post as a model for the InputSection. Remove anything extra.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  8. #98
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Haha I'm a retard I didn't have the mouse synced with the receiver.
    We've all been there. Like cursing at network problems while holding one end of the ethernet cable in one hand.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  9. #99
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    Quote Originally Posted by blazoner View Post
    From post #28:


    The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.

    I'm not sure if there is anything else I can do at btnx's end to make the Meta keys more functional. btnx supports sending that key as a modifier, but there is no one at the receiving end to catch them. Unless someone is using Beryl, or Kubuntu. Correct me if I'm wrong, its a while since I used Kubuntu, but it allows keyboard shortcuts with meta keys as modifiers.

    And it probably isn't a problem. If a program does handle the meta keys well, then btnx already does its job. If it doesn't, ie Gnome keyboard shortcuts, then just about any other keyboard combo can be used. In fact, its better that the mouse reserves some obscure and difficult combo, one that you would have a hard time pressing with the keyboard.

    The problem I see with this approach is that if someone is trying different mouses, the third time they try the same mouse, it would overwrite the backup with a second backup.
    Yes, you are right. A loop could be applied that attempts to use btnx_config_bak0-32767 as the name for the backup. If a name exists, it tries the next number. That means you can have 2^15 different backup files. Should be enough, no ?
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  10. #100
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: btnx: Send keyboard and mouse combination events with mouse buttons

    blazoner,

    A note on the MX 600, I am getting a response on pressing the 100% button as if it is only sending a BTN_LEFT event instead of BTN_LEFT + KEY_LEFTALT. Everything else is working great.
    I almost forgot about this. Apparently it handles the event just fine. But there seems to be a problem with registering the modifier key well before the button event. This was a problem during development and I implemented a slight delay to allow the modifier keys to register before other keys and buttons. Perhaps you need to increase the delay a little more.

    This involves a small change in source code. Don't worry, I'll walk you through it.

    Go into the directory where you extracted btnx. Open the file uinput.c
    In that file, find this section:

    Code:
    write(uinput_kbd_fd, &event, sizeof(event));
              
              usleep(10);    // Needs a little delay for mouse + modifier combo
        }
        
        if (bev->keycode > BTNX_EXTRA_EVENTS)
    Note the call "usleep(10)". You can increase the number 10 to a 100 or even more. When you change that value, do a make and sudo ./btnx
    If it works, run sudo make install, but remember to backup the conf file.

    Tell me what delay works for you. I'll increase that delay in the next update.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

Page 10 of 128 FirstFirst ... 891011122060110 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •