* "Truemouse" mice - Solution to 3rd button woes
@ 1994-01-09 13:19 Barry Kitson
0 siblings, 0 replies; only message in thread
From: Barry Kitson @ 1994-01-09 13:19 UTC (permalink / raw)
As there seems to be heaps of interest in the Linux and XFree86
world, here's a solution to the Truemouse middle button question. This
seems to work for my Truemouse 300, but I don't give any guarantees that
it will or won't work for your rodent. All this does is provide a software
switch to convince the mouse to act in "PC"/"MouseSystems"-like mode.
(Hint: set your Xconfig file to use MouseSystems, and get rid of the
3-button emulation switch. )
The source code is pretty short. Under a Slackware Linux
distribution, the following can be compiled:
#include <stdio.h>
#include <asm/io.h>
#include <unistd.h>
main()
{
if( ioperm( 0x3fc, 1, 1 ) )
{
fprintf( stderr, "Can't get I/O permissions.\n");
fprintf( stderr, "Must run as root.\n");
exit(-1);
}
__asm__ __volatile__ ("mov %w0,%%edx; outb %b1, %%dx"
:
: "i" (0x3fc), "a" (0x0a)
);
}
The executable produced MUST be run after X is started. The easiest
way to do this is to call it from the .Xinitrc script in your users' home
directories. This is ugly, but is the way I do it. Please let me know
if you have an elegant solution.
The executable must also be setuid root. Just use chmod (and put
the command in eg the X386/bin directory, or whatever it's called).
I can send the binary if anyone wants it. If I hear reports about
it being useful, I'll do something about the FAQ and uploading the binary,
particularly if someone suggests a good way of shifting this thing out of
the .xinitrc file.
But this might take a while, 'cause my harddisk just took a dive
and I'll be pretty busy recovering when the replacement arrives :^( :^( :^(
I also have work to do :^)
Barry.
_____________________________________________________________________
| Barry KITSON | Telecom Research Laboratories || \_() |
| Voice: +61 3 253 6129 | Telstra //____#_\ |
| Fax: +61 3 253 6144 | P.O. Box 249 \\` __\ |
| email: b.kitson@trl.oz.au | Clayton VIC 3168, AUSTRALIA \\ ` |
|_My opinions are MY OPINIONS, difficult though that may be to grasp._|
--
Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
PLEASE remember Keywords: and a short description of the software.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-01-09 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-01-09 13:19 "Truemouse" mice - Solution to 3rd button woes Barry Kitson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox