Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
2 user(s) are online (2 user(s) are browsing Forum)

Members: 1
Guests: 1

Yanosh, more...

Browsing this Thread:   1 Anonymous Users





Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Hello

A long time ago I developed MidToFront. It's a commodity that provides a use for the middle mouse button.

I recently decided to get back into AROS and discovered that it doesn't recognize either of my Trackman Marble's two middle buttons as a middle button. I decided to hack the MidToFront code in order to make it able to recognize whatever code Commodities was sending for those buttons.

Unfortunately, Commodities doesn't send any message at all for those buttons. I'm not sure if it's an issue with InputEvent or something else.

Does anyone know where I might look to try to make this work? I'm sort-of willing to try modifying Intuition/Commodities/whatever is necessary.

Posted on: 4/1 17:04
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Quote:

simplex wrote:

Unfortunately, Commodities doesn't send any message at all for those buttons. I'm not sure if it's an issue with InputEvent or something else.

Does anyone know where I might look to try to make this work? I'm sort-of willing to try modifying Intuition/Commodities/whatever is necessary.

I can maybe answer part of this.

I tested the messages sent to an IDCMP message port. This isn't the same as an input handler, but it gives some useful information.

One of the inner buttons generates no IDCMP message at all.

The other generates class rawkey, code '~'. I’m not sure why it gave me a tilde, since the printf() command had a %d, or so I thought. I’ll check it later: the computer crashed and I had some other tasks.

I will look into what an input handler tells me, but of course if anyone knows better where to look and what to tinker with I’d be grateful.

Posted on: 4/1 20:42
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
(By the way, if this is the wrong place to ask these questions, by all means let me know.)

Posted on: 4/1 20:43
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Quote:

simplex wrote:
One of the inner buttons generates no IDCMP message at all.

The other generates class rawkey, code '~'. I’m not sure why it gave me a tilde, since the printf() command had a %d, or so I thought. I’ll check it later: the computer crashed and I had some other tasks.


I solved part of the mystery: while the rawkey remains mysterious to me, the system also sends an InputEvent with class IECLASS_NEWMOUSE. That doesn’t appear anywhere in commodities right now, so I had to filter the InputEvent in the code.

Posted on: 4/2 0:46
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2004/10/30 17:13
From Ireland
Group:
Member
Posts: 2807
Offline
It's mentioned here that an input event qualifier should be set for the middle mouse button.

Is this a PS/2 or USB device? Have you tried standard mice to see if they behave the same? You may need to trace the button event from the driver (either mouse.hidd IIRC or hid.class) right through to your commodity.

Posted on: 4/2 10:13
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Quote:

ncafferkey wrote:
It's mentioned here that an input event qualifier should be set for the middle mouse button.

OK, but that’s not the commodities library. How does it relate to the current matter, which isn’t a middle button, but a separate one?

Quote:
Is this a PS/2 or USB device? Have you tried standard mice to see if they behave the same?

This particular device is USB. I have a 3-button mouse and it behaves as expected. The program works fine and is even included in the Icaros distribution.

Quote:
You may need to trace the button event from the driver (either mouse.hidd IIRC or hid.class) right through to your commodity.

I’m willing to do that, but how? I can find examples of input handlers online; is there some relatively easy way to snoop on the driver?

Posted on: 4/2 10:43
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2004/10/30 17:13
From Ireland
Group:
Member
Posts: 2807
Offline
Quote:

simplex wrote:
OK, but that’s not the commodities library. How does it relate to the current matter, which isn’t a middle button, but a separate one?


In your first post you referred to them as "two middle buttons". The issue is whether they're being reported to your commodity as such.

Anyway, as it's a USB device, you should be able to edit mouse button assignments in Trident prefs. Go to Devices -> your-device-name -> Settings -> Action -> Reports and collections -> Mouse.

Posted on: 4/2 11:15
Transfer the post to other applications Transfer


Re: Commodities and InputEvents with nonstandard buttons?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Quote:

ncafferkey wrote:
Quote:

simplex wrote:
OK, but that’s not the commodities library. How does it relate to the current matter, which isn’t a middle button, but a separate one?


In your first post you referred to them as "two middle buttons". The issue is whether they're being reported to your commodity as such.

Oh, I see. I wasn’t thinking in those terms at all, but as a workaround that’s a really good idea.

Quote:
Anyway, as it's a USB device, you should be able to edit mouse button assignments in Trident prefs. Go to Devices -> your-device-name -> Settings -> Action -> Reports and collections -> Mouse.

OK, here I see that AROS considers the two middle buttons to be “fourth” and “fifth”. It also lists a “third” button even though there is no such creature. I was able to assign the fourth button as a middle button, the fifth as a fourth, and reassign the non-existent third button to something else.

While this technically works, it only works after Trident is opened. I’ve tried “Save” and “Save as default” but AROS forgets the values immediately upon reboot.

And of course it would be nice to assign the fifth button to something in case I did have a five-button mouse (I have one at work, for example) but the fifth button doesn’t even send InputEvent’s, let alone Commodity messages.

I guess I will look into reading the input device, unless Poseidon offers a better way to read it.

Posted on: 4/3 6:22
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4439
2 magorium
magorium
4095
3 nikolaos
nikolaos
4078
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2807
7 mazze
mazze
2222
8 clusteruk
clusteruk
2112
9 damocles
damocles
1789
10 BSzili
BSzili
1516
© 2004-2018 AROS Exec