Page 1 of 1

PostPosted: Thu Apr 12, 2001 12:16 pm
by Shir0t
Is there any way to find keycodes with pocketc? I've tried returning values from key() but it doesn't seem to work. Another question I have is along the lines of the #pragma PKPCFULLSCREEN - is this the only compile time switch? If not, are they documented anywhere?

PostPosted: Thu Apr 12, 2001 1:46 pm
by airdrik
getc() returns the char of a key pressed (like the getch() in c/c++), but as for actual key codes you have to go:
[code]
int evnt,keycode;
while(keycode!=<i>some value</i>)
{
evnt=event(1);
sleep(0);//so that you can do other things while this is running

if(evnt==PM_KEYDOWN)
{
keycode=key();
//process key command
}
else
...
}

PostPosted: Mon Apr 16, 2001 1:40 pm
by Justinespinosa
To use #pragma PKPCFULLSCREEN, you musst have the V3 compiler.
Just put it at the beginning of the code and the app will hide the start menu each time it's runned. You cannot switch it back on during the program execution.

J.Espinosa

OUTS Softwares

PostPosted: Mon Apr 16, 2001 5:58 pm
by Shir0t
Thank you for the replies but my question was reffering to other compile time options like PKPCFULLSCREEN. I can use the PKPCFULLSCREEN command and have had no trouble with, and I have been so impressed I was wondering if there were other commands like it because I can't find any documentation on PKPCFULLSCREEN or similar commands.

PostPosted: Mon Apr 16, 2001 6:49 pm
by kjm
Hi

For keys/characters I suggest you look back at the following two previous entries in this forum:

"Alpha, Beta & Gamma"

"Find out if hardware buttons are pressed"

You will find reference to two programmes there that should help you with the above.

Kevin

PostPosted: Tue Apr 17, 2001 1:31 pm
by Justinespinosa
there's only one other macro like this for the moment:

#pragma R3MENUOFF

the program starts without showing the menubar

J.Espinosa

OUTS Softwares