Chapter 4: Programming 4-11
NCR USB DynaKey Control
NCRUsbKeyBoardCtlisanActiveXcontrolthatcontainsamethodfor
settingthekeyclicksSetClicks,andamethodfordownloadingthekey
translationmatrixinformation,SetKeyMatrix.
TheSetClicksmethodexaminesallcurrently‐enumeratedHIDdevices,
findsthosewithaVendor‐IDequaltoNCR’sassignedVendorID
(0x0404).Among
allqualifieddevicesfound,eachdeviceissearched
foraKEY_CLICK_INFOfeaturereportthatcontainsVolume,Frequency,
andDurationusages.Whenamatchingdeviceisfound,thatdevice’s
productID(PID)isusedtolocatekeyclickvalueswithintheRegistry.
Thevaluesfoundintheregistryaresenttothe
deviceinthe
KEY_CLICK_INFOfeaturereport.
EachtimeSetClicksisinvoked,itreadsVolume,Frequency,andDuration
keyclickparametersfromtheregistry.Iftheseparametersarenot
foundintheregistry,defaultvaluesarewrittentotheregistry,and
thesedefaultvaluesareused.Thiscausestheregistryto
containthe
valuesmostrecentlysenttoNCRHIDKeyClickdevices.
ThedefaultvaluesforVolume,Frequency,andDuration,
SetUsbKeyClickare15,1318,and16,respectively.
TheSetKeyMatrixmethodexaminesallcurrently‐enumeratedHID
devices,findsthosewithaVendor‐IDequaltoNCR’sassignedVendor
ID(0x0404).Amongallqualified
devicesfound,eachdeviceis
searchedforaKEYBOARD_MAPfeaturereportthatcontainsanarray
ofKEY_MATRIX_USAGEusages,Whenamatchingdeviceisfound,
thatdevice’sPIDisusedtolocateKeyMatrixentriesintheRegistry.If
noKeyMatrixvaluesarefoundforthatspecificPID,noKey
Matrix
downloadisperformed.