Close
Showing results 1 to 9 of 9

Hybrid View

  1. #1

    Default

    I blacklist the

    Return Key
    Escape key
    Forward slash
    Space Bar
    and the movement keys I use:
    ESDF

    How hard is it for a non-programmer to go in and modify the source code?

  2. #2

    Default

    Quote Originally Posted by wowunderachiever View Post
    I blacklist the

    Return Key
    Escape key
    Forward slash
    Space Bar
    and the movement keys I use:
    ESDF

    How hard is it for a non-programmer to go in and modify the source code?
    I was able to update the source and recompile with your black listed keys. I have uploaded a zip file with the CloneKeys App and the modified .cp file incase you want to see what i did to it.

    the link is here
    http://dl.dropbox.com/u/2110626/CloneKeysBL.zip

    It worked for me on my computer with the blacklisting, let me know if it works for you.

    I have also copied the modified section of the CloneKeys.cp file in quotes below.

    Enjoy!

    Code:
    casekEventRawKeyDown:GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
    GetEventParameter(inEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode);
                        if ( (int)keyCode == 1 || (int)keyCode == 2 || (int)keyCode == 3 || (int)keyCode == 14 || (int)keyCode == 36 || (int)keyCode == 53 || (int)keyCode == 44 || (int)keyCode == 49)
                        {
                            break;
                        }
    //syslog(LOG_NOTICE, "Key Down [%c] [%d]", (char)charCode, (int)keyCode);
                        keyPressed = true;
                        keyDown = true;
                        break;
    casekEventRawKeyUp:
    GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
    GetEventParameter(inEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode);
                        if ( (int)keyCode == 1 || (int)keyCode == 2 || (int)keyCode == 3 || (int)keyCode == 14 || (int)keyCode == 36 || (int)keyCode == 53 || (int)keyCode == 44 || (int)keyCode == 49)
                        {
                            break;
                        }
    //syslog(LOG_NOTICE, "Key Up [%c] [%d]", (char)charCode, (int)keyCode);
                        keyPressed = true;
                        keyDown = false;
                        break;
    casekEventRawKeyRepeat:
    GetEventParameter(inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
    GetEventParameter(inEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode);
                        if ( (int)keyCode == 1 || (int)keyCode == 2 || (int)keyCode == 3 || (int)keyCode == 14 || (int)keyCode == 36 || (int)keyCode == 53 || (int)keyCode == 44 || (int)keyCode == 49)
                        {
                            break;
                        }
    //syslog(LOG_NOTICE, "Key Repeat [%c] [%d]", (char)charCode, (int)keyCode);
    // For key repeats, just sending another keyDown seems to work just fine.
                        keyPressed = true;
                        keyDown = true;
                        break;

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •