File size: 891 Bytes
806d4b5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#help_index "Help System"
public U0 PressKeyHelp(CTask *task=NULL)
{//Jump to key hndlrs src for key presses.
I64 arg1=0,arg2=0;
CTask *old_hash=Fs->hash_table;
if (!task) task=Fs;
/*
This feature is a burden in code. It would be nice to lst key
cmds for all applications, but it makes the code too ugly.
*/
task=Fs;
Fs->hash_table=task->hash_table;
"Press keys to show hndlr code.\n"
"<SHIFT-ESC> to exit.\n"
"Do not press <CTRL-ALT-keys>.\n";
while (arg1!=CH_ESC && arg1!=CH_SHIFT_ESC) {
GetMsg(&arg1,&arg2,1<<MSG_KEY_DOWN);
*keydev.desc=0;
keydev.hndlr=NULL;
if (task==Fs)
PutKey(arg1,arg2|SCF_KEY_DESC);
else if (TaskValidate(task))
PostMsg(task,MSG_KEY_DOWN,arg1,arg2|SCF_KEY_DESC);
Refresh(0,TRUE);
Sleep(1);
if (*keydev.desc)
E(keydev.hndlr,512);
}
Fs->hash_table=old_hash;
}
PressKeyHelp;
|