Imagination PowerVR SDK Blog

Keyboard Inputs


#1

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.


#2

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)) {<br />
//do you thing<br />
}
```<br />
<br />
for example<br />
in the PVRShell classe , of course managing input is plateform dependant so the input possibilities provided by the framework are fairly generic.<br />
<br />
Regards<br />
david<br />

#3

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 ?


#4

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


#5

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


#6

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.