how to access the keyboard ps/2 port directly?

S

skam

hi
i need to send an HEX String to th ps/2 keyboard port.
i have a special keyboard and i need to control his tone indicator
building an .EXE file.
using c or c++ in linux os how can i do?

many thanks
Gia
 
J

Johannes Bauer

skam said:
using c or c++ in linux os how can i do?

This is nothing the C or C++ language provies.

If you want a solution using Linux you can try to get the ioperm() for
the keyboard controller register and send stuff directly - don't know
how that will interfere with the kernel keyboard handling routines, however.

Greetings,
Johannes
 
A

anon

skam said:
hi
i need to send an HEX String to th ps/2 keyboard port.

There are no such things as ps/2 keyboards in c or c++
i have a special keyboard and i need to control his tone indicator
building an .EXE file.

What is an .EXE file in linux???
using c or c++ in linux os how can i do?

HINTS:
1) post to correct news group
2) use the device driver for your special keyboard, or write your own
device driver and use it
 
S

skam

hi
thanks for your reply
There are no such things as ps/2 keyboards in c or c++
i have a keyboard connected to the ps/2 port and i want to send it
some stuff.
What is an .EXE file in linux???
ops, i mean somenthing like an .EXE but for linux. it hanst any
extension but is executable.
HINTS:
1) post to correct news group
inst this the right one? maybe comp.lang.c is better?
2) use the device driver for your special keyboard, or write your own
device driver and use it
the keboard doesnt have a driver.

thanks Johannes Bauer , now i look for that ioperm().

regards
Gia
 
P

Phil Endecott

skam said:
hi
i need to send an HEX String to th ps/2 keyboard port.
i have a special keyboard and i need to control his tone indicator
building an .EXE file.
using c or c++ in linux os how can i do?

Look at the Documentation/input directory in your Linux kernel source
tree. I think that you need to write to /dev/input/something.

There is a linux-input mailing list,
(e-mail address removed), which would be the best place to
ask about this.


Phil.
 
A

anon

skam said:
hi
thanks for your reply

i have a keyboard connected to the ps/2 port and i want to send it
some stuff.

....

inst this the right one? maybe comp.lang.c is better?

As Erik suggested something with Linux
the keboard doesnt have a driver.

Write one. It needs to access something in
/sys/bus/...
or
/sys/devices/...
I never did it, so have no idea
thanks Johannes Bauer , now i look for that ioperm().

Who is Johannes Bauer??

BTW this is from ioperm() man pages:
1) The use of ioperm() requires root privileges.
2) This call is mostly for the i386 architecture. On many other
architectures it does not exist or will always return an error.
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,823
Latest member
Nadia88

Latest Threads

Top