Keyboard Inputs

This topic contains 5 replies, has 3 voices, and was last updated by  hellboy 4 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31323

    hellboy
    Member

    Is there any documentation regarding the various keyboard inputs supported in the sdk ? I can only find UP,DOWN,LEFT,RIGHT arrow keys in various sample programs. I want to use alphabets as my keyboard input.

    #37558

    dgu
    Member

    please have a look to :
    bool PVRShell::PVRShellIsKeyPressed(const PVRShellKeyName key)
    {
    if(!m_pShellInit)
    return false;

    return m_pShellInit->DoIsKeyPressed(key);
    }

    usage is :

    if(PVRShellIsKeyPressed(PVRShellKeyNameRIGHT)) {
    //do you thing
    }

    for example
    in the PVRShell classe , of course managing input is plateform dependant so the input possibilities provided by the framework are fairly generic.

    Regards
    david

    #37559

    hellboy
    Member

    I understand the usage of RIGHT arrow key, but I want to use say, key ‘C’ , then will writing :

    if(PVRShellIsKeyPressed(PVRShellKeyNameC)) {
    //do you thing
    }

    work ?

    #37560

    dgu
    Member

    as i said before it s decribed in the doc and the default possiblities are :
    enum PVRShellKeyName
    {
    PVRShellKeyNameNull,
    PVRShellKeyNameQUIT,
    PVRShellKeyNameSELECT,
    PVRShellKeyNameACTION1,
    PVRShellKeyNameACTION2,
    PVRShellKeyNameUP,
    PVRShellKeyNameDOWN,
    PVRShellKeyNameLEFT,
    PVRShellKeyNameRIGHT,
    PVRShellKeyNameScreenshot
    };

    you will have to extend it yourself i believe

    regards
    david

    #37561

    Joe Davis
    Member

    David is correct. You would have to extend it. We only support a limited number of input events as we see this as a debugging tool rather than a complete input handler.

    Thanks,
    Joe

    #37562

    hellboy
    Member

    The PVRShell.cpp file says that “Check the SDK release notes for details on how the enum values
    map to your device’s input device.” But I don’t seem to find it.

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.