Announcement

Collapse
No announcement yet.

"xmodmap -e "remove lock = Caps_Lock" does not work

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "xmodmap -e "remove lock = Caps_Lock" does not work

    The title says it all...

    I have the following line in my ~/.profile.

    Code:
    xmodmap -e "remove lock = Caps_Lock"
    It was working fine in 10.10 (Maverick). Now that I've installed 12.04, it does not work anymore.

    I did a fresh install and copied the personal parts of my old ~/.profile into the new one. (Same for the other files such as ~/.bashrc and ~/.Xmodmap).

    Yes, I can disable the Caps Lock key graphically by going to System Settings --> Input Devices --> Keyboard --> Advanced and checking the "Caps Lock is disabled" option, so this is not a huge issue. However, I prefer carrying over the basic settings like this between installations without having to set them graphically.

    Is anyone else having the same issue?
    Registered Linux User: #281828 | Kubuntu User: #22280

    Kubuntu 18.04 LTS
    Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

    #2
    If you're using ~/.Xmodmap why have keyboard commands in two locations?

    having

    remove Lock = Caps_Lock

    in ~/.Xmodmap should work. My Xmodmap entries are working fine in 12.04.

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      If you're using ~/.Xmodmap why have keyboard commands in two locations?

      having

      remove Lock = Caps_Lock

      in ~/.Xmodmap should work. My Xmodmap entries are working fine in 12.04.
      Thanks for the reply. i actually tried that as well before posting this. Here is my ~/.Xmodmap file.
      Code:
      ! Win key (left)
      keycode 133 = F13
      
      remove Lock = Caps_Lock
      The keycode mapping (which maps the left Windows key to F13) works just fine. The "remove Lock" entry does not.

      In your case, do you happen to have the Caps Lock key disabled through KDE as well? I'd suspect you don't, but I'm just making sure.
      Registered Linux User: #281828 | Kubuntu User: #22280

      Kubuntu 18.04 LTS
      Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

      Comment


        #4
        You suspect correctly, but I do use ~/.Xmodmap. I'll do a bit more checking when I get home. It seems odd that one function works while the other not. At least we know Xmodmap is loading.

        As a work-around, try re-mapping the key to blank. Do "xmodmap -pke" and verify your keycode for Caps_Lock.

        Then (keycode 66 for example) try: xmodmap -e 'keycode 66 ='

        EDIT: Just tried this - it worked on my box...
        Last edited by oshunluvr; Mar 16, 2012, 05:44 PM.

        Please Read Me

        Comment


          #5
          One could also use setxkbmap (which is what kde uses) instead of xmodmap, for example:
          Code:
          setxkbmap -option caps:none
          (you can also set other options that are available in kde with setxkbmap, see 'man setxkbmap' for more information on the command if interested)

          Comment


            #6
            Originally posted by oshunluvr View Post
            You suspect correctly, but I do use ~/.Xmodmap. I'll do a bit more checking when I get home. It seems odd that one function works while the other not. At least we know Xmodmap is loading.

            As a work-around, try re-mapping the key to blank. Do "xmodmap -pke" and verify your keycode for Caps_Lock.

            Then (keycode 66 for example) try: xmodmap -e 'keycode 66 ='

            EDIT: Just tried this - it worked on my box...
            Thanks, that worked on my machine too. (I placed that in my ~/.Xmodmap.) I still wonder why the original command doesn't work? It's not comfortable to see something that should work, not work.
            Registered Linux User: #281828 | Kubuntu User: #22280

            Kubuntu 18.04 LTS
            Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

            Comment


              #7
              Originally posted by kubicle View Post
              One could also use setxkbmap (which is what kde uses) instead of xmodmap, for example:
              Code:
              setxkbmap -option caps:none
              (you can also set other options that are available in kde with setxkbmap, see 'man setxkbmap' for more information on the command if interested)
              Thanks for the info. I'm pretty sure that will work for me, though I have not tried it yet.
              Registered Linux User: #281828 | Kubuntu User: #22280

              Kubuntu 18.04 LTS
              Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

              Comment


                #8
                I found a couple of bugs reports regarding this command in earlier versions. Must be a problem they haven't fixed yet...

                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  I found a couple of bugs reports regarding this command in earlier versions. Must be a problem they haven't fixed yet...
                  Do you happen to have the links to those bug reports handy? I'd like to give them my input.
                  Registered Linux User: #281828 | Kubuntu User: #22280

                  Kubuntu 18.04 LTS
                  Dell Precision Workstation T5500 (Xeon @ 2.13GHz x 2 / 12 GB RAM)

                  Comment


                    #10
                    https://bugs.launchpad.net/ubuntu/+s...el/+bug/777882

                    I saw other reports from way previous releases so could be a regression.

                    Please Read Me

                    Comment


                      #11
                      I've tried this in both ~/.profile and ~/.Xmodmap (as well as ~/.xmodmap and ~/.xsessionrc, all one at a time) none of which work. The command I'm trying is:
                      Code:
                      xmodmap -e "keycode 49 = backslash bar backslash bar dead_grave brokenbar"
                      I just want to confirm whether this is a pre-release bug or whether I'm doing something wrong here. Running the command in a terminal window after login does work, however. (I have a similar problem mounting SSHFS shares but that's discussed elsewhere, I gather.)

                      Comment

                      Working...
                      X