Update:
I set a breakpoint in the subroutine ScanNext at "btfsc KeyFlag,keyhit" in the Proteus simulation that works, when a key was pressed it broke at that point. When I set up the same for the 16f628a model it is not breaking during a keypress. Would have to change some code using INTCON, RBIE on the 16f628a or is the simuator flawed?
ScanNext
movf PORTB,W ;read to init port
bcf INTCON,RBIF ;clr flag
rrf TempD, F ;get correct column
btfss STATUS,C ;if carry set?
goto NoKey ;no then end
movf TempD,W ;else output
movwf PORTB ;low column scan line
nop
btfss INTCON,RBIF ;flag set?
goto ScanNext ;no then next
btfsc KeyFlag,keyhit ;last key released?
goto SKreturn ;no then exit
bsf KeyFlag,keyhit ;set new key hit
swapf PORTB,W ;read port
movwf TempE ;save in TempE
call GetKeyValue ;get key value 0 - F
movwf NewKey ;save as New key
bsf KeyFlag,ServKey ;set service flag
bsf KeyFlag,DebnceOn ;set flag
movlw 4
movwf Debnce ;load debounce time
SKreturn
call RestorePorts ;restore ports
return