Page 27 of 128 FirstFirst ... 1725262728293777127 ... LastLast
Results 261 to 270 of 1273

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

  1. #261
    Join Date
    Jun 2007
    Location
    S.E. England
    Beans
    36
    Distro
    Ubuntu 8.10 Intrepid Ibex

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

    I just had a look at the config file at the 2 entries for tilt left and right, and I noticed that one pair looks similar to a button code, while the other looks similar to a scrollwheel code with both having the value 0 or -1 in the fourth byte, and the same code in the third byte. It's as if you are meant to be able to use the first type if you treat them as separate functions, and the second if it is to be a +/- type of use like scrolling.

    Ray

  2. #262
    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 think I know where the problem is... at least I found one, hopefully it's the one that's crashing your btnx-config

    Try deleting the line "ip_pipe_free_bypid(pid)" in threads.c
    It's the 76th line in the file.

    Then make again and run it.
    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!

  3. #263
    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 rzj View Post
    Both left and right tilt are sending multiple events - in both cases it offered me a choice of two codes each with 6 events (the progress bar kept stepping up and back down each click then the dialog came up to choose).

    The caption says to try one and then if that doesn't work to try the other. I'm not sure how you would do that as I could not see a mechanism to delete a single button entry.
    You are right, the button deletion still needs to be implemented.

    When I tried capturing the same one again it kept telling me I had already captured a button, but it also gave me progress and then offered me several choices - one with lots of events and a couple with one or two. They may have been scroll but I think it would have discarded those as it already had them in the list. [edit - I think these were actually other buttons that I tried and got the "already mapped" type answer - I hadn't realised it was storing these in th elist for possible selection till I spotted the TRUE entries in the selection list]
    Your edited comment is correct. It stores each code that it detects, but only lets you assign one that hasn't been assigned before. This is to prevent you from getting multiple events with btnx.

    Now I've got a config file I'm not sure what to do with it - does that have to wait till you update it to integrate with btnx? Is the btnx-config-test compatible so should I just rename it without the test on the end and restart btnx?

    (I'll go back now and read the thread pages to see if there's something on that)
    This is still just a test version (and as you and I have both seen, for a good reason). btnx will not work with the config file yet (technically it will, but only for mice that btnx already supports. So this would be considered a "hack").

    Anyway I've attached my btnx-config-test in case that's any use to you. It has two entries each for left and right tilt, but I guess both would be triggered each time the control was used??

    Ray
    Yes, you would get multiple events, and this is why there's that dialog that lets you choose rawcodes, and tells you to try a different one if that one doesn't work correctly.
    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!

  4. #264
    Join Date
    Jun 2007
    Location
    S.E. England
    Beans
    36
    Distro
    Ubuntu 8.10 Intrepid Ibex

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

    Quote Originally Posted by daou View Post
    I think I know where the problem is... at least I found one, hopefully it's the one that's crashing your btnx-config

    Try deleting the line "ip_pipe_free_bypid(pid)" in threads.c
    It's the 76th line in the file.

    Then make again and run it.
    I think that's it - I cleared the config and did the whole thing again and didn't get any failures.

    Ray

  5. #265
    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 rzj View Post
    I just had a look at the config file at the 2 entries for tilt left and right, and I noticed that one pair looks similar to a button code, while the other looks similar to a scrollwheel code with both having the value 0 or -1 in the fourth byte, and the same code in the third byte. It's as if you are meant to be able to use the first type if you treat them as separate functions, and the second if it is to be a +/- type of use like scrolling.

    Ray
    It gets a bit technical, and my understanding is limited to what I've learned by looking at the kernel source code for the input interface. But yes, rawcodes that start with 0x02 are relative events (scroll wheels) and ones that start with 0x01 are key events. This is important information for btnx, because both need to be handled differently. Relative events do not report a button down and button up signal. They just say that a relative motion happened. So, if you want to bind a relative event to a key combination, there's a problem. Key's are by nature in an on or off state. So btnx emulates the necessary up and down signals for relative events.
    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. #266
    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 rzj View Post
    I think that's it - I cleared the config and did the whole thing again and didn't get any failures.

    Ray
    The good news is that the problem is isolated. Bad news is, I still have to fix the actual problem . By taking that line away, a memory leak is introduced into btnx-config. The size and meaning of the leak is so small that it doesn't matter to the end user, but to a programmer, it means the program is unreleasable.

    The problem is a bit complicated. It's possible for the parent process to be reading a pipe, data from the child, when the child exits. The parent process is interrupted, and the pipe is closed and freed. When the parent continues reading it, and gets slapped with a segmentation fault.

    But thanks for being patient and helping find the bug.
    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. #267
    Join Date
    Jun 2007
    Location
    S.E. England
    Beans
    36
    Distro
    Ubuntu 8.10 Intrepid Ibex

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

    Quote Originally Posted by daou View Post
    It's possible for the parent process to be reading a pipe, data from the child, when the child exits.
    I'm obviously not aware of all the facts here, so this may make no sense, but could you not ensure that the child sends a particular packet of data through the pipe that warns the parent that it is about to exit? Or alternatively the child doesn't kill itself but sends a "kill-me" message to the parent?

    But thanks for being patient and helping find the bug.
    No problem

  8. #268
    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 rzj View Post
    I'm obviously not aware of all the facts here, so this may make no sense, but could you not ensure that the child sends a particular packet of data through the pipe that warns the parent that it is about to exit? Or alternatively the child doesn't kill itself but sends a "kill-me" message to the parent?
    Actually, it almost does this already. The parent sends a message to the child: please kill yourself. The child only exits unexpectedly on an error... but that's a good question. Why is the parent trying to read the pipe if it's already sent a please exit message...
    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. #269
    Join Date
    Jun 2007
    Location
    S.E. England
    Beans
    36
    Distro
    Ubuntu 8.10 Intrepid Ibex

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

    Quote Originally Posted by daou View Post
    Actually, it almost does this already. The parent sends a message to the child: please kill yourself. The child only exits unexpectedly on an error... but that's a good question. Why is the parent trying to read the pipe if it's already sent a please exit message...
    Sounds like something asynchronous where it crashes only if both processes happen to be doing something at the same time. Remember that you understand how it is supposed to work, but your users (me?) may do something slightly differently through not understanding fully that will show up a vulnerability.

    Could the child be in the process of sending another data packet at the same time as the parent decides to kill it - I'm thinking particularly of my mouse where it sends two messages for one click, although it definitely crashed before on right button which is a single click.

    Anyway I'll shut up with the wild speculation - if you want to build a version with some more instrumentation I'm happy to run it for you since you can't reproduce the fault.

    Ray

    Edit - but I'm off to bed now so it won't be till tomorrow evening.

  10. #270
    Join Date
    Apr 2006
    Location
    Italy - Venice
    Beans
    76

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

    I'd like translate it to italian. How can I do?

Page 27 of 128 FirstFirst ... 1725262728293777127 ... 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
  •