* Re: [9fans] rio /dev/mouse
@ 2002-03-07 8:57 Fco.J.Ballesteros
0 siblings, 0 replies; 9+ messages in thread
From: Fco.J.Ballesteros @ 2002-03-07 8:57 UTC (permalink / raw)
To: 9fans
: I changed the line
: m.buttons &= 7;
: to
: m.buttons &= 127;
Don't have that line, perhaps I just changed it and then forgot I changed it.
: And of course, I have changed rio/rio.c so that rio is now
: interpreting rolling wheel as either Kup or Kdown pressed.
Can you send the code?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
@ 2002-03-08 0:08 YAMANASHI Takeshi
0 siblings, 0 replies; 9+ messages in thread
From: YAMANASHI Takeshi @ 2002-03-08 0:08 UTC (permalink / raw)
To: 9fans
> : And of course, I have changed rio/rio.c so that rio is now
> : interpreting rolling wheel as either Kup or Kdown pressed.
>
> Can you send the code?
Sure. I only added the following lines headed with `>' to rio.c.
I don't know this works in general, however.
in mousethread() in rio.c:
for(;;)
switch(alt(alts)){
case MReshape:
resized();
break;
case MMouse:
> if (mouse->buttons == 8) {
> static Rune up[2] = {Kup, L'\0'};
>
> if (input != nil)
> sendp(input->ck, up);
> continue;
> }
> else if (mouse->buttons == 16) {
> Rune down[2] = {Kdown, L'\0'};
>
> if (input != nil)
> sendp(input->ck, down);
> continue;
> }
Again:
--
YAMANASHI akeshi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
2002-03-07 1:21 Russ Cox
@ 2002-03-07 11:58 ` Boyd Roberts
0 siblings, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2002-03-07 11:58 UTC (permalink / raw)
To: 9fans
> I changed the line
> m.buttons &= 7;
> to
> m.buttons &= 127;
s/127/0x7F/
it's far more obvious.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
@ 2002-03-07 1:21 Russ Cox
2002-03-07 11:58 ` Boyd Roberts
0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2002-03-07 1:21 UTC (permalink / raw)
To: 9fans
> High bits of "m.buttons" is cleared in libdraw/mouse.c.
> I changed the line
> m.buttons &= 7;
> to
> m.buttons &= 127;
Have you applied the 10140327 full update from
the Oct 14 2000 release to the March 27 2001 release?
We dropped that line completely between the two.
What does wrap/info plan9 print?
Russ
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
@ 2002-03-07 1:15 YAMANASHI Takeshi
0 siblings, 0 replies; 9+ messages in thread
From: YAMANASHI Takeshi @ 2002-03-07 1:15 UTC (permalink / raw)
To: 9fans
> Have you applied the 10140327 full update from
> the Oct 14 2000 release to the March 27 2001 release?
> We dropped that line completely between the two.
I am ashamed to say the truth, but no, I haven't any yet.
I was not sure in what order I should apply updates.
> What does wrap/info plan9 print?
plan9 (full package as of Wed Jan 31 19:22:50 JST 2001)
pkgupd 980936570 updating 971556349: Plan 9 - wiki software
pkg 971556349: Plan 9 from Bell Labs ? Third Edition
--
Sincerely,
YAMANASHI Takeshi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
@ 2002-03-07 0:48 YAMANASHI Takeshi
0 siblings, 0 replies; 9+ messages in thread
From: YAMANASHI Takeshi @ 2002-03-07 0:48 UTC (permalink / raw)
To: 9fans
Thank you for your enlightenment, rob.
> Long ago, various pieces of the system cleared out the top bits but it
> looks to me like all that code is gone.
High bits of "m.buttons" is cleared in libdraw/mouse.c.
I changed the line
m.buttons &= 7;
to
m.buttons &= 127;
And of course, I have changed rio/rio.c so that rio is now
interpreting rolling wheel as either Kup or Kdown pressed.
--
Sincerely,
YAMANASHI Takeshi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
@ 2002-02-25 18:20 rob pike
0 siblings, 0 replies; 9+ messages in thread
From: rob pike @ 2002-02-25 18:20 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
Long ago, various pieces of the system cleared out the top bits but it
looks to me like all that code is gone. A little debugging should
tell you where the problem is. Put a print into
/sys/src/cmd/rio/rio.c, in the routine mousethread(), right after case
MMouse. Print out the state of mouse.buttons. If the button is
cleared there, it's the library (/sys/src/libdraw/mouse.c); if it's
still set here, then rio is doing it somewhere. I don't have an
intellimouse handy but this should be easy for you to track down.
-rob
[-- Attachment #2: message.txt --]
[-- Type: message/rfc822, Size: 2084 bytes --]
From: YAMANASHI Takeshi <uncover@beat.cc.titech.ac.jp>
To: 9fans@cse.psu.edu
Subject: [9fans] rio /dev/mouse
Date: Fri, 22 Feb 2002 14:35:22 0900
Message-ID: <200202220550.g1M5oJk246675@mail-o.cc.titech.ac.jp>
I'm using Microsoft Intelli wheel mouse now.
Without rio, I rolled up and down the wheel while doing
`cat /dev/mouse', and its button state of the output was
`8' or `16'.
But under rio, `cat /dev/mouse' produced with the button
state `0' only.
Could you tell me what is happening and why?
I want to change rio to interpret this 8 or 16 button state
as either arrow-up or arrow-down keyboard event.
--
Sincerely,
YAMANASHI Takeshi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] rio /dev/mouse
2002-02-22 5:35 YAMANASHI Takeshi
@ 2002-02-25 11:48 ` Boyd Roberts
0 siblings, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2002-02-25 11:48 UTC (permalink / raw)
To: 9fans
YAMANASHI Takeshi wrote:
>
> I'm using Microsoft Intelli wheel mouse now.
I have a Logitech Wingman Gaming Mouse on a serial interface.
aux/mouse does not like it. It's bound to be some stupid
dance that has to be done to get the mouse to behave. If
I had an RS-232 protocol analyser I'd fix it. Hacking
aux/mouse looks like no fun, because it has to deal
with all that 'orrible RS-232 glop.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [9fans] rio /dev/mouse
@ 2002-02-22 5:35 YAMANASHI Takeshi
2002-02-25 11:48 ` Boyd Roberts
0 siblings, 1 reply; 9+ messages in thread
From: YAMANASHI Takeshi @ 2002-02-22 5:35 UTC (permalink / raw)
To: 9fans
I'm using Microsoft Intelli wheel mouse now.
Without rio, I rolled up and down the wheel while doing
`cat /dev/mouse', and its button state of the output was
`8' or `16'.
But under rio, `cat /dev/mouse' produced with the button
state `0' only.
Could you tell me what is happening and why?
I want to change rio to interpret this 8 or 16 button state
as either arrow-up or arrow-down keyboard event.
--
Sincerely,
YAMANASHI Takeshi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-03-08 0:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-07 8:57 [9fans] rio /dev/mouse Fco.J.Ballesteros
-- strict thread matches above, loose matches on Subject: below --
2002-03-08 0:08 YAMANASHI Takeshi
2002-03-07 1:21 Russ Cox
2002-03-07 11:58 ` Boyd Roberts
2002-03-07 1:15 YAMANASHI Takeshi
2002-03-07 0:48 YAMANASHI Takeshi
2002-02-25 18:20 rob pike
2002-02-22 5:35 YAMANASHI Takeshi
2002-02-25 11:48 ` Boyd Roberts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).