Sponsored Content
Operating Systems Linux How to read keys from USB keyboard on AT91SAM9260 Post 302365241 by Corona688 on Monday 26th of October 2009 12:07:51 PM
Old 10-26-2009
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; 10-26-2009 at 01:20 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

USB keyboard in Solaris

I have a USB keyboard/mouse combo hooked up to an x86 box and when it loads the mouse works fine, but the ctrl, shift, alt, and i think the function keys don't do anything. Is there a setting I need to change, or a way to manually configure them. There are no drivers, it is supposed to emulate a... (0 Replies)
Discussion started by: Winzernotman
0 Replies

2. Shell Programming and Scripting

How to read arrow keys on really old bash?

I would like to get a script to respond to arrow key presses to scroll up and down a menu. The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7. I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r... (1 Reply)
Discussion started by: simonb
1 Replies

3. Shell Programming and Scripting

Detect USB keyboard and other peripherals

Hi there, I have a Debian machine without any peripherals (no screen, no keyboard, etc.). I'd like to be able to detect and log when someone plugs a USB keyboard. Something like : 2009-07-04 12:21 warning: keyboard pluged! Is that possible? I see two ways : 1. Either actively react to the... (4 Replies)
Discussion started by: chebarbudo
4 Replies

4. SCO

SCO 6.0-Keys in keyboard function differently

Sir I have HP installed with SCO 6.0. The problems are (1) some keys in board like 'del' 'backspace', 'pageup/dn" do not function and display some special characters on conole. (2) Files transferred from Windows machine invariably contain control Z/M characters. How to resolve these issues. ... (4 Replies)
Discussion started by: chssastry
4 Replies

5. Solaris

Keys on Keyboard stop working

Hello, I hope I put this in the right forum... I searched for similar threads, but I couldn't find any that seem to deal with the problem I am having. My workplace is using (among other Solaris-machines) Dell Dimension T3500 as workstations (running Solaris 10 X86 10/09 u8,... (0 Replies)
Discussion started by: areichart
0 Replies

6. UNIX for Dummies Questions & Answers

read from terminal/keyboard > /dev/tty

Hi, I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this: ok=false while do echo " Enter r1 to reformat " > /dev/tty read choice case $choice in ) echo " bla bla bla " ;; done However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies

7. Shell Programming and Scripting

Input keyboard keys upon program launch

Hey guys, first post! I want to write a script that will wait 1 second and then input the keys CTRL+ALT+J to the application i just opened. The program is dosbox, and thay key combination starts video recording :) I have no idea how to program this, can anyone help please? thanks in advance! (2 Replies)
Discussion started by: brunobliss
2 Replies

8. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies

9. HP-UX

Configure X windows with both keyboard and USB barcode reader

Greetings. Seeking guidance on adding a USB barcode reader (BCR) to an HP c3750 workstation with HP-UX 11.11 which is essentially configuring X windows to accept input from both a primary keyboard and a secondary keyboard that happens to be the BCR. Historically, I have successfully added a BCR... (2 Replies)
Discussion started by: mnkaltenbach
2 Replies
XChangeKeyboardDevice(3X11)					    X FUNCTIONS 				       XChangeKeyboardDevice(3X11)

NAME
XChangeKeyboardDevice - change which device is used as the X keyboard SYNTAX
Status XChangeKeyboardDevice(Display *display, XDevice *device); ARGUMENTS
display Specifies the connection to the X server. device Specifies the device to be used as the X keyboard. DESCRIPTION
The XChangeKeyboardDevice request causes the server to use the specified device as the X keyboard. The device must have been previously opened by the requesting client via XOpenDevice or a BadDevice error will result. The device must support input class Keys, or a BadMatch error will result. If the server implementation does not support using the requested device as the X keyboard, a BadDevice error will result. If the specified device is grabbed by another client, AlreadyGrabbed is returned. If the specified device is frozen by a grab on another device, GrabFrozen is returned. If the request is successful, Success is returned. If the request succeeds, a ChangeDeviceNotify event is sent to all clients that have selected that event. A MappingNotify event with request = MappingKeyboard is sent to all clients. The specified device becomes the X keyboard and the old X keyboard becomes accessible through the input extension protocol requests. XChangeKeyboardDevice can generate a BadDevice or a BadMatch error. DIAGNOSTICS
BadDevice An invalid device was specified. The specified device does not exist, has not been opened by this client via XOpenInputDevice, or is already one of the core X device (pointer or keyboard). This error may also occur if the server implementation does not support using the specified device as the X keyboard. BadMatch This error may occur if an XChangeKeyboardDevice request was made specifying a device that has no keys. SEE ALSO
XChangePointerDevice Programming With Xlib XFree86 Version 4.7.0 XChangeKeyboardDevice(3X11)
All times are GMT -4. The time now is 08:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy