;
; akbd.sh
;
; Keyboard handling
;
;  1994-1998 Straylight
;

;----- Licensing note -------------------------------------------------------
;
; This file is part of Straylight's Sapphire library.
;
; Sapphire is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2, or (at your option)
; any later version.
;
; Sapphire is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with Sapphire.  If not, write to the Free Software Foundation,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;----- Overview -------------------------------------------------------------
;
; Functions provided:
;
;  akbd_test
;  akbd_translate
;  akbd_pollKey

		[	:LNOT::DEF:akbd__dfn
		GBLL	akbd__dfn

; --- akbd_test ---
;
; On entry:	R0 == internal key number to test
;
; On exit:	CS if key was pressed, CC otherwise
;
; Use:		Informs you whether a given key is currently being pressed.

		IMPORT	akbd_test

; --- akbd_translate ---
;
; On entry:	R0 == Wimp key number
;
; On exit:	R0 == Straylight extended keyset key number
;
; Use:		Translates a Wimp key number into one of the more specific
;		Straylight key numbers.

		IMPORT	akbd_translate

; --- akbd_pollKey ---
;
; On entry:	--
;
; On exit:	CC if a key was in the buffer and
;		  R0 == wimp translated key code
;		else CS and
;		  R0 corrupted
;
; Use:		Reports whether the user has typed ahead, and if so what the ;		keypress. Note that the keypresses returned are WIMP-type,
;		not Straylight extended ones so you will have to use
;		akbd_translate if you need the extended type.
;
;		This call could be used to allow buffering of keypresses:
;		on a Key_Pressed event you would call this routine until
;		it returns FALSE and store the codes it returns in a buffer
;		along with the code from the event.

		IMPORT	akbd_pollKey

		]

;----- That's all, folks ----------------------------------------------------

		END
