Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 03-24-2008, 01:41 AM   #1
LQ Newbie
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
How to detect how many bytes of scan-code are coming for a key press?

Can anybody tell me how to detect the number of bytes of scan-code are coming for a key press. For my project I have to write a piece of code, where for a key press I have to compare the scan-codes with a pre-filled array of bytes. I have to make these changes mainly in the i8042.c file. The problem is that for some keys there may be 1 scan-code or more than 1 scan-code. So in the stream of bytes coming to the driver, I have to detect the start and end of transmission of scan-code for a key.

I understand that for a key press we will get make codes and for key release we get break codes. Can anybody suggest a solution as to how I go about my problem or point me to the piece of code that distinguishes make and break codes in the kernel source code.
Old 03-24-2008, 03:46 AM   #2
Bruce Hill
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Fedora, Gentoo, Ubuntu (all servers at work are openSUSE)
Posts: 6,931

Rep: Reputation: 128Reputation: 128
When you joined LQ you agreed not to double post, according to the Rules.

I am so sorry, but if you can't follow these simple rules, I don't think it would be
worth my time to enlighten you on something more complicated.
Old 03-24-2008, 11:50 AM   #3
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue this thread here.
Old 03-24-2008, 01:39 PM   #4
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
closed the original since the dupe is now in the more sensible forum.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows key lacking scan code DavidMcCann Linux - General 8 02-16-2011 08:04 PM
how do i scan a character from keyboard without the user having to press enter rasika Programming 6 02-11-2010 09:54 PM
Emulating a key press simopal6 Linux - General 1 12-13-2007 01:53 PM
Key press Majestros Programming 2 02-14-2007 04:42 AM
Key press simulation in FC kiruxa Linux - General 1 11-24-2006 11:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration