I have been looking at the keyboard scancodes for the keys Alt-A to Alt-Z and found no pattern to them!
Are they internal to the electronic keyboard itself?
Thanks, Erik.
Here is a program to trap and display them:
Are they internal to the electronic keyboard itself?
Thanks, Erik.
Here is a program to trap and display them:
Code: (Select All)
Rem $Dynamic
DefInt A-Z
Dim Keys(1 To 26) As Integer
' scancodes for Alt-A to Alt-Z.
Data 30,48,46,32,18,33,34,35,23,36,37,38,50,49,24,25,16,19,31,20,22,47,17,45,21,44
' read Alt-<key> data.
For Var = 1 To 26
Read Keys(Var)
Next
Color 15
Print "Press <escape> to exit. Otherwise press Alt-A to Alt-Z."
Color 14
Do
_Limit 50
I$ = InKey$
If Len(I$) Then
If I$ = Chr$(27) Then Color 7: End
End If
If Len(I$) = 2 Then
X = Asc(Right$(I$, 1))
For Z = 1 To 26
If Keys(Z) = X Then
Print "Pressed Alt-"; Chr$(Z + 64); " scan"; X
End If
Next
End If
Loop
End
' scancodes for Alt-A to Alt-Z.
Rem ALT-A = 30
Rem ALT-B = 48
Rem ALT-C = 46
Rem ALT-D = 32
Rem ALT-E = 18
Rem ALT-F = 33
Rem ALT-G = 34
Rem ALT-H = 35
Rem ALT-I = 23
Rem ALT-J = 36
Rem ALT-K = 37
Rem ALT-L = 38
Rem ALT-M = 50
Rem ALT-N = 49
Rem ALT-O = 24
Rem ALT-P = 25
Rem ALT-Q = 16
Rem ALT-R = 19
Rem ALT-S = 31
Rem ALT-T = 20
Rem ALT-U = 22
Rem ALT-V = 47
Rem ALT-W = 17
Rem ALT-X = 45
Rem ALT-Y = 21
Rem ALT-Z = 44