; Scan for PAUSE or BREAK & set KFLAG$.

KCKz		nop
		nop
		nop	;	CALL	ENADIS_DO_RAM	; Bring up the keyboard
		LD	HL,KFLAG$	; Hang onto flag
		LD	A,(SHIFT)	; P/u SHIFT row & ignore
		AND	7		; CTRL key pressed
		CPL
		BIT	2,A		
		RET	Z		; Back if CTRL

; Set carry flag if a SHIFT key is down

		ADD	A,1		; Set CF if no SHIFT
		CCF			; Set CF if SHIFT
		JR	NC,KCK1		; No pause if no SHIFT
		LD	A,(KB1)		; Test for "z"
;		IF	zUSA
		BIT	0,A
		JR	Z,KCK1A		; Bypass if no "z"
		SET	1,(HL)		; Turn on pause bit
		JR	KCK1A

; Inhibit test of unshifted BREAK if nested ENA_DO

KCK1		LD	A,(OPREG_SV_PTR)	; If not at highest level
		SUB	OPREG_SV_AREA+1&0FFh 	; then don"t allow
		JR	NZ,KCK1B		; tasker BREAK handler
KCK1A		LD	A,(KB7)			; Check on BREAK & ENTER
		BIT	0,A			; Check on ENTER
		JR	Z,KCK1B			; Go if not
		SET	2,(HL)			; else note set
KCK1B		BIT	2,A			; Is <BREAK> depressed?
		PUSH	AF
		JR	Z,KCK2			; Go if not
		JR	C,KCK2			; Ignore if shifted
		LD	A,(SFLAG$)		; Permit break bit only
		BIT	4,A			; if BREAK enabled?
		JR	NZ,KCK2
		SET	0,(HL)			; Turn on BREAK bit
KCK2		POP	AF			; C=shift, NZ=break
		RET