Page 3 of 128 FirstFirst 123451353103 ... LastLast
Results 21 to 30 of 1273

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

  1. #21
    Join Date
    Jan 2007
    Beans
    85

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

    On another note, maybe future releases could include support for multiple button presses, like L+R buttons = Middle button.

    I can't currently program, but I think I could lay out some usable logic for that. If you're interested, I'll give it a shot.


    BTW, I love what you've accomplished so far!

  2. #22
    Join Date
    May 2007
    Location
    Maryland
    Beans
    539
    Distro
    Ubuntu 9.04 Jaunty Jackalope

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

    Hmm it's stuck in read-only mode so I can't edit the config. How do I get it out of read only mode..it says root owns it. (sorry I'm still new to Linux..so there's probably some command to temporary take over the file that I don't know)
    "I thought what I'd do was I'd pretend I was one of those deaf-mutes"
    Desktop: Ubuntu 9.10, Windows XP
    Laptop: Ubuntu 9.10, Windows Vista (soon to be replaced by Windows 7)
    n800: Diablo/Maemo 4 (one day Mer..)

  3. #23
    Join Date
    May 2007
    Location
    Oceanside, NY
    Beans
    2
    Distro
    Ubuntu 7.04 Feisty Fawn

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

    i'm running 7.04
    and when i ran ls /dev/input, i got
    by-id event0 event3 event5 event9 mouse0 ts0 uinput
    by-path event1 event4 event6 mice mouse1 ts1

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

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

    If I move the mouse side to side with my fingers no where near the scroll wheel (holding the back of the mouse at pad-level), firefox jumps a page forward.
    It doesn't happen all the time, but enough to start bugging the crap out of me .
    Ok, sounds like your MX Revo is borderline broken. I can shake my mouse pretty hard and the wheel won't go side to side by itself. You should probably try to get a replacement.

    but my buttons are behaving as if the button event type is 0, instead of 1. (Pressing the thumb-wheel in either direction goes forward or backward respectively, but releasing the thumb-wheel does the same action again, for a net effect of going forward or backward twice.)
    It's the other way around. The event type is supposed to be 0 for the the thumb wheel events. When a button is type=1, it sends both the pressed and released events simultaneously. So when you press the thumb wheel and type=1, it sends a press and release signal. When you release the thumb wheel, it sends the press and release signals again. So you get two events.

    More replies later...
    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!

  5. #25
    Join Date
    Jan 2007
    Beans
    85

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

    Thanks! That did the trick.

    Maybe instead of this:

    Code:
    #	type: the type of event the button sends. If type is 0,
    #	pressing the button sends a button down signal and
    #	releasing it sends a release signal. If type = 1, clicking
    #	the button send both press and release signals simultaneously.
    #	This usually necessary for mouse wheel events.
    You could say this:

    Code:
    #	type: the type of event the button sends.
    #	(Preset for your specific mouse buttons.)
    #	If pressing the button sends a button press signal and
    #	releasing it sends a release signal, the type is 0.
    #	If pressing the button sends both press and release signals
    #	simultaneously, the type is 1.
    #	-This is usually necessary for mouse wheel events.
    Since the type is dependent on the button events, and not the other way around.
    Last edited by blazoner; May 31st, 2007 at 09:36 AM. Reason: Consistency with word choice.

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

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

    Hmm it's stuck in read-only mode so I can't edit the config. How do I get it out of read only mode..it says root owns it. (sorry I'm still new to Linux..so there's probably some command to temporary take over the file that I don't know)
    run

    Code:
    sudo gedit /etc/btnx/btnx_config
    The sudo is needed so you get root (or superuser) privileges, because the btnx_config file is write protected and owned by root. This is because btnx can only be run by root.

    On another note, maybe future releases could include support for multiple button presses, like L+R buttons = Middle button.

    I can't currently program, but I think I could lay out some usable logic for that. If you're interested, I'll give it a shot.


    BTW, I love what you've accomplished so far!
    Thanks, I'm glad you like it. What you propose is doable. It would require a significant amount of change and complexity to the event parsing and handling. Not impossible, but time consuming. I'll keep it in mind and once I have the time, I might implement something like it.

    You could say this:
    ...
    Since the type is dependent on the button events, and not the other way around.
    Good point. I'll change it. Thanks for the improvement ideas.

    i'm running 7.04
    and when i ran ls /dev/input, i got Quote:
    by-id event0 event3 event5 event9 mouse0 ts0 uinput
    by-path event1 event4 event6 mice mouse1 ts1
    Strange. You have the event files in the correct location but for some reason btnx cannot find it. What mouse are you using?

    Please send me the output of your /proc/bus/input/devices file. It will help me diagnose the problem. You can use this command to view that file in gedit:

    Code:
    cat /proc/bus/input/devices > /tmp/devices_output; gedit /tmp/devices_output
    my mouse gives event1, but when I attempt to use
    Code:
    $ sudo cat /dev/input/event1 | hexdump
    in terminal, I get no response at all from my system.

    I'm new to Linux. Is there some extra component I need to be able to perform a hexdump? If not, what's my next step?
    I've noticed that this might be a problem with some mice (ones using PS/2 connector). But I would suspect the MX600 uses USB. You should have hexdump installed by default so this shouldnt be the problem. You can test it by giving the command:

    Code:
    $ echo "hello" | hexdump
    If you get output like "0000000 6568 6c6c 0a6f" then hexdump should be working fine. The only other thing I can think of is that its not sending events to that event handler. Try doing that part where you list each event handler in /dev/input with the command:

    Code:
    ls /dev/input
    And do the
    Code:
    sudo cat /dev/input/event | hexdump
    command for each event file in that directory (event0, event1, etc.). Move your mouse and press its buttons everytime you do the hexdump. Then check your /proc/bus/input/devices for the section that matches that event. Hopefully one of the event files is outputting your mouse events, otherwise there is a bigger problem.
    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. #27
    Join Date
    Nov 2006
    Beans
    29
    Distro
    Ubuntu 8.04 Hardy Heron

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

    Minor issue:

    Btnx worked out of the box, which was a great relief after being use to useing the old complicated way - so thank you very much

    Well there is one thing that I can't seem to figure out. I'm use to useing the windows key (Super key), as my beryl shortcut. And since my I uses my mouse to the same shorthcut i would be nice to assign a button to let say windowskey+ left... But where is the key, can't seem to find it in the event file... but it probably simply have another name. Have tried to finde it via. xev, but it returns another key number.

    Hope somebody are able to help me out with a solution... seems like a simple problem, but I have allready used 2-3 hours on it!

    Best regards
    Tobias

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

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

    Btnx worked out of the box, which was a great relief after being use to useing the old complicated way - so thank you very much

    Well there is one thing that I can't seem to figure out. I'm use to useing the windows key (Super key), as my beryl shortcut. And since my I uses my mouse to the same shorthcut i would be nice to assign a button to let say windowskey+ left... But where is the key, can't seem to find it in the event file... but it probably simply have another name. Have tried to finde it via. xev, but it returns another key number.

    Hope somebody are able to help me out with a solution... seems like a simple problem, but I have allready used 2-3 hours on it!
    No problem. I'm glad I didn't spend the time coding this application for general use for nothing. Actually, about 90% of the program is just so other people can use it and configure it without editing source code .

    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.
    Last edited by daou; May 31st, 2007 at 03:37 PM.
    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. #29
    Join Date
    May 2007
    Location
    Maryland
    Beans
    539
    Distro
    Ubuntu 9.04 Jaunty Jackalope

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

    The string doesn't seem to work for me.. after I type it in it asks me for my password which I type in. After a while it brings me back to the $ for its next command. It doesn't load gedit or do anything else. And if I type in gedit /etc/btnx/btnx_config after that it's still read only.
    "I thought what I'd do was I'd pretend I was one of those deaf-mutes"
    Desktop: Ubuntu 9.10, Windows XP
    Laptop: Ubuntu 9.10, Windows Vista (soon to be replaced by Windows 7)
    n800: Diablo/Maemo 4 (one day Mer..)

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

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

    The string doesn't seem to work for me.. after I type it in it asks me for my password which I type in. After a while it brings me back to the $ for its next command. It doesn't load gedit or do anything else. And if I type in gedit /etc/btnx/btnx_config after that it's still read only.
    Are you sure you have root privileges on the computer? It's your computer, right?

    If you are having trouble with gedit try it with nano

    Code:
    sudo nano /etc/btnx/btnx_config
    Ctrl-O saves the file, Ctrl-X quits
    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 3 of 128 FirstFirst 123451353103 ... 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
  •