Having trouble understanding scancodes (and their udev mapping)

First off, I know that scancodes are basically the raw byte interpretation of keyboard presses which I can display for example with showkey --scancodes.
However why does showkey display at least two bytes for each key that I press (is it for press/release?) and for some keys even 4 and more? And how can I dump that down to a single byte which I can specify in a hwdb database for udev?
For example, this is the output for Fn+Brightness Up/Down:
showkey --scancodes
kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
0x9c
0x1c 0x9c # pressed Enter
0xe0 0x54 0xe0 0xd4 # pressed Fn+Brightness Up
0xe0 0x4c 0xe0 0xcc # pressed Fn+Brightness Down
The according mappings for brightness up/down in the udev database for my keyboard model are:
KEYBOARD_KEY_88=!brightnessup # Fn+Up
KEYBOARD_KEY_89=!brightnessdown # Fn+Down
So assuming 0x54/0xd4 and 0x4c/0xcc are my "relevant" bytes, how do they lead to the scancodes 0x88 and 0x89 in the hwdb?

Yes thats what I assumed, however what I dont understand is which one do I need in case I want to overwrite or add a new key in a (custom) udev hwdb file.
The wiki doesn't mention anything specific about the difference between key press and key release and in the example I provided I was wondering how these scancodes for press/release of a key combination from showkey -s (like 0xe0 0x54 0xe0 0xd4) led to the specified value (0x88) in the udev hwdb file, since the wiki suggest that one should use showkey -s[ to figure out the scancode of a key.
Last edited by Triver (2014-11-23 16:13:07)

