[Solved] Strange Problem swapping Esc and Caps lock in X

Hi
i use xmodmap to swap esc and caps lock. my .xmodmaprc:
remove Lock = Caps_Lock
keycode 9 = Caps_Lock
keycode 66 = Escape dead_diaeresis
add Lock = Caps_Lock
As login manager i use slim and everthing works as expected as long as i don't activate slim's autologin option. In this case pressing caps lock executes  caps lock and esc. The same happens if i start X from the console via startx. I have no clue why this happens. Anyone got an idea whats the problem?
More, maybe relevant info: i use dwm as window manager and xmodmap is executed in .xinitrc.
ccc1
Last edited by ccc1 (2014-04-26 08:19:55)

I find that many of these types of common key switches are supported by xorg.conf.d configurations.  For example, I use my caps lock as a secondary "windows key" since that is the mod key for my i3 setup.  So I have this in /etc/X11/xorg.conf.d/10-evdev.conf
% cat /etc/X11/xorg.conf.d/00-keyboard.conf
<snip>
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbOptions" "caps:super"
EndSection
<snip>
I found the option you need.  It is in /usr/share/X11/xkb/rules/base.lst, and it is "caps:swapescape".  In my mind, this is the more "correct" way of doing it, as it is done during the initalization of X rather than as an after thought.
I hope this helps!
Last edited by WonderWoofy (2013-04-25 22:55:19)

