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

Update "help keys" output to include keycodes for ESC, F1-F12, and numpad keys #2299

Merged
merged 3 commits into from
Sep 10, 2023

Conversation

cdwfs
Copy link
Contributor

@cdwfs cdwfs commented Sep 10, 2023

This is a follow-up to #2245. It updates the list of keys and keycodes output by the help keys console command to include ESC, F1-F12, and the numpad keys. The new output:

>help keys
+------+-----+  +------+--------------+
| CODE | KEY |  | CODE | KEY          |
+------+-----+  +------+--------------+
|    1 | A   |  |   37 | MINUS        |
|    2 | B   |  |   38 | EQUALS       |
|    3 | C   |  |   39 | LEFTBRACKET  |
|    4 | D   |  |   40 | RIGHTBRACKET |
|    5 | E   |  |   41 | BACKSLASH    |
|    6 | F   |  |   42 | SEMICOLON    |
|    7 | G   |  |   43 | APOSTROPHE   |
|    8 | H   |  |   44 | GRAVE        |
|    9 | I   |  |   45 | COMMA        |
|   10 | J   |  |   46 | PERIOD       |
|   11 | K   |  |   47 | SLASH        |
|   12 | L   |  |   48 | SPACE        |
|   13 | M   |  |   49 | TAB          |
|   14 | N   |  |   50 | RETURN       |
|   15 | O   |  |   51 | BACKSPACE    |
|   16 | P   |  |   52 | DELETE       |
|   17 | Q   |  |   53 | INSERT       |
|   18 | R   |  |   54 | PAGEUP       |
|   19 | S   |  |   55 | PAGEDOWN     |
|   20 | T   |  |   56 | HOME         |
|   21 | U   |  |   57 | END          |
|   22 | V   |  |   58 | UP           |
|   23 | W   |  |   59 | DOWN         |
|   24 | X   |  |   60 | LEFT         |
|   25 | Y   |  |   61 | RIGHT        |
|   26 | Z   |  |   62 | CAPSLOCK     |
|   27 | 0   |  |   63 | CTRL         |
|   28 | 1   |  |   64 | SHIFT        |
|   29 | 2   |  |   65 | ALT          |
|   30 | 3   |  |   66 | ESC          |
|   31 | 4   |  |   67 | F1           |
|   32 | 5   |  |   68 | F2           |
|   33 | 6   |  |   69 | F3           |
|   34 | 7   |  |   70 | F4           |
|   35 | 8   |  |   71 | F5           |
|   36 | 9   |  |   72 | F6           |
|      |     |  |   73 | F7           |
|      |     |  |   74 | F8           |
|      |     |  |   75 | F9           |
|      |     |  |   76 | F10          |
|      |     |  |   77 | F11          |
|      |     |  |   78 | F12          |
|      |     |  |   79 | NUM0         |
|      |     |  |   80 | NUM1         |
|      |     |  |   81 | NUM2         |
|      |     |  |   82 | NUM3         |
|      |     |  |   83 | NUM4         |
|      |     |  |   84 | NUM5         |
|      |     |  |   85 | NUM6         |
|      |     |  |   86 | NUM7         |
|      |     |  |   87 | NUM8         |
|      |     |  |   88 | NUM9         |
|      |     |  |   89 | NUMPLUS      |
|      |     |  |   90 | NUMMINUS     |
|      |     |  |   91 | NUMMULTIPLY  |
|      |     |  |   92 | NUMDIVIDE    |
|      |     |  |   93 | NUMENTER     |
|      |     |  |   94 | NUMPERIOD    |
+------+-----+  +------+--------------+

Selfishly, it also adds my name to the contributors list in the README.

@cdwfs
Copy link
Contributor Author

cdwfs commented Sep 10, 2023

@nesbox I've also updated the key() wiki entry with the new keycodes. Note that the keycode list on tic80.com/learn should also be updated to match the new output, but that doesn't seem to be part of this repository.

@cdwfs cdwfs marked this pull request as draft September 10, 2023 04:07
@cdwfs cdwfs marked this pull request as ready for review September 10, 2023 04:13
@Skeptim
Copy link
Contributor

Skeptim commented Sep 10, 2023

Isn't it a problem that Esc, F7-F9 and F11 are already used for switching to menu, screenshots, full screen… ?

@nesbox
Copy link
Owner

nesbox commented Sep 10, 2023

@TimotheeGreg Yes, it's a problem, but anyway, you can handle them

@nesbox nesbox merged commit 4cee157 into nesbox:main Sep 10, 2023
31 checks passed
@Skeptim
Copy link
Contributor

Skeptim commented Sep 10, 2023

Ok, I'll just add a note to the wiki about that.

nesbox added a commit that referenced this pull request Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants