Último mensaje de la página anterior:
minter escribió:Morning everybody!
What a curious thing!
In the BASIC prompt if I use the arrows or any key, I have a delay.
But if I use a any key from the number pad, them I haven't got any delay.
Immediately repeat the pulsations.
Could we redefine those keys?
Código: Seleccionar todo
ReadKey lbsr Inkey ; read Keyboard
clr MovVert ; reset vertical move flag
cmpa #$1c (¿#$36?) ; received Right arrow? (Received 4 from numbpad)
lbeq GoRight ; yes, move right
cmpa #$1d (¿#$34?) ; received Left arrow? (Received 6 from numbpad)
lbeq GoLeft ; yes, move left
cmpa #$1e (¿#$38?) ; received Up arrow? (Received 8 from numbpad)
lbeq GoUp ; yes, move Up
cmpa #$1f (¿#$32?) ; received Down arrow? (Received 2 from numbpad)
lbeq GoDown ; yes, move Down
anda #%11011111 ; convert to uppercase
cmpa #'Q' ; is Q key?
bne ReadKey ; no, read keyboard again
I'm not sure if this is the corrects codes of the numbers from the numberpad It's only a suggest.
Well, it is something to be tested. Would try to play with those codes, I will tell you the results
And another question:
Why the arrows scancode are $1c $1d $1e and $1f instead of $51$4f $4d $50?
Is it correct $40 $3E $3B and $43 for the numberpad key codes?
Ok! I know where it came from.
I suppose it's better take 32, 34, 36 and 38 because if you release the key automatically change to 35. While the logical code of the arrows is allwais the same although we relase the arrow key.
I'm not sure if it's clear with my beginer english.
Well, the problem (for me) is not your english, it is the lot of hexa codes you have talked about
Same than with the other comment, need to be tested, so till later ....