[Solved] xmodmap bug? Remapping Caps Lock doesn't work

When I program I like to swap these keys:
Esc <-> Tab
Ctrl <-> Caps Lock
In ~/.xmodmap, I have specified these re-mappings:
keycode 66 = Control_L
keycode 37 = Caps_Lock
keycode 23 = Escape
keycode 9 = Tab
The Escape and Tab keys swaps, no problem, but instead of Caps_Lock and Control_L swapping, both those keys becomes Caps_Lock.
Whatever I try to do, the Control keys doesn't get assigned to Caps_Lock(keycode 66). If I leave the keycode 66 = , the key is un-assigned, but when I assign Control_L or Control_R, it just doesn't work. But, if I assign some other key, for example, keycode 66 = Tab, it gets assigned, no problem.
Its like xmodmap just doesn't want Caps Lock and Control keys to be swapped. Really frustrating. Any help/pointers would be really helpful.
Last edited by Gits (2012-04-12 07:09:37)

Solved: http://unix.stackexchange.com/questions … oesnt-work

Similar Messages

  • Caps lock doesn't work.

    My caps lock doesn't work. Whenever I press it, the cursor disappears from the type box on a website or whatever I'm typing information on. I then have to use my mouse to click back to where it should have been. In the meantime, I have been using the "shift" key to capitalise. This isn't just confined to Firefox, but to IE, Word etc. How do I solve this problem?

    Hello again, iamjayakumars!
    I didn't press the "shift" key for a long time. Just a brief period when need be to capitalise one word or more. This caps lock problem occurs everytime I turn the laptop on.

  • [SOLVED] Need Help Remapping Caps Lock to Control

    So I've spent the better part of an hour trying to remap my caps lock key to control. I've added a udev policy "10-keymap.fdi" in /etc/hal/fdi/policy.
    <?xml version="1.0" encoding="ISO 8859-1"?>
    <deviceinfo version="0.2">
    <device>
    <match key="info.capabilities" contains="input.keys">
    <merge key="input.xkb.options" type="string">ctrl:nocaps</merge>
    </match>
    </device>
    </deviceinfo>
    I restarted hal and it seems to acknowledge my new rule. lshal | grep xkb yields:
    brian@brian-laptop:~$ lshal | grep xkb
    input.xkb.layout = 'us' (string)
    input.xkb.model = 'evdev' (string)
    input.xkb.options = 'ctrl:nocaps' (string)
    input.xkb.rules = 'base' (string)
    input.xkb.variant = '' (string)
    input.xkb.layout = 'us' (string)
    input.xkb.model = 'evdev' (string)
    input.xkb.options = 'ctrl:nocaps' (string)
    input.xkb.rules = 'base' (string)
    input.xkb.variant = '' (string)
    input.xkb.layout = 'us' (string)
    input.xkb.model = 'evdev' (string)
    input.xkb.options = 'ctrl:nocaps' (string)
    input.xkb.rules = 'base' (string)
    input.xkb.variant = '' (string)
    input.xkb.layout = 'us' (string)
    input.xkb.model = 'evdev' (string)
    input.xkb.options = 'ctrl:nocaps' (string)
    input.xkb.rules = 'base' (string)
    input.xkb.variant = '' (string)
    But when I hit the caps lock key, it still gives me caps lock, not control. xev unsurprisingly tells me the keysym I'm pressing is indeed caps lock. I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
    Last edited by iamsmrt (2010-08-02 13:53:59)

    Anntoin wrote:
    Its worth trying adding this to your xorg.conf:
    Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "XkbLayout" "gb"
    Option "XkbOptions" "ctrl:nocaps"
    EndSection
    I was having this problem for a while and this worked for me. Your mileage may vary.
    This worked, thanks!
    nixpunk wrote:
    iamsmrt wrote:I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
    I use xmodmap and it's quite easy to setup.  Just curious, but why exactly do you want to keep your ".xinitrc clean"?
    My OCD more than anything

  • Shift, caps lock doesn't work

    i just upgraded to tiger finally from panther - easy set up, nothing fancy - and my shift key no longer works, nor does my caps lock or num lock. hence i can't capitalize anything and am unable to use keyboard shortcuts in safari or anything else. the keys do work in word, excel and other office apps and so do other f keys except num lock, but that's it. i had to go under edit just to copy and paste my login since i can't even type the at symbol in my email address.
    is this a setting or should i reinstall - can't even type a question mark. this didn't happen with panther, just since the upgrade.
    any suggestions[question mark would go here if i could type it] please help - thanks

    Hi, reese1. Welcome to the Discussions.
    1. How did you install Tiger? Upgrade Install, Archive & Install, or Erase & Install?
    2. I suggest you begin troubleshooting using the Procedure specified in my "Resolving Disk, Permission, and Cache Corruption" FAQ. Perform the steps therein in the order specified.
    3. An errant Startup or Login Item maybe the cause, especially if you installed some third-party utility under Panther for customizing your keyboard or defining your own keyboard shortcuts. My "Troubleshooting Startup and Login Items" FAQ can help you pin that down if such an item is causing the problem.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Shift-Caps Lock-Tab not working with remapped Caps Lock

    I've remapped my Caps Lock key to Ctrl using the Preferences > Keyboard > Modifier keys dialog and in the following question when I say CTRL i mean the Caps Lock key remapped to Ctrl and Ctrl is the normal left Ctrl key.
    I'm using OS X 10.9.4 and I've just bought 2 new external corded Apple keyboards and both of them are having trouble with the key combination Left Shift + CTRL + Tab. For applications where that combination should go to the previous TAB it does not work. If I use the right Shift instead it works fine, if I use the left Ctrl key instead of the remapped Caps Lock key it works great too.
    The internal keyboard on the laptop works fine with Left Shift - Caps Lock - Tab.
    The computers are a Macbook Air 11" Mid 2011 and a Macbook Pro 15" Mid 2010.

    Hey,
    Sorry to hear about the keyboard problem.
    In a post a while back had this to say.  He makes a suggestion that the keyboard might need to be replaced, then the person with the question tried something else.  You might take a look and see if there's something there that will help.
    Thanks for coming to the forum.
    Hope I helped,
    GeorgeFN
    I work on behalf of HP.

  • Remapping caps lock to a sticky fn key?

    The new layout of the f-keys along the top of apple keyboards is annoying at best, particularly for those of us who use the f-keys as function keys (because they do marvelous things in certain applications, like Eclipse).
    Most of the time, I'd like the f-keys to be f-keys (i.e. F12 is F12, NOT increase volume), but I do use the special hotkeys (iTunes control, volume control). The trouble is that my hand is not large enough to change the volume with one hand (I could with my old powerbook, because volume control was on the left, not on the right!).
    The best solution, for me, would be to remap the caps lock key to be a sticky fn key (which toggles the F-keys between F-key and hotkey functionality), that way, when I want to change the volume, I can hit caps lock, and then hit the volume keys until things are at the right level, then toggle back with caps lock again.
    This would make the caps lock into a toggle for the f-key functionality.
    I know I found a hint a long time ago about remapping caps lock to be a sticky language key...which I used to use...but I think that's specific to the language system.
    I've also check out DoubleCommand (doesn't do this), and uControl / fKeys (but neither are supported anymore and require legacy systems).
    Anyone out there have a solution?
    -Zach

    Just to be clear, part of the problem is that I do use the hotkey functionality SOMETIMES, but that requires the combination of the fn key (in the lower left-hand spot on the MacBook) + the desired f-key. My hand doesn't reach from the lower left-hand corner of the keyboard to (very nearly) the upper-right hand.
    -Zach

  • Remap caps lock to Ctrl in console (tty)

    I tried to use loadkeys to remap caps lock to Ctrl and Ctrl to caps lock but it doesn't work, because i think use caps lock is easier than press Ctrl when i move around keyboard. so i wonder:
    1. how can i remap caps lock to Ctrl and Ctrl to caps lock in bash (in tty)
    2. how can i remap caps lock to ESC in vim (in tty)
    I tried to modify /usr/local/share/kbd/keymaps/personal.map
    keycode 58 = 29
    keycode 29 = 58
    58 is caps lock keycode
    29 is control keycode.
    Thanks in advanced!

    yep, tks a lot, english is not my native language.
    write a super short script that simply changes keymap before calling vim.
    you mean i need to reload keymap when i call vim. if that i need to modify my .vimrc to call a script to reload the keymap. humm, that's problem, how can i call a script in .vimrc?  i am new to linux so can you show me howto?

  • Cap loc doesn´t work or light up and when I use shift for cap, it sounds like a typewriter typing

    I have a 2011 model and am running Lion.  My cap lock does not work or light.  When I use he shift to cap a letter, it makes a sound like a typewriter, wierd.  Also when I depress the shift, the symbols on top of the numbers are not as designated.  In order the get the @ sign, I have to depress the option key for it to appear.  The other symbols do not appear correct when I am typing when I depress the shift.  I have to hunt for what key will give me the correct symbol  Very Aggraviating.  I hope I have made myself clear.  I am 70 and not to literate on comps and then an APPLE.  That was my dream and I got but now am having this problem.....  Could anyone please help me.  If you need more info, please let me know as I don´t always make myself clear, so says my husband.

    Go to System Preferences > Keyboard > Modifier Keys. It should look like this:
    If not, press :Restore Defaults".
    With regards to the sound of typewriter, if it's not an actual mechanical sound, by which I mean it's a computer generated sound, you might have installed some application like Typewriter Sound:
    http://www.macupdate.com/app/mac/12077/typewriter-keyboard
    Is that the case? Removing it should solve the problem.

  • HT1192 Caps Lock is not working in my mac, after pressing long time too.

    Caps Lock is not working in my mac, after pressing long time too.Please help me to sort this problem out.

    I think even in newer versions of OS X there is a slight delay; just not so pronounced. My advice to get around it would be to install PCKeyboardHack and KeyRemap4MacBook - then do a couple of things:
    Change the Caps Lock key in System Preferences > Keyboard > Modifier Keys to "None"
    Use PCKeyboardHack to remap Caps Lock to keycode 110, the PC Application Key, which is unused on Apple keyboards.
    Then use KeyRemap4Macbook to map that particular keycode to Toggle Caps Lock.Try selecting For PC Users > Change PC Application Key > Application Key to CapsLock.
    I'm pretty sure that should get rid of the delay, which only happens when Apple is in charge of connecting the Caps Lock key to its action.
    Really, though, I would personally recommend doing some much more awesome things with your Caps Lock key; it's prime keyboard real estate, and who uses caps lock anyway, except in the darkest corners of the Internet? Personally, I've remapped Caps to be Escape (for use in my text editor) when you press it by itself quickly, but to be Cmd+Opt+Ctrl+Shift when you press it with any other key. I call it the "Hyper" key, and use it to switch applications; Hyp+S = Safari, Hyp+D = email, Hyp+F = Finder... The point is, be creative, make the Caps Lock key work for you.
    Oh, and the real Escape key maps to Caps Lock, so I can use it if I want to.

  • Caps lock not proper work in key bord

     sir ,
           caps lock not proper work in key bord  .

    Hello @bikaner121,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that the Cap Locks is not working properly on your keyboard. I would be happy to assist you, but first I would encourage you to post your product number for your computer. I am linking an HP Support document below that will show you how to find your product number. As well, if you could indicate which operating system you are using. And whether your operating system is 32-bit or 64-bit as with this and the product number I can provide you with accurate information.
    How Do I Find My Model Number or Product Number?
    Which Windows operating system am I running?
    Is the Windows Version on My Computer 32-bit or 64-bit?
    Please re-post with the requested information and I would be happy to provide you with assistance. Thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • Ever since installing Mountain LIon my caps lock no longer works.  Any ideas?

    ever since downloading Moutain Lion my cap lock no longer works,  Any ideas?

    First, check your >System Preferences>Keyboard
    ref:http://tonylocicero.hubpages.com/hub/Kill-thE-CAPS-LOck-Key

  • Keyboard delete and caps lock keys not working after update

    Shortly after a windows update two keys, delete and caps lock do not work. I have tried the following
    1. system restore..it says it cannot restore as a file is missing. I have used this function before without any problem.
    2. Update key board driver (standard PS/2)..it says latest version is installed.
    3. Uninstall and reinstall.
    4. Reset using the remove batteryt hold down power key option.
    The caps lock and delete does not work in Notepad or MS Word.
    It seems unlikely that the two keys themselves are damaged as it is unlikely that they would both fail at the same time and the problem after the windows undate is suspicious.
    I am using Windows 7 Home premium on a 64 bit HP G62.
    help appreciated as ever
    thanks
    matyiii

    matyiii wrote:
    Thanks I am beginning to suspect the same thing. I will try keyboard replacement as a last resort.....no fun to buy a new key board and have the problem persist...
    regards
    Matyiii
    Here's another test...since your laptop has USB ports get or borrow a USB keyboard and try it and if all those keys work and test then the results would mean your laptop keyboard has stop functioning as least you narrow done the problem.
    I am a Volunteer to help others on here-not a HP employee.
    Replies aren't online 24/7 because of Time Zone differences.
    Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015-

  • The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    Hi, BOSCO_LIN. 
    Here is a helpful article that will walk you through troubleshooting the issue with your caps lock not responding.
    One or more keys on the keyboard do not respond
    http://support.apple.com/kb/ts1381
    Regards,
    Jason H.

  • After update to iOS6.0.1; auto-lock doesn't work

    After update to iOS6.0.1; auto-lock doesn't work at all

    Which autolock?  Camera?  Calendar?  Game Center?

  • Caps lock light not working properly

    My Laptop caps lock is not working properly , when i press it , the light just flashes and dissappear , the light is suppose to stay there , the things that i type will still be in caps though , any idea how this happens?

    Hey,
    Sorry to hear about the keyboard problem.
    In a post a while back had this to say.  He makes a suggestion that the keyboard might need to be replaced, then the person with the question tried something else.  You might take a look and see if there's something there that will help.
    Thanks for coming to the forum.
    Hope I helped,
    GeorgeFN
    I work on behalf of HP.

