I've rewritten the PS2.h file to allow scancodes to be used.
My new file is newPS2.h, and I use it IN PLACE OF PS2.h.
new functions:

function PS2ScanCode

Returns 1 if scancode is available, 0 if not.
The actual scancode is passed using:

ScanCodeByte1
ScanCodeByte2
ScanCodeByte3

Once you have a scancode, if you decide you want the ascii character, you can simply execute
function ScanCodetoInkey

returns the same as if you did a keyin = inkey.

Here's the code:

;Startup routine
#startup InitPS2

;Defines (Constants)
#define PS2KeyShift PS2Flags.0
#define PS2KeyCtrl PS2Flags.1
#define PS2KeyAlt PS2Flags.2
#define PS2NumLock PS2Flags.3
#define PS2CapsLock PS2Flags.4
#define PS2ScrollLock PS2Flags.5
#define PS2Extended PS2Flags.6
#define PS2Release PS2Flags.7

' PS/2 Keyboard/mouse routines for Great Cow Basic
'Original code Copyright (C) 2006 - 2010 Hugh Considine
'Modified by Dan Damron VE6IBM
'#define PS2Data SysTemp.0 ' Set to Data Pin
'#define PS2Clock SysTemp.0 ' Set to Clock Pin
'Flags
'Initialize

Sub InitPS2
'Inhibit Device
DIR PS2Clock Out
DIR PS2Data IN
set PS2Clock Off
End Sub

Function PS2ReadByte
PS2ReadByte = 0
'Release bus
Dir PS2Clock In

'Give device time to respond
Wait 25 us

'If no response after 200 us, exit
PS2Bit = 0
Do While PS2Clock = On
If PS2Bit > 200 Then
Goto PS2ReadByteDone
End If
Wait 10 us
PS2Bit = PS2Bit + 10
Loop

'Start Bit
If PS2Data = ON then
Goto PS2ReadByteDone
end if
Wait Until PS2Clock = ON

'8 data bits
For PS2Bit = 1 to 8
Wait until PS2Clock = OFF
ROTATE PS2ReadByte RIGHT
PS2ReadByte.7 = PS2Data
Wait until PS2Clock = ON
Next

'Parity bit
Wait until PS2Clock = OFF
Wait until PS2Clock = ON

'End bit
Wait until PS2Clock = OFF
Wait until PS2Clock = ON

'Inhibit bus
PS2ReadByteDone:
DIR PS2Clock Out
Set PS2Clock Off
Wait 100 us
#ifdef PS2_DELAY
Wait PS2_DELAY
#endif
End Function

Sub PS2WriteByte (In PS2Byte)
'Pull data down, then release clock
Dir PS2Data Out
Set PS2Data Off
Wait 10 us
Dir PS2Clock In

'Wait up to 20 ms for device to pull clock down
PS2Bit = 0
Do While PS2Clock = On

'Re-use PS2Parity to count 100 us
For PS2Parity = 1 to 10
Wait 10 us
If PS2Clock = Off then
Exit Do
end if
Next
PS2Bit = PS2Bit + 1
If PS2Bit > 200 then
Goto PS2WriteByteDone
end if
Loop

'8 data bits
PS2Parity = 0
For PS2Bit = 1 to 8
If PS2Byte.0 = Off then
Set PS2Data off
Else
Set PS2Data on
PS2Parity = PS2Parity + 1
End If
ROTATE PS2Byte RIGHT
Wait until PS2Clock = On
Wait until PS2Clock = Off
Next

'Parity
If PS2Parity.0 = off then
Set PS2Data on
end if
If PS2Parity.0 = on then
Set PS2Data off
end if
Wait until PS2Clock = On
Wait until PS2Clock = Off

'Stop
Dir PS2Data In

'Ack
Wait Until PS2Data = Off
Wait until PS2Clock = OFF
Wait until PS2Clock = ON

'Inhibit bus
PS2WriteByteDone:
Dir PS2Clock Out
Set PS2Clock Off
Wait 100 us
#ifdef PS2_DELAY
Wait PS2_DELAY
#endif
End Sub

Sub PS2SyncKBLeds
'Get value
PS2Value = 0
If PS2NumLock then
PS2Value.1 = On
end if
If PS2CapsLock then
PS2Value.2 = On
end if
If PS2ScrollLock then
PS2Value.0 = On
end if

'Send LED command
PS2WriteByte (0xED)
PS2Parity = PS2ReadByte

'Send value
PS2WriteByte (PS2Value)
PS2Parity = PS2ReadByte
End Sub

'''Keyboard LED setting routine
'''@param PS2Value Value to send. Bits 0-2 control LEDs
Sub PS2SetKBLeds (In PS2Value)
'Send LED command
PS2WriteByte (0xED)
PS2Parity = PS2ReadByte

