Announcement

Collapse
No announcement yet.

Capslock as control AND backspace

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

    Capslock as control AND backspace

    I'm running the latest Kubuntu with KDE 4.5.

    Because I was never able to decide between reprogramming my capslock as a backspace or a control key, under Windows I used an Autohotkey script which did both: when the capslock was pressed and released alone, it generated a backspace; when press in combination with another key, it generated a ctrl-combo.

    Is there any way to do something similar in KDE?

    --Nathanael

    #2
    Re: Capslock as control AND backspace

    Investigate a package called "xautomation". It gives you a shell command called "xte". You can use xte to send generate small scripts. Here is the package description:
    Control X from the command line for scripts, and do "visual scraping" to find things on the screen. The control interface allows mouse movement, clicking, button up/down, key up/down, etc, and uses the XTest extension so you don't have the annoying problems that xse has when apps ignore sent events. The visgrep program find images inside of images and reports the coordinates, allowing programs to find buttons, etc, on the screen to click
    It was written up in a "Tech Tip" in Linux Journal a couple of months ago (September?). I think you can probably use it, but I'm not sure that it works with the capslock key.

    Comment


      #3
      Re: Capslock as control AND backspace

      Thanks for the reply. I've installed xautomation and will try it sometime today. Just at a glance, the man page mentions the control keys, but not capslock. But maybe in conjunction with KDE's key redefinition I can get something to work.

      --Nathanael

      Comment


        #4
        Re: Capslock as control AND backspace

        Any xorg system keys can be reprogrammed using xmodmap. You need to know the keycode of the key you want to change and of the key you want it to be. I use this method to swap the ` and ~ key and the | and \ key.

        Here's how to swap left control and caps lock under X only:

        xmodmap .xmodmaprc

        where .xmodmaprc contains lines

        remove Lock = Caps_Lock
        remove Control = Control_L
        keysym Control_L = Caps_Lock
        keysym Caps_Lock = Control_L
        add Lock = Caps_Lock
        add Control = Control_L

        This swaps those two keys without additional programs.

        Please Read Me

        Comment

        Working...
        X