Keyboard and mouse librarys

N

Nolan Martin

Is it just me or are there no good librarys out there to access the keyboard
or mouse?
I have been looking around for a while now and can only find ones that are
bundled with a bunch of other stuff that I dont need (SDL, GLUT). I just
need a simple platform independant way to access the keyboard and mouse.

Anyone know of any good ones?
 
C

Christopher Benson-Manica

Nolan Martin said:
Is it just me or are there no good librarys out there to access the keyboard
or mouse?
I have been looking around for a while now and can only find ones that are
bundled with a bunch of other stuff that I dont need (SDL, GLUT). I just
need a simple platform independant way to access the keyboard and mouse.
Anyone know of any good ones?

Your post is off-topic for comp.lang.c++. Please visit

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

for posting guidelines and frequently asked questions. Thank you.
 
J

JKop

Keyboards and mouses(mice, whatever) are in the same
category as GPS systems, infa-red radar - there's no
definite way to work with them, they're worked with
differently for every platform. For MSWindows, there's the
Win32API.


-JKop
 
T

Thomas Matthews

Nolan said:
Great, let me rephrase the question...

Is there a C++ standard library that provides an interface to access the
keyboard and mouse?

Let me clarify what others have said.
There is no _standard_ library for interfacing to a keyboard and
mouse because these topics are not part of the _standard_ language.

There are _platform_specific_ libraries out there for accessing mice
and keyboards. Some manufacturers may even have sample code for
accessing their keyboards and mice.

By the way, there doesn't seem to be a standard keyboard nor a
standard mouse. Also, the _standard_ C++ languages does not require
a platform to have a mouse. Vending machines and microwave ovens
don't {intentionally} have mice, but they can execute C++ programs.
I have yet to see a "standard" mouse or keyboard. Would be nice
though, so I don't have to keep adjusting my typing for every
workstation that I use. If you don't believe there isn't a standard,
just go look at an APL keyboard and a Windows one. Heck, compare
keyboards between MS-Windows platforms. I have two computers from
the same vendor that have different mice and keyboards!

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
H

Howard

JKop said:
Keyboards and mouses(mice, whatever) are in the same
category as GPS systems, infa-red radar - there's no
definite way to work with them, they're worked with
differently for every platform. For MSWindows, there's the
Win32API.

....which talks to the specific mouse or keyboard driver, which communicates
with the computer's ports, which funnels the communications between the CPU
and the mouse or keyboard. :)
 
J

JKop

Howard posted:
...which talks to the specific mouse or keyboard driver, which
communicates with the computer's ports, which funnels the
communications between the CPU and the mouse or keyboard. :)

I learned all about Windows Device Drivers so I could
directly "communicate" with the Power device driver to get
the computer to turn off instantly!

....unfortunately I was never successful.


-JKop
 
E

E. Robert Tisdale

Nolan said:
Great, let me rephrase the question...

Is there a C++ standard library
that provides an interface to access the keyboard and mouse?

No.
The C++ standard does not presume
that there even is a keyboard or mouse. Keyboard and mouse events
are handled differently on different platforms --
machine architecture + operating system + C++ compiler.
If you can tell us your target platform(s),
we may be able to redirect you to a more appropriate forum.

Please ignore Christopher Benson-Manica --
he's one of our resident trolls.
If you continue your subscription to the comp.lang.c++ newsgroup,
you will learn to recognize and ignore them.
 
N

Nolan Martin

E. Robert Tisdale said:
No.
The C++ standard does not presume
that there even is a keyboard or mouse. Keyboard and mouse events
are handled differently on different platforms --
machine architecture + operating system + C++ compiler.
If you can tell us your target platform(s),
we may be able to redirect you to a more appropriate forum.

Please ignore Christopher Benson-Manica --
he's one of our resident trolls.
If you continue your subscription to the comp.lang.c++ newsgroup,
you will learn to recognize and ignore them.

Heh, thank you for your more...understanding reply to my message.
I was actually expecting the sort of answers I see here and was just
eliminating the possibility of a standard library for the keybaord and
mouse.

Although there is more or less a standard for keyboards and mice, that is
why you see some BIOS's supporting mice, and all BIOS's support keyboards.
Its not like the BIOS manufacturor sat down and wrote a different driver for
every keyboard that is or ever will be.

Thanks for your replys anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top