'Send value
PS2WriteByte (PS2Value)
PS2Parity = PS2ReadByte
End Sub
'''Get Keyboard ScanCodes
Function PS2ScanCode
PS2Extended = 0
PS2Release = 0
scancodebyte1 = 0
scancodebyte2 = 0
scancodebyte3 = 0
PS2ScanCode = 0
'Get key scan code
scancodebyte1 = PS2ReadByte
if scancodebyte1 = 0 then
exit function
end if
'return true to signify a scancode valid
PS2ScanCode = 1
Again:

if scancodebyte1 = 0xF0 then
' key released
'charcounter = charcounter + 1
PS2Release = 1
Do Forever
scancodebyte2 = PS2ReadByte
Loop While scancodebyte2 = 0
end if
if scancodebyte1 = 0xE0 then

' extended
'charcounter = charcounter + 1
PS2Extended = 1
Do Forever
scancodebyte2 = PS2ReadByte
Loop While scancodebyte2 = 0

if scancodebyte2 = 0xF0 then
PS2Release = 1
do forever
scancodebyte3 = PS2ReadByte
loop while scancodebyte3 = 0
end if
end if
End Function

Function INKEY
Inkey = PS2ScanCode
if inkey = 0 then
    exit function
end if
inkey = ScanCodetoInkey
End Function

Function ScanCodetoInkey
scancodeposition = 1
ScanCodetoInkey = 0

'set flags
PS2Extended = 0
PS2Release = 0

' PS2KeyShift = 0
GetAnotherScanCode:
if ScanCodeByte1 = 0xE0 then
PS2Extended = 1
scancodebyte1 = scancodebyte2
scancodebyte2 = scancodebyte3
scancodebyte3 = 0

goto GetAnotherScanCode
end if
if scancodebyte1 = 0xF0 then
PS2Release = 1
scancodebyte1 = scancodebyte2
scancodebyte2 = scancodebyte3
scancodebyte3 = 0

goto GetAnotherScanCode
end if
if PS2Extended then

'Extended Chars
else

'Non Extended chars
'Shift Keys:
if ScanCodebyte1 = 0x12 or scancodebyte1 = 0x59 then
if PS2Release then
PS2KeyShift = 0
else
PS2KeyShift = 1
End If
exit function

end if
if PS2Release = 0 then
if ScanCodebyte1 = 0x58 then

'Caps Lock pressed
if PS2CapsLock then
PS2CapsLock = 0
else
PS2CapsLock = 1
end if
PS2SyncKBLeds
ScanCodetoInkey = 0
exit function
End If

'Num lock pressed
if ScanCodebyte1 = 0x77 then
If PS2NumLock Then
PS2NumLock = 0
Else
PS2NumLock = 1
End If
PS2SyncKBLeds
ScanCodetoInkey = 0
exit function
end if

'Scroll lock pressed
if ScanCodebyte1 = 0x7E then
If PS2ScrollLock Then
PS2ScrollLock = 0
Else
PS2ScrollLock = 1
End If
PS2SyncKBLeds
ScanCodetoInkey = 0
exit function
end if
if scancodebyte1 = 0x5A then
ScanCodetoInkey = 13
end if
if scancodebyte1 = 0x66 then
ScanCodetoInkey = 8
end if
if scancodebyte1 = 0x76 then
ScanCodetoInkey = 27
end if
if scancodebyte1 = 0x29 then
ScanCodetoInkey = 32
end if

'numbers
if PS2KeyShift then
if scancodebyte1 = 0x16 then
ScanCodetoInKey = "!"
end if
if scancodebyte1 = 0x1E then
ScanCodetoInKey = "@"
end if
if scancodebyte1 = 0x26 then
ScanCodetoInKey = "#"
end if
if scancodebyte1 = 0x25 then
ScanCodetoInKey = "$"
end if
if scancodebyte1 = 0x2E then
ScanCodetoInKey = "%"
end if
if scancodebyte1 = 0x36 then
ScanCodetoInKey = "^"
end if
if scancodebyte1 = 0x3D then
ScanCodetoInKey = "&"
end if
if scancodebyte1 = 0x3E then
ScanCodetoInKey = "*"
end if
if scancodebyte1 = 0x46 then
ScanCodetoInKey = "("
end if
if scancodebyte1 = 0x45 then
ScanCodetoInKey = ")"
end if
Else
if scancodebyte1 = 0x16 then
ScanCodetoInKey = 49
end if
if scancodebyte1 = 0x1E then
ScanCodetoInKey = 50
end if
if scancodebyte1 = 0x26 then
ScanCodetoInKey = 51
end if
if scancodebyte1 = 0x25 then
ScanCodetoInKey = 52
end if
if scancodebyte1 = 0x2E then
ScanCodetoInKey = 53
end if
if scancodebyte1 = 0x36 then
ScanCodetoInKey = 54
end if
if scancodebyte1 = 0x3D then
ScanCodetoInKey = 55
end if
if scancodebyte1 = 0x3E then
ScanCodetoInKey = 56
end if
if scancodebyte1 = 0x46 then
ScanCodetoInKey = 57
end if
if scancodebyte1 = 0x45 then
ScanCodetoInKey = 48
end if
end if

'Letters
if scancodebyte1 = 0x1C then
ScanCodetoInKey = 65
end if
if scancodebyte1 = 0x32 then
ScanCodetoInKey = 66
end if
if scancodebyte1 = 0x21 then
ScanCodetoInKey = 67
end if
if scancodebyte1 = 0x23 then
ScanCodetoInKey = 68
end if
if scancodebyte1 = 0x24 then
ScanCodetoInKey = 69
end if
if scancodebyte1 = 0x2B then
ScanCodetoInKey = 70
end if
if scancodebyte1 = 0x34 then
ScanCodetoInKey = 71
end if
if scancodebyte1 = 0x33 then
ScanCodetoInKey = 72
end if
if scancodebyte1 = 0x43 then
ScanCodetoInKey = 73
end if
if scancodebyte1 = 0x3B then
ScanCodetoInKey = 74
end if
if scancodebyte1 = 0x42 then
ScanCodetoInKey = 75
end if
if scancodebyte1 = 0x4B then
ScanCodetoInKey = 76
end if
if scancodebyte1 = 0x3A then
ScanCodetoInKey = 77
end if
if scancodebyte1 = 0x31 then
ScanCodetoInKey = 78
end if
if scancodebyte1 = 0x44 then
ScanCodetoInKey = 79
end if
if scancodebyte1 = 0x4D then
ScanCodetoInKey = 80
end if
if scancodebyte1 = 0x15 then
ScanCodetoInKey = 81
end if
if scancodebyte1 = 0x2D then
ScanCodetoInKey = 82
end if
if scancodebyte1 = 0x1B then
ScanCodetoInKey = 83
end if
if scancodebyte1 = 0x2C then
ScanCodetoInKey = 84
end if
if scancodebyte1 = 0x3C then
ScanCodetoInKey = 85
end if
if scancodebyte1 = 0x2A then
ScanCodetoInKey = 86
end if
if scancodebyte1 = 0x1D then
ScanCodetoInKey = 87
end if
if scancodebyte1 = 0x22 then
ScanCodetoInKey = 88
end if
if scancodebyte1 = 0x35 then
ScanCodetoInKey = 89
end if
if scancodebyte1 = 0x1A then
ScanCodetoInKey = 90
end if

'If shift key and caps lock in same state, make lower case
If PS2KeyShift = PS2CapsLock Then
If scancodetoinkey >= 65 and scancodetoinkey <= 90 then
scancodetoinkey = scancodetoinkey + 32
end if
End If

'Symbols
If PS2KeyShift Then
if scancodebyte1 = 0x0E then
ScanCodetoInKey = "~"
end if
if scancodebyte1 = 0x4E then
ScanCodetoInKey = "_"
end if
if scancodebyte1 = 0x55 then
ScanCodetoInKey = "+"
end if
if scancodebyte1 = 0x5D then
ScanCodetoInKey = "|"
end if
if scancodebyte1 = 0x4c then
ScanCodetoInKey = ":"
end if
if scancodebyte1 = 0x52 then
ScanCodetoInKey = 34
end if
if scancodebyte1 = 0x41 then
ScanCodetoInKey = "<"
end if
if scancodebyte1 = 0x49 then
ScanCodetoInKey = ">"
end if
if scancodebyte1 = 0x4A then
ScanCodetoInKey = "?"
end if
if scancodebyte1 = 0x54 then
ScanCodetoInKey = "{"
end if
if scancodebyte1 = 0x5B then
ScanCodetoInKey = "}"
end if
Else
if scancodebyte1 = 0x0E then
ScanCodetoInKey = 96
end if
if scancodebyte1 = 0x4E then
ScanCodetoInKey = 45
end if
if scancodebyte1 = 0x55 then
ScanCodetoInKey = 61
end if
if scancodebyte1 = 0x5D then
ScanCodetoInKey = 92
end if
if scancodebyte1 = 0x4c then
ScanCodetoInKey = 59
end if
if scancodebyte1 = 0x52 then
ScanCodetoInKey = 39
end if
if scancodebyte1 = 0x41 then
ScanCodetoInKey = 44
end if
if scancodebyte1 = 0x49 then
ScanCodetoInKey = 46
end if
if scancodebyte1 = 0x4A then
ScanCodetoInKey = 47
end if
if scancodebyte1 = 0x54 then
ScanCodetoInKey = "["
end if
if scancodebyte1 = 0x5B then
ScanCodetoInKey = "]"
end if
End If
else

'This is key release.
ScanCodetoInkey = 0
End if
End if
End Function


Regards,

Dan Damron VE6IBM