|
thank you tredegar,
Here is what I am trying to do. I'll put it in simpler terms as well as the exact senario I am working to acheive.
I plugged my USB keyboard into the Ubuntu system, and when I type the follow command (dmesg | tail) I get the following:
root@ubuntu:~# dmesg | tail
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
eth0: link up, 10 Mb/s, half duplex, flow control disabled
NET: Registered protocol family 10
eth0: no IPv6 routers present
usb 1-1: USB disconnect, address 2
usb 1-1: new low speed USB device using orion-ehci and address 3
usb 1-1: configuration #1 chosen from 1 choice
input: DELL DELL USB Keyboard as /devices/platform/orion-ehci.0/usb1/1-1/1-1:1.0/input/input0
generic-usb 0003:413C:2005.0001: input: USB HID v1.10 Keyboard [DELL DELL USB Keyboard] on usb-orion
-ehci.0-1/input0
root@ubuntu:~#
I would like to write some C program or script that will listen to this input specifically (input0).
I know that in C, I can write a simple scanf() statement, but I would like to be able to specify the input instead (input0) - no dependency on standard IO in C.
Is this doable?
I hope this makes my question clearer.
|