Similar Messages

  • SOLVE strange problem with suspend and resume with gnome-power-manager

    I have pm-utils and gnome installed.
    Suspending and hibernation works well from the command line ($ pm-hibernate and $ pm-suspend).  Resuming works without any problems.
    Suspending from gnome "Shutdown dialog" works perfectly as well.
    However, if suspending is initiated by gnome-power-manager something strange happens:  After pressing the power button resuming switches to hibernation and my laptop turns off.  Resuming from disk works fine again.
    Now, suspending works fine again if I change and save any config file in /etc/pm/.
    Here comes the strange thing:  It doesn't really matter what I change as long as I save it.
    However, as soon as I reboot resuming fails again the way I described above.
    Anyone have a clue what's going on?
    I get no error messages and I've tried all sorts of boot entries.
    Last edited by mehldutt (2007-12-26 19:42:31)

    After some try and error my guess is that "HAL" is responsible for this problem:
    I deinstalled ACPID and 'pm-utils' and switched to 'uswsusp'.
    I made the appropriate changes to the appropriate hal-scrips
    usr/lib/hal/scripts/hal-system-power-suspend:
    #!/bin/sh
    /sbin/s2ram --force
    usr/lib/hal/scripts/hal-system-power-hibernate:
    #!/bin/sh
    /sbin/s2disk
    After these changes I still have the same problem:  immidiatly after resuming form suspend (via power-button) my laptop hibernates (s2disk).
    However, if I delete all entries in "usr/lib/hal/scripts/hal-system-power-hibernate" resuming from suspend works fine again, but hibernate doesn't of course.  So, some script must be calling "usr/lib/hal/scripts/hal-system-power-hibernate" emmediatly after resuming from suspend.
    A couple of weeks ago everything worked fine.  My guess is that one of the recent hal-updates is causing this.
    How can I figure what script is calling "usr/lib/hal/scripts/hal-system-power-hibernate" after resuming from suspend?

  • Lion - num lock and caps lock keys problem

    Since installing lion I have to have num lock key and caps lock key turned on to type normally (otherwise I get all numbers if num lock off, or all caps if cap lock off). It's like the keys' functions have been reversed. (2.16 GHz MacBook).
    Any help much appreciated.

    CHi Chubrock
    if you run Windows 8 and I guess you have backlit keyboard for your GT70 ONE, please try to download new firmware here, and give it a try, I guess the worng firmware installed in your system ,  please choose the firmware with backlit KB and install , good luck
    http://www.msi.com/product/nb/GT70-0NE.html#/?div=Firmware&nbos=win8

  • Typing in remote Control when changing language with key combination of Alt + Shift some time change to Upper Case and Caps Lock is off

    let me first say that this links dos not apply to my problem the first one is :
    http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/46b24b68-debf-466e-a780-66a3b999724c
    and it dos not apply because I dont use remote app, and also i able to change settings
    http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/6a0f0eda-d3f6-4cd9-91ef-a7e0b20bc799/
    this one has similar problem but he working with remote app and do not have the Upper Case and Caps Lock is off
    http://social.technet.microsoft.com/Forums/en-US/itproxpsp/thread/f978e234-2b3c-4780-9dda-bec52b25330d
    this one using XP i have it on windows 7 connecting to remote server 2008 r2
    here is the issue 
    my users remote control a terminal services farm, now when they changing language to English some  time it change to English Upper Case and caps lock is off ! then the Alt + Shift and the go back to English lower case and if they just play with
    this (i mean they just use Alt Shift over and over to try to get back to normal state when you hold shift and alt and you change to English and back to Hebrew if you hold the alt shift one more time )
    i tonic some thing strange ifi hold down first the alt and then the shift this issue happen more often
    i upload a video on this showing the problem live on my dropbox :
    https://dl.dropboxusercontent.com/u/103434771/meditowers/IMG_0245.MOV
    here is how the normal setting should be
    Alt + shift need to change to lower case English
    then Alt shift one more time will go back to Hebrew
    now if you hit on the caps lock you will be in English all the time with Upper Case

    Hi Yitzhak,
    Please refer to this post:
    www.davidbond.net/2012/10/rdp-shift-key-gets-stuck.html
    This post includes fix to this issue at the comments.
    Netanel Ben-Shushan, MCSA/E, MCTS, MCITP, Windows Expert-IT Pro MVP. IT Consultant & Trainer | Website (Hebrew): http://www.ben-shushan.net | IT Services: http://www.ben-shushan.net/services | Weblog (Hebrew): http://blogs.microsoft.co.il/blogs/netanelb
    | E-mail: [email protected]

  • Laptop won't start quickly but power wifi and caps lock light keeps blinking

    Hi, it has happened before too but rarely but nowadays it happens on daily purposes.
    When I switch on my laptop after leaving it for 8-9 hrs, it won't start up but instead power, wifi and caps lock light keep blinking. I tried removing battery and pressing power button for few minutes but nothing happens. Then i left it like that with lights blinking and after 15 20 minutes it booted. I did same yesterday too. I left it like that it booted after 20 minutes..so My question is "why is this happening? Is it a motherboard issue or is it because of cold moisturous weather here and laptop takes time to get warm up?" Should I show it to HP Service center?

    Hi @Nishant5788
    Welcome to the HP Support Forums. I see that you are having a problem getting your notebook to boot up normally. As for what is causing the problem the blinking Caps Lock should tell us what is causing the problem as it should be blinking in a pattern. This HP document Computer Does Not Start and LEDs blink has a chart that will tell you what the blink codes mean.
    This is most likely a hardware issue and you can give us a call regarding repair options.  You can reach HP Total Care at 1-800-474-6836 in North America or start here if you live outside of North America.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • DV6 Flashing Num Lock and Cap Lock Keys on Startup

    Hi All, 
    Currently I'm having issues with my HP DV6 notebook when turning it on I am experiencing issues whereby the Num Lock and Caps Lock Lights are flashing and the screen is remaining blank the Sound, WIFI and Volume controls are all showing as orange I am having to take the battery out wait two minutes before trying to reboot the laptop when it works again, this issue is happening intermittently
    Thanks,
    Chris

    Hi Chris,
    See if you can match the pattern of the 'blinks' to those shown on the table below - this may atleast give you a better idea of what the problem is.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Scroll/Num Lock and Caps Lock LED's blinking not starting

    Hi, I have a problem with my Pavillion dv4-1222nr. It was fine last night and this morning when I turned it on the Scroll/Num Lock and Caps Lock lights started blinking.  I turned it off and on several times and still a blank screen and blinking lights also the light that shows the hard drive is running is not on.  I can hear the fan from the processor and the dvdr engaging oh, that light is blinking too. I pulled out the battery to see if it would reset but it didn't work. Can anyone please help

    Hi, I have a HP Pavillon Dv4 1225 dx. Since a week when I turn it on I hear a noise that seems that it is going to start but it doesn´t. The scroll, num block and caps looks bottom are blinking all time and the screen remains as if it were off, even if I wait for an a half an hour. I tried changing the memories, connecting another monitor, checking the battery but it doesn´t work. I would be great if you could give me an advice about what can I do to solve the problem. Kind regards

  • 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-

  • Letter keys and Caps lock not responding

    So, I've run into a very odd problem several times now, and I was wondering if anyone had encountered anything like it. Basically, the computer stops responding to the letter keys and cap lock will no longer turn on (light doesn't even turn on), but the arrow keys, command, and tab still work. The only way I have found to make the keys respond again is to reboot.
    This has so far occured at two different occasions: Once, while using Blender 2.49b, and several times while playing the game "Warcraft 3: the Frozen throne." The only similarity I noticed between them is that they both fill the entire screen. The problem has not occurred anywhere else, although it persists after quitting the application.
    Does anyone have any ideas?

    I have been researching a lot on the internet re: 10.6.7 macbook's built-in keyboard's arrow keys are not responding! Been doing it for more than a month. I even saw a HARDWARE Troubleshooting at Youtube, by taking out the battery and tighten some screws for the keyboard, that people do by themselves and most of them say they get it fixed. Since I AM NOT techy I still tried to search for more resolutions at least before I spend money to bring my Macbook to a repair store! And finally! Thank God!!!! THIS RESOLUTION JUST FIXED MY PROBLEM w/o having to TECHNICALLY open my Macbook, take the battery out and screw harder some screws inside the laptop! THANK YOU SO MUCH FOR SHARING THIS RESOLUTION! ^_^

  • Elitebook9470 not turning on,scroll and cap lock keys light up

    I have an elitebook9470 which is about 2 years old. When I turn my laptop on the keys light up but the monitor remains blank. Then the scroll and caps lock keys light up however nothing appears on the monitor. I have charged my laptop and I am unsure if it is related to low power. I have tried attaching the laptop to an external monitor but no signal appears. Any help regarding this will be appreaciated. thanks for your help.
    Regards
    nush

    Hi @Nush 2015 ,
    To get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at Commercial Forums.
    Even though this is a Commercial product, try performing a hard reset.
    When performing a hard reset please note remove any and all USB devices. Disconnect all non-essential devices.
    Here is a link on computer does not start.
    You could reset the BIOS with this document selecting the reloading the BIOS default settings.
    Hope this helps you out.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • My/keyboard/green/light/goes/out/and/the/space/bar/and/caps/lock/keys/donot/work /.I/have/100%/battery/life.I/show/connected/to/bluetooth.Anyone/know/the/approxi mate/life/of/a/keyboard?Mine/is/about/4/years/old.Using/an/iMac/about/4/years/ol d,too.

    My/keyboard/green/light/goes/on/and/off./The/space/bar/and/caps/lock/keys/do/not /work/.I/have/100%/battery/life.I/show/connected/to/bluetooth.Anyone/know/the/ap proximate/life/of/a/keyboard?Mine/is/about/4/years/old.Using/an/iMac/about/4/yea rs/old,too.

    Could be an early retirement problem.  There is no fixed lifespan for anything, as you know.   Find a friend with a keyboard and test that in your machine.  That will show if it is your keyboard or your computer.   We can progress from there.

  • HP ProBook 6540b won't boot and caps lock "blinking" continuously.

    Hi,
    I'm trying to help a friend with his laptop a Probook 6540b.
    It won't boot and caps lock "blinking" continuously.
    When I got it caps lock and num lock was "blinking" tre times... indicated memory problems, reseated the memory modules
    and the the "tre time blinking" disappeared, but caps lock now blinking continuously and the only way to shot down the computer
    is to disconnect the power.
    Anyone with some ideas???
    Janson 

    A neighbor had the same problem and asked for my assistance.  I created a rescue disk using my HP desktop running Windows 7 64-bit.  Even though her HP laptop was running Windows 7 32-bit, the disk allowed me to boot into windows on her computer.  I then went to the HP web site and downloaded the latest BIOS and then flashed it to the BIOS chip following the instructions that came with the download.  Everything is working fine now.  Hope this helps.

  • Select keys not working (including num lock and caps lock)  PRAM won't rese

    Help, I have a number of keys that stopped working including the "o" "9" number lock and caps lock (the lights on the number lock and caps lock don't work)
    oh- I'm writing this from another computer so all are working on this one, let you think i'm crazy.
    Tried to reset the SMC per instructions. Sounds like there is no "confirmation" that that was done. Tried resetting my pram (comand option p r) I don't get the "reset" sounds, it just boots up as normaal.
    Suggestions????
    Thanks

    Welcome to Apple Discussions!
    Have you tried an external keyboard? If an external keyboard works without issue, there is something wrong with your built in keyboard. If you get the same issues, you may have a software problem or glitch of some sort.
    If you create a new user account, do you still have the same problems? If not, there could be a problem with your usual account.
    Was there ever a spill or anything that might have affected your built in keyboard?
    Good luck!

  • I can not create a new ID in my iphon 4s, well I've created several to solve the problem of FaceTime, and the last restoration would not let me create a new ID. I can do? Thanks for helping.

    I can not create a new ID in my iphon 4s, well I've created several to solve the problem of FaceTime, and the last restoration would not let me create a new ID.
    I can do?
    Thanks for helping.

    Thanks Ckuan
    I can do, to create new ID?
    No way to delete all information from Iphon to create another ID?
    I will appreciate your answer

  • Delete and caps lock keys not working?

    my delete and caps lock keys are not working after they previously did before i shut my computer down,any suggestions?

    Take it to an Apple store or AASP.

Maybe you are looking for

  • Drag and Drop between Web Dynpro Tables on Cell Basis

    Hi Experts, I need to develop a Drag and Drop Functionality as follows: I have two tables. I want to drag a row of the first table and drop it in a particular cell of the second table. Is it possible to implement this using the Web Dynpro Drap and Dr

  • My iWeb Blog entries are not showing on MobileMe. Help!

    When I click on the link from the Blog Summaries to one one my Blog Entries I get a 'Not Found' page - all published to MobileMe with the latest iWeb. These llinks have always worked before. The problem has been apparent for two days now. What can or

  • Capture directly to Hard Drive?

    "Log and Capture" would seem to allow me to capture directly from my HDV cameras using the "Capture [Now]" button. However this only works if there is a tape in the camera (else the capture only lasts for a fraction of a second). Is it possible to ca

  • HD TV

    OK. I HAVE AN HDTV AND A 24" IMAC. CAN I RENT HD MOVIES WITHOUT APPLE TV? HOW HIGH DEF ARE THEY? IS APPLE TV THE SAME AS BLUERAY?

  • DW CS3 Crashes When Switching from Design View to Code View

    The page opens in code view, and when I try to switch to either split or design view, the application freezes.