supplierdeeply

How do I kill the keyboard? (A540)

  • 5 Replies
  • 984 Views
*

Offline hotvedt

  • ***
  • 106
  • A540/SX110IS/350D
  • Publish
    How do I kill the keyboard? (A540)
    « on: 01 / December / 2009, 21:49:32 »
    Advertisements
    I want to make a build that has no working chdk-keys. To prevent the wife from turning of DNG-saving, and other stuff!
    Here the other day she came home with lots of beautiful images at 640x480, but just a few DNG's, taken before she turned
    it off. She's going on an vacation with friends soon, and we need a way to make the camera "fool proof".
    The plan is to use a normal build to set all settings, then replace the binaries to one with no keyboard support.

    In kbd.c i find
    Code: [Select]
    static KeyMap keymap[] = {
        /* tiny bug: key order matters. see kbd_get_pressed_key()
         * for example
         */
    { KEY_UP , 0x00000001 },
    { KEY_DOWN , 0x00000002 },
    { KEY_LEFT , 0x00000008 },
    { KEY_RIGHT , 0x00000004 },
    { KEY_SET , 0x00000100 },
    { KEY_SHOOT_FULL, 0x00000030 }, // note 3 here!
    { KEY_SHOOT_HALF, 0x00000010 },
    { KEY_ZOOM_IN , 0x00000040 },
    { KEY_ZOOM_OUT , 0x00000080 },
    { KEY_MENU , 0x00000200 },
    { KEY_DISPLAY , 0x00000400 },
    { KEY_PRINT , 0x00001000 },
    { KEY_ERASE , 0x00000800 },
            { KEY_DUMMY , 0x00001000 },
    { 0, 0 }
    };

    Just to test, i replaced all of them with 0x00000000 and compiled, and it seems to do what i want,
    but what would be the right or better way to do this?

    Camera is A540.
    « Last Edit: 01 / December / 2009, 21:51:10 by hotvedt »

  • Publish
    Re: How do I kill the keyboard? (A540)
    « Reply #1 on: 01 / December / 2009, 23:52:58 »
    this could be a really useful feature. seems that you'd want to implement a good interface for turning it on and off.

  • Publish
    Re: How do I kill the keyboard? (A540)
    « Reply #2 on: 02 / December / 2009, 04:23:06 »
    Go to \core\kbd.c
    And replace whole kbd_process() function with this one

    long kbd_process()
    {
        return 0;
    }

    The keyboard will work in native mode, no chdk keys processing.

    *

    Offline hotvedt

    • ***
    • 106
    • A540/SX110IS/350D
  • Publish
    Re: How do I kill the keyboard? (A540)
    « Reply #3 on: 02 / December / 2009, 07:02:54 »
    Yes, works. Thank you very much!


    *

    Offline reyalp

    • ******
    • 9860
  • Publish
    Re: How do I kill the keyboard? (A540)
    « Reply #4 on: 02 / December / 2009, 17:27:17 »
    Yes, works. Thank you very much!
    With a little more work, you could probably make to so some very complicated shortcut enableds/disables kb handling.
    Don't forget what the H stands for.

    *

    Offline hotvedt

    • ***
    • 106
    • A540/SX110IS/350D
  • Publish
    Re: How do I kill the keyboard? (A540)
    « Reply #5 on: 02 / December / 2009, 17:47:08 »
    I lack the skills for that, but it would have been nice to have.
    For example long press on two or three buttons after each other to enable keyboard, required at every boot.

     

    Related Topics