Skip to content

INKEY With Negative values #43

@StefanMyczko

Description

@StefanMyczko

INKEY does not appear to support the option to use negative numbers to check if a particular key is being pressed, it looks as if its treating the negative as just a large number and waiting a long time before continuing.

From https://www.bbcbasic.co.uk/bbcwin/tutorial/chapter13.html

INKEY (not INKEY$) has an extended functionality in that it can be used to test for individual keys being pressed. To do this, we give it a negative argument. The table of values used to represent the required key is not related to the ASCII code and is given in full in the help files under INKEY / INKEY$. When used in this way, it returns immediately with a value of TRUE (–1) or FALSE (0) depending on whether the required key was pressed. Again, this is really good for games:

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or request

    Projects

    Status

    Won't Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions