Page 36 of 128 FirstFirst ... 2634353637384686 ... LastLast
Results 351 to 360 of 1273

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

  1. #351
    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 Ansible View Post
    The btnx gui detects all four of the buttons on the trackball just fine. I think the problem is I'm trying to do something the GUI isn't designed to support.

    Just to make sure we're on the same page here - I don't want to map the mouse click to F2, I want to map F2 to the mouse click. That is, when F2 is pushed I'd like a mouse down event to be generated. That's because the trackball button makes my thumb tired; I'd rather use a keyboard key instead.

    The btnx GUI appears to only accept buttons on the mouse. There doesn't seem to be a way to input keyboard keys. I put that F2 entry in to the config manually in the hopes that maybe its a feature that is there but not supported in the GUI... the rawcode is just the keycode for F2, maybe that is the wrong value.

    If this is not possible in the current release, I might try my hand at adding key support to the btnx program - is there some reason that this might be impossible to implement? It seems like it might work ok, since btnx scans for both keyboard and mouse events now. thx!
    I misunderstood your first post. Thanks for clarifying. At the moment, what you propose is not possible. It's something that I've been thinking about adding for a while now, but haven't had the time. Adding that functionality to btnx would require big changes, at least GUI wise.

    The problem is, btnx will only scan for event handlers (keyboard or mouse) that have the same Vendor and Product IDs. Your mouse and keyboard probably have different ones. The detection process would have to be changed so multiple input devices can be detected. The button configuration window would have to be changed to support multiple input devices. The config files would have to be slightly changed to allow for multiple input devices. Finally, this would have to be incorporated into btnx itself (the easiest bit).

    All the other functionality is present in btnx for this to be possible, however.
    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!

  2. #352
    Join Date
    Jul 2007
    Beans
    8

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

    first, thanks a lot ... it works brilliant on my MX 510 ^^ ...

    but one worry is about my 2 buttons near wheel button, on MX 510 it's [+] and [-], and when I went applications->System tools->btnx and click on detect mouse & buttons, btnx hasn't recognized my 2 buttons ...
    What's wrong ?

    thx for help

  3. #353
    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 greppi View Post
    first, thanks a lot ... it works brilliant on my MX 510 ^^ ...

    but one worry is about my 2 buttons near wheel button, on MX 510 it's [+] and [-], and when I went applications->System tools->btnx and click on detect mouse & buttons, btnx hasn't recognized my 2 buttons ...
    What's wrong ?

    thx for help
    Is the progress bar not changing when you press a button during button detection? Try pressing the button at least 15 times. It could be a problem with the button sending more than one different event during a click. If this is the case, you will then get a window that asks you to bind a detected rawcode to that button. Try one and see if it works.

    If this didn't work, let me know and I'll try to give more help.
    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. #354
    Join Date
    Jul 2007
    Beans
    8

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

    Is the progress bar not changing when you press a button during button detection?
    no it's not changing ... I tried press button 20 times, but "Detection progress" was still same ...

    I fogot one thnig: buttons [+] and [-] works correctly (ubuntu recognize them) - this buttons increase or decrease mouse sensitivity - but I want to bind this buttons for other action (for expamle copy text, switch windows, and so on) and therefore I use btnx.

    note: maybe, problem is in xorg.conf ... there is important text from file:
    Code:
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"mouse"
    	Option		"CorePointer"
    	Option		"Device"		"/dev/input/mice"
    	Option		"Protocol"		"auto" #"ImPS/2"
    	Option		"ZAxisMapping"		"4 5"
    	Option		"Emulate3Buttons"	"no"
    	Option          "Buttons"	        "5"
    EndSection

  5. #355
    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 greppi View Post
    no it's not changing ... I tried press button 20 times, but "Detection progress" was still same ...

    I fogot one thnig: buttons [+] and [-] works correctly (ubuntu recognize them) - this buttons increase or decrease mouse sensitivity - but I want to bind this buttons for other action (for expamle copy text, switch windows, and so on) and therefore I use btnx.

    note: maybe, problem is in xorg.conf ... there is important text from file:
    Code:
    Section "InputDevice"
        Identifier    "Configured Mouse"
        Driver        "mouse"
        Option        "CorePointer"
        Option        "Device"        "/dev/input/mice"
        Option        "Protocol"        "auto" #"ImPS/2"
        Option        "ZAxisMapping"        "4 5"
        Option        "Emulate3Buttons"    "no"
        Option          "Buttons"            "5"
    EndSection
    It's possible that they are associated with a different event handler than the mouse itself and the other buttons. Did you press the buttons during the mouse detection process?

    You should try changing your xorg.conf InputSection "Device" to "/dev/psaux". It might help.

    If the above doesn't work, then the problem is a bit more difficult. Try hexdumping those two buttons (see the first post in this thread for instructions, it's in the section marked "How to get support for mouse X?"). If you don't see any output when pressing the buttons, then btnx will not be able to use those buttons. If you do get output for those buttons, send me the hexdumps so I can try debugging the 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!

  6. #356
    Join Date
    Oct 2006
    Location
    Boulder, CO
    Beans
    137
    Distro
    Ubuntu 7.10 Gutsy Gibbon

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

    Quote Originally Posted by daou View Post
    The problem is, btnx will only scan for event handlers (keyboard or mouse) that have the same Vendor and Product IDs. Your mouse and keyboard probably have different ones. The detection process would have to be changed so multiple input devices can be detected. The button configuration window would have to be changed to support multiple input devices. The config files would have to be slightly changed to allow for multiple input devices. Finally, this would have to be incorporated into btnx itself (the easiest bit).
    Since I'm not actually doing any mouse mapping, I decided to give btnx a try using the keyboard as the single device. I was able to use the btnx_config GUI to determine the vendor and product ids, but it won't detect key presses as mouse buttons.

    Right now my config file looks like this:

    Code:
    # This is a btnx configuration file generated by btnx-config
    
    Mouse
    vendor_id = 0x0001
    product_id = 0x0001
    EndMouse
    
    Button
    name = F2
    rawcode = 0x0000ffbf
    enabled = 1
    type = 0
    delay = 0
    keycode = BTN_LEFT
    mod1 = NONE
    mod2 = NONE
    mod3 = NONE
    EndButton
    The "Button" section I cut and pasted in myself. I wrote a wxWidgets program to capture the keyevent for F2 to determine the rawcode. I'm still not getting my left click, but maybe its close to working. Is there anything obviously wrong with this?

  7. #357
    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 Ansible View Post
    Since I'm not actually doing any mouse mapping, I decided to give btnx a try using the keyboard as the single device. I was able to use the btnx_config GUI to determine the vendor and product ids, but it won't detect key presses as mouse buttons.

    Right now my config file looks like this:

    Code:
    # This is a btnx configuration file generated by btnx-config
    
    Mouse
    vendor_id = 0x0001
    product_id = 0x0001
    EndMouse
    
    Button
    name = F2
    rawcode = 0x0000ffbf
    enabled = 1
    type = 0
    delay = 0
    keycode = BTN_LEFT
    mod1 = NONE
    mod2 = NONE
    mod3 = NONE
    EndButton
    The "Button" section I cut and pasted in myself. I wrote a wxWidgets program to capture the keyevent for F2 to determine the rawcode. I'm still not getting my left click, but maybe its close to working. Is there anything obviously wrong with this?
    If you are trying to send events with your keyboard, make sure the vendor_id and product_id are the same as your Vendor and Product ID report by "cat /proc/bus/input/devices" for your keyboard. Use the section marked "How to get support for mouse X?" in the first post of this thread to hexdump the event handler for your keyboard. Then you will find the correct rawcode. For F2, I get the following output:

    Code:
    000bd20 8804 46bc bcd9 000e 0001 003c 0000 0000
    000bd30 8804 46bc bcdb 000e 0000 0000 0000 0000
    Yours is probably same. The rawcode is the bolded part (0x01003c00). Then, make the following changes to the btnx.c source file:

    Change line 254 to (changing TYPE_MOUSE to TYPE_KBD):

    Code:
    fd_ev_btn = find_handler(O_RDONLY, device_get_vendor_id(), device_get_product_id(), TYPE_KBD);
    And comment, or delete line 261 (fd_ev_key = find_handler(O_RDONLY, device_get_vendor_id(), device_get_product_id(), TYPE_KBD); ).

    Recompile btnx, then install it. Hopefully it will work (no guarantees, I haven't tried it). Tell me if it works, if not, I'll look more into 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!

  8. #358

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

    Is the MX400 not supported? I tried installing and everything works, but it is not detected. Let me know if you would need anything to get it supported.

    Certainly not as popular as the other mice, but not nearly as uncomfortable for right-handers with large hands.

  9. #359
    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 estaticd View Post
    Is the MX400 not supported? I tried installing and everything works, but it is not detected. Let me know if you would need anything to get it supported.

    Certainly not as popular as the other mice, but not nearly as uncomfortable for right-handers with large hands.
    It's not explicitly supported. But some mice share a lot in common. A different shell on the same electronics.

    But specific mouse support is no longer necessary with btnx-0.3.x. It should work with just about any mouse. And I'm no longer updating the 0.2.x branch of btnx that needs explicit support.
    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. #360
    Join Date
    Aug 2007
    Beans
    13

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

    Hi,

    Firstly gotta say sorry I'm a ubuntu newbie... been running Linux on servers for about 5 years but never actually used X or tried it as a desktop so struggling a little.

    I've got a MX-1000 mouse and followed the instructions for the install and am not having much luck with the forward and backwards buttons working.

    Details.

    Vanilla install of Feisty with the exception that I've loaded the open source radeon drivers. Dual screen so no desktop stuff ie compiz or Beryl.

    I have copied the default mx-1000 config over from the btnx-0.3.1/data/defaults directory but when I load btnx I get.

    uinput modprobed successfully.
    Opened handler: /dev/input/event0
    Opened handler: /dev/input/event1
    Opened handler: /dev/input/event2
    Opened handler: /dev/input/event3
    Opened handler: /dev/input/event6
    Opened handler: /dev/input/event7
    Error opening button event file descriptor: No such file or directory

    So I load btnx-config and it appears the mouse has not been detected properly. Run through the Detect mouse & buttons. It wants to create new buttons... and then errors telling me that some are already defined.... Go through and define the ones that I could.. notice that some of the rawcode numbers are different to the config guide..

    Still the thumb buttons forward and backwards don't work in firefox.


    More info
    Mouse is connected to the USB

    My mouse config in the xorg.conf seems to be what's needed.
    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "auto" #"ImPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "no"
    Option "Buttons" "3"
    EndSection


    Would really appreciate any advice help etc.

    Matt
    Attached Files Attached Files

Page 36 of 128 FirstFirst ... 2634353637384686 ... 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
  •