>LPARAMETERS nkeycode,nshiftaltctrl >LOCAL c >c= chr(nKeycode) >*-- de is a "data environment" object (read really a library of routines and >*-- properties specific to the current form) >*-- the string read from the barcode is compiled into this.de.cBarcode >*-- this.de.lBarcodeReading is a flag to set barcode reading. (Simple keyboard >*-- input is processed as well, if c $ hRoomKeyenum). >*-- is this a barcode input? > >if !(c $ hRoomKeyEnum) and !this.de.lBarcodeReading > *-- set barcode reading on > this.de.lBarcodeReading= .t. > *-- initiate the compile string and save the character > this.de.cBarcode= c > nodefault > return >endif > >if this.de.lBarcodeReading > *-- barcode reading ends with a CR > if c= chr(13) > *-- deactivate barcode reading > this.de.lBarcodeReading= .f. > *-- do your thing with the compiled string > thisform.de.ProcessFixedScan() > nodefault > return > endif > *-- compile the string > this.de.cBarcode= this.de.cBarcode+c > nodefault > return >endif > >*-- otherwise process keyboard imput >if c $ hRoomKeyEnum > thisform.de.keyboard(c) > nodefault > return >endif >*-- verrrrry unlikely :) >=dodefault(nKeyCode,nShiftAltCtrl)>