Post by Walt Decker on Apr 12, 2022 16:49:00 GMT -5
_VK_NUMPAD appears to be failing on the odd numbers with "when characterInput".
EDIT: I was in a slight rush (and had one of those senior moments) when I posted this so a little more explanation is in order. Unless the NUMLOCK key is pressed, the LB Inkey$ function should not work at all when a number on the number pad is pressed, but it does and interprets the odd numbers as something different. The even numbers it interprets as arrow keys, hence there is no additional choice for the even numbers.
'
FUNCTION FN.RightChar(Key$, BYREF NewPosX, BYREF NewPosY)
DQ$ = CHR$(34)
NewPosX = 0
NewPosY = 0
Action = 0
Char$ = RIGHT$(Key$, 1)
SELECT CASE Char$
CASE Chr$(_VK_LEFT)
NewPosX = -1
Action = 1
CASE Chr$(_VK_RIGHT)
NewPosX = 1
Action = 1
CASE Chr$(_VK_DOWN)
NewPosY = 1
Action = 1
CASE Chr$(_VK_UP)
NewPosY = -1
Action = 1
CASE Chr$(_VK_UP)
NewPosY = -1
Action = 1
CASE Chr$(_VK_NUMPAD1), "#"
NewPosX = -1
NewPosY = 1
Action = 1
CASE Chr$(_VK_NUMPAD4)
NewPosX = -1
Action = 1
CASE Chr$(_VK_NUMPAD7), "$"
NewPosX = -1
NewPosY = -1
Action = 1
CASE Chr$(_VK_NUMPAD8)
NewPosY = 1
Action = 1
CASE Chr$(_VK_NUMPAD9), "!"
NewPosX = 1
NewPosY = -1
Action = 1
CASE Chr$(_VK_NUMPAD6)
NewPosX = 1
Action = 1
CASE Chr$(_VK_NUMPAD3), DQ$
NewPosX = 1
NewPosY = 1
Action = 1
CASE Chr$(_VK_NUMPAD2)
NewPosY = 1
Action = 1
END SELECT
FN.RightChar = Action
END FUNCTION
'