Menu

Mapping CapsLock to Escape

2009-04-02
2013-01-02
  • Peter Poeml

    Peter Poeml - 2009-04-02

    Hi!

    I had an old wish: remapping the CapsLock key to Escape. I use Escape
    very frequently, and enjoyed the capability to remap this under Linux,
    and I always missed it under OSX :-)
    When searching Google, this is something that seems to be looked
    for also by other people.

    I looked at DoubleCommand and found that it does something very similar.
    It can already remap CapsLock. So it seemed that it should be capable of
    remapping the key to Escape as well.

    I checked out the source code and I have it partly working. What works:

    * kernel module compiles, loads, works -- great!!

    What doesn't work:

    * I added code in the preference panel to handle the configuration of
      the new function, but it's not doing anything yet
    * I did *not* manage to change the preference's panel's layout and add a
      new button, and connect it with the new bit of configuration (it's the
      first time I use XCode)
    * thus, for now, in lack of configurability, I have hardcoded my change
      so that it is always active

    So maybe with a little help from you guys I could complete the patch.

    (I will attach the patch later, I don't have access to it right now. I
    thought it's still good to let you know of this already)

    Thanks!
    Peter

     
    • Peter Poeml

      Peter Poeml - 2009-04-02

      Hi,

      I opened a new issue in the tracker and attached the patch to it.
      https://sourceforge.net/tracker/?func=detail&aid=2726665&group_id=65339&atid=510607

      Peter

       
      • Matthew Schinckel

        To put it in the UI, you just need to enable the button labelled N/A, give it a meaningful title, and set it's tag to 31.

        Then rebuild, and it all works.

        Your patch was virtually the same as one I developed after reading this ticket, but was slightly better - mine didn't increment the DCP_lastusedbit variable or modify any of the code files in the Prefpane project.

         

Log in to post a comment.