Free Code Camp Hotkeys

freeCodeCamp has a number of hotkeys, so power users can get around quickly.

How to use the hotkeys

To use these hotkeys, you should press the keys in the order that they are shown. It’s important to note you should not press them at the same time.

Redirect hotkeys

gnn Redirects to the next challenge
gna Redirects to the about page
gnm Redirects to the map
gns Redirects to the shop
gno Redirects to the settings
gnr Redirects to the Free Code Camp GitHub repository
gnw Redirects to the forum

Editor hotkeys

These hotkeys should be pressed at the same time, not in order.

Ctrl + Enter Runs the tests. If the previous time the tests were succesful, this submits the challenge and goes to the next one
Ctrl + / Comments or uncomments the current line or selected code

We use CodeMirror as our editor. Here’s a list of CodeMirror’s default hotkeys.

Other hotkeys

gm Toggle the map drawer
gtn Toggle night mode
gc Toggle the main chat (Gitter)

Esc If you press this while the search input is in focus, it empties out the input

9 Likes

@systimotic this is an excellent list of hotkeys! Thank you for putting this together. I didn’t know many of these :slight_smile:

I’m assigning your article to Camperbot in keeping with our wiki guidelines.

2 Likes

Thank you for picking this up Quincy :slight_smile:
I messaged Rafael right after posting to do the transfer as per the guidelines, but he didn’t respond yet.

I happened to run into some issues around keyboard shortcuts, as well as your issue about a legend which I think was misunderstood. I was creating a PR for some a different shortcut and found the file that listed all of these, so I figured I should compose a wiki post, as the only way to find out before was looking at the source code.

Edit: I think the transfer may have exposed a bug, my profile showed I had -1 posts :smile:

2 Likes

@systimotic that is one super-specific bug, but it might be worth reporting the steps to reproduce on meta.discourse.org if you have time :slight_smile:

It seems to be “g t n” for night mode.
Does anyone know how to unfocus the cursor without using the mouse, so that one can enter these?

Oops, yep, it is g t n on the live site! I used the source code as a reference, it will be g t c beta is released.

A way to unfocus the editor would be really nice to have. In Firefox, pressing F6 twice works as a workaround, but this doesn’t work in Chrome. I’m putting this on my ToDo list :slight_smile:.

Edit: I typed g t n for both the live site and beta…

1 Like

Ooookkkkk… So I just checked this again, and the hotkey is most definitely g t n in every single version I could find. I could’ve sworn I checked the source last time I posted and tested it as well, but I can’t find a single mention of g t c anywhere in the code.
I guess I must’ve switched them around in testing, which explains why I wrote g t n for both of them in my previous post.
Thanks for reporting @hopperkremer, sorry for my mess-ups.

1 Like

Seems no one mentions Ctrl+D is used to delete current line in Editor

1 Like

@LuongMPham Good point! This list was missing a lot of hotkeys you could use in the editor. I added a link that lists all of them.