Maybe you are looking for

  • How to make Group Matrix Report in BI Publisher Template Builder for Word

    Dear All I have created a template in MSWord's BI Publisher for creating Matrix report, it is working fine, but i couldn't do it for Group matrix report. Kindly give me any kind of example regarding group matrix or nested group in column level and ro

  • Clubbing of PR in single PO via MD04 screen

    Hi All We have multiple PReq's in MD04 screen created based on MRP run, many of them are having material which needs to be procured from same vendor, so I would like to know if it is possible to have all these Pres clubbed in single PO through MD04 s

  • Oracle upgrade 9.2.0.7.0  to 10.2.0.4

    Hello All, We have to do oracle upgrade from 9.2.0.7.0  to 10.2.0.4. OS : AIX 5.3 Sap Version :- SAP R/3 Enterprise ;Release 620 Kernel relaese :- 640 patch level 221 Looking for Compatibility Document or notes. Regards, Rupal kankaney

  • Ipad1 losing wifi connection. Need to switch off/on the wifi in settings to reconnect

    I having problems after updating to 5.1. The wifi continiue working on PCs so no problem  related to the router. The coverage is good. The problem come out every 5-10 minutes. Any problem with 5.1?

  • Mobility Wireless Domain GROUP

    Hi Everybody, I need some of your comment and explanation regarding the configuration of Mobility Group on Wireless Unified Architecture I have to WLC both run version 7.0.116.0, i want deploy a unified wireless on the 2 Sites, and the site are on Di