![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SCO 6.0-Keys in keyboard function differently | chssastry | SCO | 4 | 08-31-2009 08:46 PM |
| Some or all keys on the keyboard don't work | iBot | OS X Support RSS | 0 | 04-25-2009 10:45 PM |
| How to read arrow keys on really old bash? | simonb | Shell Programming and Scripting | 1 | 05-01-2006 10:27 AM |
| arrow keys / special keys | raguramtgr | UNIX for Dummies Questions & Answers | 3 | 02-20-2004 02:45 AM |
| How can I map Unix keyboard for PC keyboard | simhab | UNIX for Advanced & Expert Users | 1 | 03-06-2002 11:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to read keys from USB keyboard on AT91SAM9260
Hi Everyone,
I am using 2.6.26.3-olimex kernel(Embedded system) running on AT91SAM9260. I am using a Logitech USB keyboard. It is detected as "/dev/input/event0". I don't know how to detect key press events and read the keys? Why can't I read the keys using scanf() like funtions? Can anyone help me? Regards, Siva |
|
||||
|
Thanks for your response.
I have enabled the following options in the menuconfig file while building uImage. Input Device Support --> Event Interface Keyboards --> AT Keyboard HID Devices --> USB Human Interface Device support HID Devices --> PID device support Special HID Drivers --> Logitech and Logitech force feedback After booting the kernel, USB key board detected as "/dev/input/event0". I don't know why I can't use this as stdin? Am I missing some thing here? |
|
||||
|
I'm reaching the limits of my knowledge here, I'm not sure how Linux decides what keyboard device to use with what physical terminal device. I do know that the keyboard does not literally become stdin -- that'd be an easy fix if it did, but the event interface reports raw key codes, not actual keystrokes. Instead linux pairs a physical keyboard with some sort of physical output device in order to create a terminal device to interact with.
I don't know what programs your embedded system actually has. I don't know what your embedded system actually is beyond what processor runs it. Your system may just not be configured to use it. The content of /etc/inittab, and the complete listing of /dev/, might be useful to figuring this out. It'd also help if you replied more than once every three weeks. Last edited by Corona688; 3 Weeks Ago at 12:20 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|