Similar Messages

  • HT4623 I upgraded my iphone4S yesterday and Siri response with "having trouble understanding".  Is there an upgrade for Siri?

    I upgraded my iPhone4S to iOs6 and now Siri does not understand me.  Siri responses "having trouble understanding you, try again".  Is there an updgrade for Siri?  I have been searching all afternoon for a glimmer of a solution.  Any suggestions?

    Sure...
    See this Apple article for a Hard reset of a Factory reset.
    http://support.apple.com/kb/HT3728

  • Having trouble understanding Abstract class. Help!!!!!!

    Having trouble understanding Abstract class. when is Abstract class used and for what.

    Having trouble understanding Abstract class. when is
    Abstract class used and for what.An abstract class is used to force the developer to provide a subclass, to implement the abstract methods, while still keeping the methods that were provided.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I'm Having trouble with OWA and Certs after the Rollup 7 for SP3 installation. any idea? update 2961522-

    Hi, everyone.
    I'm Having trouble with OWA and Certs after the Rollup 7 for SP3 installation. any idea? update 2961522-
    after running get-OWAVirtualDirectory or test-OWAConnectivity i'm getting a message that says "OWA it's Orphan, No Metadata information can be found."
    I only have the OWA users impacted.- anywhere users, and ActiveSync are working well.-
    Thanks,
    Fabian Alberto Campo
    MCT-MCSA 2012-MCITP365-MCTS
    Fabián A. Campo H. Consultor tecnico @ IXO Ltda. MCT MCP MCTS MCSA HP-APS Cra. 67 No. 167 – 61 of 303 Bogotá, Colombia

    Hi Fabian,
    Is there any error code when user access their mailbox on OWA. Please confirm if there is no results returned in EMS when you run Get-OWAVirtualDirectory cmdlet. Also check whether there is any Event Logs related to OWA in Exchange.
    In IIS manager, make sure the OWA virtual directory is listed in the Default Web Site. In EMC, we can navigate to Server Configuration > Client Access, select server and turn to Outlook Web App tab. Then we can click Reset Virtual Directory in the right
    Actions pane to reset OWA virtual directory.
    Additionally, please restart IIS service by running iisreset /noforce from a Command Prompt window.
    Regards,
    Winnie Liang
    TechNet Community Support

  • HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak

    Hi
    I have a new powerbook and want to give my girlfriend my old G4 power book, she has a new iphone 5s, and wants to create a new itunes/apple id. When i try to de authorize the G4 and sign in with her new apple ID it says bad password, how can i release the G4 from my cluster of authorized apples and make her the owner so she can download music and more importantly sync her music with her phone, she only has 3 songs on her iphone, and loaded all her CD's into the g4 but cant sync, im no dummy and this shouldnt be hard, but its driving me crazy!!!!!!
    thx u so much for your time heeeellppppp.

    Perhaps, as we have the same music tastes, for now i should just authorize her phone to my power book just to sync music, not pics, contacts etc? I'd hate to overright her contacts etc lol????
    HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak 

  • Just bought a new iPhone and am having trouble with iTunes and App Store. I can log in to Cloud, iTunes, and app store but once I try to download, it says "Youe apple id has been disabled". I've reset my password three times and have no issue on my Pad.

    Just bought a new iPhone and am having trouble with iTunes and App Store. I can log in to Cloud, iTunes, and app store but once I try to download, it says "Youe apple id has been disabled". I've reset my password three times and have no issue on my Pad.

    Hi FuzzyDunlopIsMe,
    Welcome to the Support Communities!
    It's possible that resetting your password multiple times has triggered this security.  Click on the link below for assistance with your Apple ID Account:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Here is some additional information regarding your Apple ID:
    Apple ID: 'This Apple ID has been disabled for security reasons' alert appears
    http://support.apple.com/kb/ts2446
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Click on My Apple ID to access and edit your account.
    Cheers,
    - Judy

  • Several of us have a iPhone 6s and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Several of us have a iPhone 6plus and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Not having the problem, don't personally know anyone who is.

  • Having trouble adding purchased and imported music to my playlists

    I'm having trouble adding purchased and imported music to my play lists. For example when I purchase or import new music to my playlists I have to re sync my ipod or the new songs don't appear on my playlists. Perhaps this is because I once unplugged my ipod w/out first disconnecting it. Previously when I purchased and imported music songs would appear on my play lists when I dragged them from purchased to playlist.

    Remember to authorise your new machine with the Apple ID
    Essentially copy the itunes folder and all sub folders over to the same place in the new computer.
    Windows XP: C:\Documents and Settings\username\My Documents\My Music\iTunes\
    Windows Vista: C:\Users\username\Music\iTunes\
    Windows 7: C:\Users\username\My Music\iTunes\
    Windows 8: C:\Users\username\My Music\iTunes\

  • Having trouble opening connections and reading from Bluetooth devices.

    Hello,
    As the title states, I am having trouble opening connections and reading data from a Bluetooth device. We are using a PDA to communicate with LabVIEW. First, the Bluetooth Open Connection VI displays a timeout error half of the time. Second, when it does open, it does not read what the PDA is sending. Third, if it does allow an open connection, it will not do it a second time unless the devices are turned off.
    I also have another related question. I am using a Linksys Bluetooth USB adapter, and the driver is proprietary. Labview requires the use of a Microsoft driver, and we are having problems going back and forth between the drivers. What Bluetooth receiver would you suggest using? The reason I ask is the fact that you have Bluetooth examples of client VI's. Therefore, you must use a similar device. Thank you for your time.
    -Jon

    Hi Jon,
    I'm not sure what Bluetooth receivers were used to verify the functionality of the VIs. However, I still want to help you solve your issue. Please make sure that you are running the shipping examples and let me know what version of LabVIEW, what PC OS and what PDA OS you are using. Does the Microsoft driver work for your Bluetooth receiver if you uninstall the Linksys driver?
    With your answers I'll do my best to help you out.
    - Philip Courtois, Thinkbot Solutions

  • I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

    I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

    I am having trouble updating minomonsters and I would like to find a way to fix it without erasing all of my data from the app.

  • HT1222 I am having trouble downloading Itunes and Safari.  I keep getting a windows installer error

    I am having trouble downloading Safari and Itunes.  I keep getting a windows installer error.

    Try temporarily disabling your firewall and antivirus software and try again...
    See here for Connection Issues
    http://support.apple.com/kb/TS1379
    From Here
    http://www.apple.com/support/itunes/troubleshooting/

  • Having trouble scanning pictures and sending to computer

    Having trouble scaning photos and sending them to my computer. I have HP Envy 700-300z DT.  Printer is a officejet all in one. Printer does everything it should do except scanning to send to computer.

    Hi,
    You may have to start from your computer first:
        Double click printer icon on desktop,
        Select Manage Scan to Computer
        Click Enable -
    You can start this automatically with Windows BUT you will get an arror message if you  turn on the computer BEFORE the printer.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • I have an iPhone and just goy I pad but no computer I'm trying to synch them together but having trouble with iCloud and I can't seem to subscribe for iTunes match from either devise

    I have an iPhone and just goy I pad but no computer I'm trying to synch them together but having trouble with iCloud and I can't seem to subscribe for iTunes match from either devise

    You first have to subscribe to iTunes Match through iTunes on your computer and have your music library in iTunes uploaded/matched before you can enable it on your iOS devices (see http://www.apple.com/itunes/itunes-match/).  Without a computer you won't be able to use iTunes Match.

  • HT4623 i am having trouble sending texts and pictures.  If I have imessage on, nothing goes or everything goes to family phones

    i am having trouble sending texts and pictures.  If I have imessage on, nothing goes or everything goes to family phones

    On each devoce Look at
    Settings > Messages > Send and receive from
    Make sure these settings are correct.
    Then look at MMS in the same area. Male sure MMS is turned on and check to ensure your carrier included MMS in your cellular plan.

  • Purchased LaCie external to backup having trouble setting up and getting started

    external to backup having trouble setting up and getting started

    Okay, first you will need to setup time machine to backup your system to the new hard drive.  Just open time machine and turn it on, then select your new hard drive and time machine will start the backup in a few minutes. 
    Take a look at this link, http://support.apple.com/kb/HT1427

Maybe you are looking for

  • Help with SQL

    Hi Gurus, I am working on a report where i created a view. This query pulls data from SO,PO,ITEMS,AP and AR tables. The problem I am having is when I add a AP tables or a field from that table some of the Order Numbers are disappearing. Could someone

  • How to navigate from a component to a specific view in other component

    Hi guys, i have an issue in my application where i have two components compA and compB. In defaultview of compA i have a navigationlink and a viewcontainer element which contains three views viewone,view two,view three and In default view of compB we

  • Run SunOne using normal user

    Hi, I have installed SunOne AppSvr7 on UNIX Server (SunOS) on my own directory "/export/home/SUNWappsvr7". I have installed the software using root permission. I can start and stop the app-server using root with no problem. However, I need to run/ope

  • Mandatory custom metadata field with current system date as default value.

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date. I have already created field of type Date. What expression I should write to make system date as default value? Becau

  • Safari 3.1 setAttribute very very slow!!

    Hi I'm developing an application using SVG and CSS and, after upgrading to 3.1, I discovered that the rendering of an SVG component after changing its class attribute is absolutely slow: it takes forever (literally). It is a simple element.setAttribu