toptal/keycodes: a Next.js page that prints the KeyboardEvent values for any key you press
Easy visualizer for JavaScript KeyCodes
At a glance
- What is it?
- keycode.info is the hosted tool, and this repository is its Next.js and TypeScript source. It answers one question, what a pressed key reports, and leaves everything beyond that to you.
- Who is it for?
- Use keycode.info when you need the key or keyCode value a keyboard event reports, and clone this repository only if you want to change the site itself. Skip it if you need a keycode table for Unity, Roblox, Windows or Steam, because nothing in the project covers them.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 51 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 26, 2026, and from our analysis. They are not legal advice.
Star history
- toptal/keycodes2,154 ★ · -3
| Repository | 2026-10-09 | 2026-11-26 |
|---|---|---|
| toptal/keycodes | 2.2k | 2.2k |
-3 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Press a key, read the KeyboardEvent values back
The whole product is one interaction. You open keycode.info, press any key, and the page shows the JavaScript Key or Key Code from the KeyboardEvent that the browser fired. There is no form, no account and no input to configure. The repository description calls it an easy visualizer for JavaScript KeyCodes, and the homepage field points to https://keycode.info.
The project also ships an Event List alongside the tool. That is a reference page, so you can look up what a value means without owning the key in question. For a developer wiring up a keydown handler, that pairing covers the usual loop: press the key on your real keyboard, copy the value, move on.
The repository is toptal/keycodes, written in TypeScript and released under the MIT license. Its package.json names the package keycodes at version 0.1.0, and the repository has no GitHub releases, so there is no tagged version to pin to.
Two ways to start the development server, and they share port 3000
You need node and yarn on the machine. The local route is three steps: install dependencies with `yarn`, start the server with `yarn dev`, then open http://localhost:3000 in a browser. The dev script in package.json is next dev, so this is a stock Next.js development server.
The Docker route replaces the first two steps with one command:
docker-compose upThe docker-compose.yml defines a single service named app. It builds from the repository root, passes a user build argument that defaults to node through ${RUN_AS_USER:-node}, and maps 3000:3000. Its command is bash -c "yarn install && yarn dev", and the working tree is mounted at /app, so edits on your host reach the running container. Because yarn install runs inside the container on every start, the first boot is slower than later ones.
Neither route gives you a production build. For that you need the scripts described below.
The Dockerfile builds for production on node:16-slim, not for development
docker-compose.yml and the Dockerfile do different jobs. Compose runs the dev server. The Dockerfile starts from node:16-slim, creates /app owned by the user argument, copies package.json and yarn.lock first, runs yarn install, then copies the rest of the tree and runs yarn build.
Its last line is CMD yarn start -p $PORT, and the file sets ENV PORT 80. A container built from this file therefore listens on port 80 unless you override the variable, which differs from the 3000 you see in development. There is also a Dockerfile.deploy in the top-level listing, but only the plain Dockerfile is visible in the repository facts, so what the deploy variant changes is something you have to open the file to learn.
Node 16 is the base image. If your own machine runs a newer node for the local yarn route, the two paths do not run the same runtime.
A long script list means lint, type and visual checks run separately
package.json splits quality checks into distinct commands instead of one test target. `yarn lint` runs eslint over js, jsx, ts and tsx files, `yarn lint:fix` applies fixes, and `yarn lint:ci` adds --quiet. Styles have their own pair: `yarn lint:styles` runs stylelint over scss and css. `yarn types:check` runs tsc --noEmit --pretty.
Tests come in two layers. `yarn test:unit` calls jest with config/jest.config.js, and `yarn test:e2e` runs playwright. The e2e path has helpers around it: `yarn test:wait` waits up to 180000 milliseconds for http://localhost:3000 to answer, and `yarn build:e2e:start` cleans, builds with the babel config swapped in, and runs next start. The top-level files also include .happo.js and a happo script, which points to visual regression snapshots.
The cost is that a contributor has to know which of roughly a dozen scripts applies. Nothing wraps them into a single check command.
The babel build moves a config file in and out of place
The repository keeps babel_.config.js with an underscore, not babel.config.js. The build:babel script runs mv babel_.config.js babel.config.js, then next build, then moves the file back. The reason for the rename is not written in the files shown, but the effect is clear: a normal yarn build runs without a babel config, so Next.js uses its own compiler, and only the build:babel variants switch the babel config on.
The e2e build depends on that switch. build:e2e:clean removes .next and then runs build:babel, which is the path Playwright coverage runs would use alongside the E2E_COVERAGE=true flag and the nyc:report script.
A practical consequence: if the build:babel script is interrupted between the two moves, babel.config.js stays in the tree and later plain builds pick it up. Check git status after a failed e2e build before assuming the plain build is clean.
Picasso and Sentry tie the project to Toptal's own stack
The dependency list shows where the code comes from. The UI packages are @toptal/picasso at ^26.10.1, @toptal/picasso-provider and @toptal/utilities-ui-library, which are Toptal's own component libraries. Error reporting goes through @sentry/nextjs ^7.13.0, and the root holds sentry.client.config.js, sentry.server.config.js and sentry.properties. Next itself is pinned to ^12.2.4.
That has two effects if you fork the site. Reusing the code means pulling in Picasso, so you inherit its React and styling expectations. And the Sentry files are present in the tree, so a fork that does not want error reports sent to Toptal's project needs its own configuration. A .env.local.example sits at the root for local environment values, though its contents are not shown in the facts available here.
Next 12 is an older major line. Anyone upgrading has to move Picasso and the Sentry SDK in step.
No keycode tables for Unity, Roblox, Windows or Steam, and no stated maintenance promise
The tool reports what a browser KeyboardEvent carries. It does not document Unity input codes, Roblox keys, Windows virtual key codes, Steam keys or Alt codes, and none of those appear in the repository. If a search for a game engine or operating system brought you here, the page will not answer it, and the Event List covers JavaScript events only.
The repository is not archived, and the last push was on 6 October 2026. That shows someone touched it recently, but it carries no support commitment. There are no releases, and the contributing documents cover pull requests, coding guidelines, finding issues and using labels, not a response time. Feedback goes through issues, feature requests and upvotes, and the project follows the Contributor Covenant code of conduct.
The README is short and links to docs/01-testing.md, docs/02-linting.md and docs/03-logging.md for details it does not repeat. Open those before changing test or logging behavior.
Editorial conclusion
Use keycode.info when you need the key or keyCode value a keyboard event reports, and clone this repository only if you want to change the site itself. Skip it if you need a keycode table for Unity, Roblox, Windows or Steam, because nothing in the project covers them. Before relying on a number from the page, press the key on your own keyboard layout and read what the browser returns.
Frequently asked questions
What are keycodes in toptal/keycodes?
They are the Key and Key Code values of the JavaScript KeyboardEvent. The site at keycode.info shows them for whichever key you press.
How do I find my keycode with toptal/keycodes?
Open keycode.info and press the key. The page returns the JavaScript Key or Key Code for that KeyboardEvent right away.
How to use keycodes from the toptal/keycodes project?
Use the hosted tool at keycode.info, or run your own copy with yarn, then yarn dev, and open http://localhost:3000. Docker users can run docker-compose up instead.
What is key codes according to toptal/keycodes?
The project treats them as the values a JavaScript KeyboardEvent reports for a key press. It is built with Next.js and TypeScript and licensed under MIT.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/toptal-keycodes)Star history chart for your README
[](https://hysenlabs.com/projects/toptal-keycodes)Was this useful?