home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4611
/
fw16d.ins
/
SOURCE
/
FUNCTION
/
KEYS.PRG
< prev
next >
Wrap
Text File
|
1994-06-04
|
590b
|
27 lines
static aKeys := {}
static aActions := {}
//----------------------------------------------------------------------------//
function SetKey( nKey, bAction )
local nAt := AScan( aKeys, nKey )
if PCount() == 2
if nAt == 0
AAdd( aKeys, nKey )
AAdd( aActions, bAction )
else
aKeys[ nAt ] = nKey
aActions[ nAt ] = bAction
endif
else
if nAt != 0
return aActions[ nAt ]
endif
endif
return nil
//----------------------------------------------------------------------------//