Menu

esc key mapping -- not defined in MBHIDHack.h

zubin
2007-01-15
2013-01-02
  • zubin

    zubin - 2007-01-15

    Hi,  I was thinking of trying to map my caps-lock key to escape to make vim easier on a MBP (as esc is very tiny), however I noticed that there is no definition for ESC_KEY or ESCAPE_KEY in MBHIDHack.h.  Any suggestions?

     
    • Olivier Dony

      Olivier Dony - 2007-01-15

      You can activate debug mode in the DoubleCommand preference pane, and any keypress will be logged into /var/log/system.log.
      This should help you find any keycode you might need to define for your specific keyboard.
      On mine ESCAPE is 53 (0x35).

      Watch out for CAPS_LOCK, as this is a toggle key, as opposed to a regular key like ESC.
      DC has a similar option (Caps Lock acts as Control Key). I guess you can start by looking at what it does in Substitute.cpp, but of course CTRL itself is not a regular key, so you probably won't be able to copy it verbatim.

      HTH...

       
    • Olivier Dony

      Olivier Dony - 2007-01-15

      BTW, if you manage to compile and install version 1.6.2 from the source (even before modifying it), I would like to known how you did it, because I cannot manage to load the DC kernel extension after compiling it... which basically makes customizations useless.

      See my other post about it in the DC forum: https://sourceforge.net/forum/forum.php?thread_id=1647664&forum_id=221238

       

Log in to post a comment.