Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed character numbers for windows #75

Closed
wants to merge 1 commit into from

Conversation

computermax11
Copy link

The readkey code uses getch to get the character number for the arrow keys in windows, but it uses the formula a + ( b * 256 ) to get the character numbers. a being the escape with value 224. In the xlate_dict the numbers do not include the extra 224 from a so the keys don't work.

@Cube707
Copy link
Collaborator

Cube707 commented Apr 6, 2022

This is very funny, as #65 did the exact opposit XD.

This is a generall problem with the lookuptable. the value for a can be both 0 or 224 (no Idea when its which value). The table only contains lookups for one of this cases and is currently not consistent in which values are used. (#66 explains this in detail)

I fixed this and a few more windows specific things in #71, which still waits on beeing merged.

@Cube707 Cube707 mentioned this pull request Jul 15, 2022
@Cube707 Cube707 closed this in #76 Jul 24, 2022
Cube707 added a commit that referenced this pull request Jul 24, 2022
the windows scancodes consist of two bytes, the first denoting a
special scancode and the second being the actual key information.
Previously both bytes where used to calculate the number to look up in a
dictionary, but as only the second byte is actually different, this can
be simplified.

closes #75, closes #66, closes #9, closes #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants