Remapping keyboard keys using udev hwdb doesn't work on rightAlt

Hi,
I'm trying to use udev hwdb for swapping pairs of keys ( esc, caps_lock ) and ( rightAlt , rightCtrl ) . I followed the instruction here Map Scancodes to Keycodes   with procedures describe blow. I only succeed in exchaging pair (esc, caps_lock) but failed in (rightAlt, rightCtrl).
Details of Procedures:
Create an empty file under /usr/lib64/udev/hwdb.d with file name 90-custom-keys.hwdb . Add the following lines into this file.
keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pn*
KEYBOARD_KEY_01=capslock
KEYBOARD_KEY_3a=esc
KEYBOARD_KEY_e038=rightctrl
KEYBOARD_KEY_e01d=rightalt
Rebuilding hwdb.bin
udevadm hwdb --update
Testing and reboot my system
udevadm --debug test /devices/platform/i8042/serio0/input/input0/event0
udevadm --debug test-builtin keyboard /devices/platform/i8042/serio0/input/input0/event0
Parts of the testing result of the last command looks like
device 0x1ce3890 has devpath '/devices/platform/i8042/serio0/input/input0/event0'
device 0x1ce3890 filled with db file data
keyboard: mapping scan code 1 (0x1) to key code 58 (0x3a)
keyboard: mapping scan code 58 (0x3a) to key code 1 (0x1)
keyboard: mapping scan code 129 (0x81) to key code 164 (0xa4)
keyboard: mapping scan code 130 (0x82) to key code 166 (0xa6)
keyboard: mapping scan code 164 (0xa4) to key code 166 (0xa6)
keyboard: mapping scan code 216 (0xd8) to key code 152 (0x98)
keyboard: mapping scan code 217 (0xd9) to key code 191 (0xbf)
keyboard: mapping scan code 57373 (0xe01d) to key code 100 (0x64)
Error calling EVIOCSKEYCODE: Invalid argument
keyboard: mapping scan code 57400 (0xe038) to key code 97 (0x61)
Error calling EVIOCSKEYCODE: Invalid argument
keyboard: mapping scan code 237 (0xed) to key code 226 (0xe2)
unload module index
Thie last 6 lines seems to be complaining the  problem, saying that 0xe038  and 0xe01d are invalid scancodes.
But they are scancodes of rightAlt and rightCtrl respectively, which I got from
showkey -s
After rebooting the system with the above settings, esc works as caps_lock and caps_lock works as  esc but  rightAlt and rightCtrl has no changes.
Last edited by kejingzhang (2013-10-04 08:51:59)

For USB keyboard, you need to get the scancodes from evtest rather than showkey. You may find a solution from:
https://ask.fedoraproject.org/en/questi … -keycodes/

Similar Messages

  • [SOLVED] Remapping keys using udev hwdb doesn't work on rightAlt

    hi, I had posted this topic in the [ newbie corner ] subforum for days, but got no repliy. I hope I can find luck  here.
    I'm trying to use udev hwdb for swapping pairs of keys ( esc, caps_lock ) and ( rightAlt , rightCtrl ) . I followed the instruction here Map Scancodes to Keycodes   with procedures describe blow. I only succeed in exchanging pair (esc, caps_lock) but failed in (rightAlt, rightCtrl).
    Details of Procedures:
    Create an empty file under /usr/lib64/udev/hwdb.d with file name 90-custom-keys.hwdb . Add the following lines into this file.
    keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pn*
    KEYBOARD_KEY_01=capslock
    KEYBOARD_KEY_3a=esc
    KEYBOARD_KEY_e038=rightctrl
    KEYBOARD_KEY_e01d=rightalt
    Rebuilding hwdb.bin
    udevadm hwdb --update
    Testing and reboot my system
    udevadm --debug test /devices/platform/i8042/serio0/input/input0/event0
    udevadm --debug test-builtin keyboard /devices/platform/i8042/serio0/input/input0/event0
    Parts of the testing result of the last command looks like
    device 0x1ce3890 has devpath '/devices/platform/i8042/serio0/input/input0/event0'
    device 0x1ce3890 filled with db file data
    keyboard: mapping scan code 1 (0x1) to key code 58 (0x3a)
    keyboard: mapping scan code 58 (0x3a) to key code 1 (0x1)
    keyboard: mapping scan code 129 (0x81) to key code 164 (0xa4)
    keyboard: mapping scan code 130 (0x82) to key code 166 (0xa6)
    keyboard: mapping scan code 164 (0xa4) to key code 166 (0xa6)
    keyboard: mapping scan code 216 (0xd8) to key code 152 (0x98)
    keyboard: mapping scan code 217 (0xd9) to key code 191 (0xbf)
    keyboard: mapping scan code 57373 (0xe01d) to key code 100 (0x64)
    Error calling EVIOCSKEYCODE: Invalid argument
    keyboard: mapping scan code 57400 (0xe038) to key code 97 (0x61)
    Error calling EVIOCSKEYCODE: Invalid argument
    keyboard: mapping scan code 237 (0xed) to key code 226 (0xe2)
    unload module index
    Thie last 6 lines seems to be complaining the  problem, saying that 0xe038  and 0xe01d are invalid scancodes.
    But they are scancodes of rightAlt and rightCtrl respectively, which I got from
    showkey -s
    After rebooting the system with the above settings, esc works as caps_lock and caps_lock works as  esc but  rightAlt and rightCtrl has no changes.
    Last edited by kejingzhang (2013-10-10 02:32:29)

    Thanks plam and Raynman for your help . Follow your hints, I succeed the swapping key task in an alternative method.
    Using the command 'setkeycodes' and adding these commands into a systemd controlled service script, keymaps are exchanged as gdm started.
    Here is my script and steps for doing this.
    Created a file with filename custom-keys.service under /etc/systemd/system. Add the  following context to the file.
    [Unit]
    Description=Keymap Custom
    Requires=gdm.service
    After=gdm.service
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/setkeycodes 1 58
    ExecStart=/usr/bin/setkeycodes 3a 1
    ExecStart=/usr/bin/setkeycodes e01d 100
    ExecStart=/usr/bin/setkeycodes e038 97
    [Install]
    WantedBy=graphical.target
    Enable the script so setkeycodes commands will automatically executed when gdm starts
    systemctl enable custom-keys
    The next time you reboot your system, key changes will take effect. To test if your config works, try
    systemctl start custom-keys

  • Creating a script for a PRIMARY KEY USING INDEX SORT doesn't work

    Probably a bug.
    h1. Environment
    Application: Oracle SQL Developer Data Modeler
    Version: 3.0.0.655
    h1. Test Case:
    1. Create a new table TRANSACTIONS with some columns.
    2. Mark one of numeric columns as the primary key - PK_TRANSACTIONS.
    3. Go to Physical Models and create new Oracle Database 11g.
    4. Go to Physical Models -> Oracle Database 11g -> Tables -> TRANSACTIONS -> Primary Keys -> PK_TRANSACTIONS -> Properties:
    a) on General tab set Using Index to BY INDEX NAME
    b) on Using Index tab choose a tablespace
    c) on Using Index tab set Index Sort to SORTED.
    5. Export the schema to DDL script. For the primary key you will get something like this:
    ALTER TABLE TRANSACTION
    ADD CONSTRAINT PK_TRANSACTION PRIMARY KEY ( TRAN_ID ) DEFERRABLE
    USING INDEX
    PCTFREE 10
    MAXTRANS 255
    TABLESPACE TBSPC_INDX
    LOGGING
    STORAGE (
    INITIAL 65536
    NEXT 1048576
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    ) SORTED
    h1. Reason of failure
    The script will fail because SORTED is not allowed here. It should be SORT.
    Additionally, the default behaviour for Data Modeler is to set Index Sort to NO but default setting for Oracle database 11g is SORT. Shouldn't Data Modeler use SORT as the default value?
    Edited by: user7420841 on 2011-05-07 03:15

    Hi,
    Thanks for reporting this problem. As you say, it should be SORT rather than SORTED. I have logged a bug on this.
    I also agree that, for consistency with the database default, it would be better to have SORT as the default in Data Modeler.
    David

  • E71: how to remap keyboard keys

    Hi!
    I was wondering whether there is a way to remap the keys on the qwerty keyboard on E71. I basically want a different layout. Is there any system utility I could use, buy, etc.?
    The reason I want this is because a standard native Russian keyboard ("jetsukeng" as it is called) is something I am not used to. I prefer a phonetic keyboard sometimes called "yawerty", so I'd like to use it on E71.
    Thanks in advance,

    Maybe something like Magic Key? http://bit.ly/grQHq
    My experience with Magic Key has been pretty good, on my E71, although I'm not remapping a whole lot of keys. I remap a few keys, so they function differently, depending on which application is active.

  • I have ipad2. i want to use apple bluetooth keyboard for writing.but autocorrection doesn't work! can i solve this with settings?

    i have ipad2  i want to use apple bluetooth keyboard on writing but auto correction doesn't work! how can i solve this? thank you

    Have a read here How to set up your Apple Wireless Keyboard
    Stefan

  • Remapping keyboard keys (again)

    Hi Svet,
    I got my bios unlocked, a few keyboard keys remapped (ALT and CTRL swapped and a couple of others) and fan curves updated of my GS70 2OD-002US a while ago. I would like to get the left CTRL and left ALT back in the old positions. But I noticed that since MSI forum is revamped all my PMs are gone. Since the last mod I reinstalled Windows 8.1 in Legacy BIOS mode (disabled UEFI and erased all MSI partitions) and installed Linux Mint 17.1 along side of it (with RAID0). Please let me know if it is safe to flash a keyboard remapping now. My old post is here https://forum-en.msi.com/index.php?topic=180399.0

    check PM how to fix your old account
    and also i need more clarify about the new stuffs that you ask me

  • I've used a terminal command to change default send keyboard shortcut and now it doesn't work at all!

    My friend provided me with a Terminal command allow me to use Cmd+Enter to send an email (muscle memory from Outlook, hard to forget!)
    Command was:
    defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9"
    Did that, and it didn't add the Cmd+Enter instruction but removed the Cmd+Shift+D instruction, so I had NO keyboard shortcut. Then Cmd+Enter started working. For a while. Now I'm back to getting the irritating error bleep sound, and having no functional keyboard shortcut for sending mail.
    Does anybody have any advice?

    Try
    defaults delete com.apple.mail NSUserKeyEquivalents
    Then, relaunch Mail.

  • Keyboard on Sat Pro 6100 doesn't work properly after remedial work

    Hi,
    My Sat Pro 6100 has just been away for the usual motherboard and power board replacement with Toshiba, but now I have a strange keyboard problem.
    When I turn it on, all the keys work. After a few minutes, '3' doesn't work, then 'r' fails, then '5','7','8','9','0' stop working. At this stage I can feel something getting very hot under the middle of the keyboard. A reboot and no keys work. Another reboot with an external PS2 keyboard, and the internal keyboard is still faulty (some keys work, others don't) but the external one works correctly.
    Now if the pc didn't get so hot under the middle of the internal keyboard, then I would conclude that the keyboard was faulty, but for it to fail slowly and sequentially like this, and it fails the same way every day (Since the Toshiba rebuild!).
    Maybe, internal keyboard controller overheating?
    Does anyone know what this might be? :-(
    Cheers,
    Homer

    Right under the keyboard of your pro 6100 is the VGA graphics controller (the keyboard cable plugs into the same card). It is normal that this part becomes warm during usage.
    It's strange that your problem appears after a while and not right away.
    It might be just an improper reseating of the keyboard cable (it's a thin layer like a photo film-negative) that easily pops out, but... it can be something more serious, too. (Especially since you had the upgrade done where hardware had to be changed)
    I would consult the service center once again and ask for instructions how to deal with this. Don't ignore it (by using an external keyboard instead of the malfunctioning internal) as it might end up into something more serious soon...
    Regards
    electrochain
    P.S. Please keep us updated on your steps

  • Remapping for App's shortcut's doesn't work

    Hello
    OS X 10.10.3 Yosemite.
    I'm trying to remap default hotkeys of "Mac Viewer" App, but it doesn't work.
    I followed theese steps:
    OS X Yosemite: Create keyboard shortcuts for apps
    OS X Yosemite: If a keyboard shortcut doesn’t work
    I want to change this default App's shortcut:
    To this:
    After I perform this step and reload the App it still uses original shortcuts. No other apps are using CTRL+OPTION+1 shortcut.
    What is wrong with that?
    Alexander

    From 1 to 6 they are:
    Content Only
    Thumbnails
    Table of Contents
    Highlights and Notes
    Bookmarks
    Contact Sheet

  • The keyboard of my macbook air doesn't work,how can I do?

    my keyboard doesn't work ,how can I do?
    ps:My English is soso ,I cannot tell the problem claerly in English.

    Try using an external USB keyboard. If it doesn't work, then somethings
    probably wrong with the computer.
    Best of luck!

  • Two Finger Scrolling using track pad doesn't work.

    You know how you can drag 2 fingers down the track pad to sroll down a page. Well, it doesn't work for me using Vista through Boot Camp. I tried the update, but it wouldn't install.
    Is this as good as it gets?
    Hypnoguy

    Hypnoguy,
    Sorry I haven't used boot camp for a long time my memory is a little fuzzy. Also note I used it with XP and not Vista, but don't use it at the moment anymore.
    Here is a list of Supported Macs for 64-bit windows: http://support.apple.com/kb/HT1846
    As per your trackpad problems after the drives have been installed I would try to install the update again: http://support.apple.com/kb/HT3336
    Here are the boot camp updates and also may help with errors:
    64 bit: http://support.apple.com/downloads/BootCamp_Update_2_1_for_Windows_Vista64
    32 bit: http://support.apple.com/downloads/BootCamp_Update_2_1_for_Windows_Vista32
    Also I would look in the boot camp system tray tool to see if there are settings related to your function keys.
    Sorry I don't know of a function key that changes the startup volume, I only know of the select from the boot camp system tray (Windows)/Startup disk preference pane (Mac) or the hold option during startup. More on that here http://docs.info.apple.com/article.html?path=Mac/10.5/en/11892.html
    A good place to find a lot of Bootcamp support would be here: http://www.apple.com/support/bootcamp/
    Hope that helps,
    Weston

  • Own udev rule doesn't work at all

    Hi,
    I've trouble to write my own udev rule. I tried the following but it doesn't work at all.
    I created the following file /etc/udev/rules.d/90-monitor-hotplug.rules with the following content:
    # test
    SUBSYSTEMS="usb", RUN+="/bin/sh -c '/bin/echo mon >> /tmp/monitor.log'"
    run
    > udevadm control --reload
    Now I assumed with every usb event, e.g plugin of an usb memory stick it should  spam something in /tmp/monitor.log
    But nothing happens.
    Can anybody tell me what I'm doing wrong. I guess it's something really stupid.
    Thanks
    Jakob

    You haven't used an equality operator in your first line (2x "="). Other than that, it looks fine to me.
    So try:
    # test
    SUBSYSTEMS=="usb", RUN+="/bin/sh -c '/bin/echo mon >> /tmp/monitor.log'"
    run
    > udevadm control --reload

  • Many programs I used to use in Tiger doesn't work in Leopard

    Here are the ones I've noticed have not been working or have errors:
    iMovie
    iChat
    Yahoo Messenger
    Adium
    VisualHub
    There are probably like 10 more but I haven't seen it yet. Why are so many programs are acting like this. I was thinking it was becasuse it wasn't ugpraded enough but I did install the newer version and it doesn't work.

    Well, haven't we had to deal with a slew of updates every two years?
    And at least Vista x64 is probably more secure, supports EFI (UEFI 2.).
    The same people that would need a Mac Pro (dual cpu, 8GB RAM, etc) would be looking at 64-bit.
    Did not Apple tout the G5 from IBM as finally being a 64-bit system? But yes, even Adobe CS3 is still 32-bit and limited to 3.5GB of user space, which there are work arounds for.
    One person I tried to help was using Maya but his version doesn't work with Leopard, and blames Apple and 10.5 it seems, rather than realize he needs to consider an 8-core system rather than 4-core, more memory, make better use of disk and RAID, and of course... upgrade software or... WAIT FOR MAYA AND 10.5.x to catch up to each other!
    People assume you have to wait for SP1 for Windows, but think they should jump rigtht in, when we all have seen that X.3 is usually the first "sweet spot" in any release.

  • Problem with Internet Key Onda Mt835Up: It doesn't work with mac os 10.6.6

    Hi I have a problem with internet key Onda MT835UP. It doesn't work, because my imac is more new than internet key.
    Can you help me? Can you send me the upgrade for this internet key?
    Thanks

    I have called Onda, there isn't the driver for Mac OS X 10.6.7 and they don't know if it'll be released.
    So if you have a Mac it's better to not buy Onda internet key,
    instead it's better to choose other brands that update the drivers of their products.

  • IPhone 4 keyboard keys stuck in Caps, lower case works and all functionality.

    I just noticed today that my keyboard keys are stuck in the CAPS mode. When the shift key is off, it does input as lower case letters but the keyboard still shows the letters as upper case? Has anyone had this issue?
    My iPhone 4 iOS is up to date and this just happened all of a sudden. Its more annoying more than anything.
    Cheers.

    The letters on the keyboard always show as capitals.  No issue exists.

Maybe you are looking for

  • Error creating a user defined report in the grid control

    I am trying to create a simple User Defined report in the Grid OEM Under the 'Elements' tab I have a 'Type' - 'Database Table from SQL' And I have this 'Statement' - SELECT * FROM SYS.DBA_USERS When I Click the 'Preview' button I get this error. Erro

  • Bookmarks back-up on flashdrive says "unsupported file type" when try to open

    I followed the Help directions for backing up my bookmarks. But when I try to open the back-up file from a flashdrive, it says "unsupported file type." Also, when i save the back-up file to the desktop, it never gives me the option to choose that bac

  • PA0008 table Authorization

    The information in infotype 0008 is accessed in multiple ways (direct select statements, throu' PNP and function modules) by HR programs.  Many of these programs do not have an authorization check built in. Is it possible to give a authorization chec

  • Why was my post deleted?

    OK Apple Discussion Admins. Hosts, or others. A new iPhone owner had a question about applications running in the background on their phone. I told them about, and pointed them to, an article about a PUBLIC announcement Apple made at this years Devel

  • Drag n Drop in JTree - missing the visual effect

    Hi, I already implemented the D&D on Jtree (from a JList) I've implemented DropTargetListener and it works I've the visual effect of the Dragged object on the mouse I have an extended DefaultTreeCellRenderer witch I use for other things. My problem i