Skip to content

Commit

Permalink
Rework the newbs guide around the qmk cli
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed Mar 6, 2020
1 parent 1b7fa46 commit a701c15
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 354 deletions.
17 changes: 16 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## What is QMK Firmware?

QMK (*Quantum Mechanical Keyboard*) is an open source community centered around developing computer input devices. Early on the community was keyboard focused, but has now grown to include mice and MIDI devices as well. The community maintains [QMK Firmware](https://github.com/qmk/qmk_firmware), [QMK Configurator](https://config.qmk.fm), [QMK Toolbox](https://github.com/qmk/qmk_toolbox), [qmk.fm](https://qmk.fm), and this documentation.
QMK (*Quantum Mechanical Keyboard*) is an open source community centered around developing computer input devices. The community encompasses all sorts of input devices, such as keyboards, mice, and MIDI devices. A core group of collaborators maintains [QMK Firmware](https://github.com/qmk/qmk_firmware), [QMK Configurator](https://config.qmk.fm), [QMK Toolbox](https://github.com/qmk/qmk_toolbox), [qmk.fm](https://qmk.fm), and this documentation with the help of community members like you.

## Get Started

Expand All @@ -18,9 +18,24 @@ Totally new to QMK? There are two ways to get started:
* Basic: [QMK Configurator](https://config.qmk.fm)
* Just select your keyboard from the dropdown and program your keyboard.
* We have an [introductory video](https://www.youtube.com/watch?v=-imgglzDMdY) you can watch.
* There is also an overview [document you can read](newbs_building_firmware_configurator.md).
* Advanced: [Use The Source](newbs.md)
* More powerful, but harder to use

## Make It Yours

QMK has lots of [features](features.md) to explore, and a good deal of reference documentation to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).

## Need help?

Check out the [support page](getting_started_getting_help.md) to see how you can get help using QMK.

## Give Back

There are a lot of ways you can contribute to the QMK Community. The easiest way to get started is to use it and spread the word to your friends.

* Help people out on our forums and chat rooms:
* [/r/olkb](https://www.reddit.com/r/olkb/)
* [Discord Server](https://discord.gg/Uq7gcHh)
* Contribute to our documentation by clicking "Edit This Page" at the bottom
* [Translate our documentation into your language](translating.md)
5 changes: 3 additions & 2 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* [Driver Installation with Zadig](driver_installation_zadig.md)

* Using QMK
* [Support](support.md)
* [Support](getting_started_getting_help.md)
* Guides
* [ARM Debugging Guide](arm_debugging.md)
* [Best Git Practices](newbs_git_best_practices.md)
Expand All @@ -37,7 +37,8 @@
* [Vagrant Guide](getting_started_vagrant.md)

* QMK Features
* [Keycodes](keycodes.md)
* Keycodes
* [Full List](keycodes.md)
* [Basic Keycodes](keycodes_basic.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
* [Quantum Keycodes](quantum_keycodes.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/de/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
* Andere Themen
* [Eclipse mit QMK](de/other_eclipse.md)
* [VSCode mit QMK](de/other_vscode.md)
* [Support](de/support.md)
* [Support](de/getting_started_getting_help.md)
* [Übersetzungen](de/translating.md)

* QMK Internals (In Progress)
Expand Down
2 changes: 1 addition & 1 deletion docs/es/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
* Otros temas
* [Usando Eclipse con QMK](es/other_eclipse.md)
* [Usando VSCode con QMK](es/other_vscode.md)
* [Soporte](es/support.md)
* [Soporte](es/getting_started_getting_help.md)
* [Cómo añadir traducciones](es/translating.md)

* QMK Internals (En progreso)
Expand Down
38 changes: 38 additions & 0 deletions docs/faq_general.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,44 @@

[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).

## I don't know where to start!

If this is the case, then you should start with our [Newbs Guide](newbs.md). There is a lot of great info there, and that should cover everything you need to get started.

If that's an issue, hop onto the [QMK Configurator](https://config.qmk.fm), as that will handle a majority of what you need there.

## How can I flash the firmware I built?

First, head to the [Compiling/Flashing FAQ Page](faq_build.md). There is a good deal of info there, and you'll find a bunch of solutions to common issues there.

## What if I have an issue that isn't covered here?

Okay, that's fine. Then please check the [open issues in our GitHub](https://github.com/qmk/qmk_firmware/issues) to see if somebody is experiencing the same thing (make sure it's not just similar, but actually the same).

If you can't find anything, then please open a [new issue](https://github.com/qmk/qmk_firmware/issues/new)!

## What if I found a bug?

Then please open an [issue](https://github.com/qmk/qmk_firmware/issues/new), and if you know how to fix it, open up a Pull Request on GitHub with the fix.

## But `git` and `GitHub` are intimidating!

Don't worry, we have some pretty nice [Guidelines](newbs_git_best_practices.md) on how to start using `git` and GitHub to make things easier to develop.

Additionally, you can find additional `git` and GitHub related links [here](newbs_learn_more_resources.md).

## I have a Keyboard that I want to add support for

Awesome! Open up a Pull Request for it. We'll review the code, and merge it!

### What if I want to do brand it with `QMK`?

That's amazing! We would love to assist you with that!

In fact, we have a [whole page](https://qmk.fm/powered/) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.

If you have any questions about this, open an issue or head to [Discord](https://discord.gg/Uq7gcHh).

## What Differences Are There Between QMK and TMK?

TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
Expand Down
2 changes: 1 addition & 1 deletion docs/fr-fr/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
* Autres sujets
* [Utiliser Eclipse avec QMK](fr-fr/other_eclipse.md)
* [Utiliser VSCode avec QMK](fr-fr/other_vscode.md)
* [Support](fr-fr/support.md)
* [Support](fr-fr/getting_started_getting_help.md)
* [Comment ajouter des traductions](fr-fr/translating.md)

* À l’intérieur de QMK (En cours de documentation)
Expand Down
4 changes: 3 additions & 1 deletion docs/getting_started_getting_help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

There are a lot of resources for getting help with QMK.

Please read our [Code of Conduct](https://qmk.fm/coc/) before participating in any of our community spaces.

## Realtime Chat

You can find QMK developers and users on our main [Discord server](https://discord.gg/Uq7gcHh). There are specific channels in the server for chatting about the firmware, Toolbox, hardware, and configurator.
If you need help with something, the best place to get quick support is going to be on our [Discord Server](https://discord.gg/Uq7gcHh). There is usually somebody online, and there are a bunch of very helpful people there.

## OLKB Subreddit

Expand Down
2 changes: 1 addition & 1 deletion docs/he-il/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
* נושאים נוספים
* [שימוש ב - Eclipse עם QMK](he-il/other_eclipse.md)
* [שימוש ב - VSCode עם QMK](he-il/other_vscode.md)
* [תמיכה](he-il/support.md)
* [תמיכה](he-il/getting_started_getting_help.md)
* [כיצד להוסיף תרגום](he-il/translating.md)

* QMK מבפנים (בתהליך)
Expand Down
2 changes: 1 addition & 1 deletion docs/ja/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
* 他の話題
* [Eclipse で QMK を使用](ja/other_eclipse.md)
* [VSCode で QMK を使用](ja/other_vscode.md)
* [サポート](ja/support.md)
* [サポート](ja/getting_started_getting_help.md)
* [翻訳を追加する方法](ja/translating.md)

* QMK の内部詳細(作成中)
Expand Down
21 changes: 12 additions & 9 deletions docs/newbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.

Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.

## Is This Guide For Me?

This guide is suitable for everyone who wants to build a keyboard firmware using the source code. If you are already a programmer you will find the process very familiar and easier to follow. If the thought of programming intimidates you please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.

## Overview

There are 7 main sections to this guide:
There are 6 main sections to this guide:

* [Getting Started](newbs_getting_started.md)
* [Building Your First Firmware using the command line](newbs_building_firmware.md)
* [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md)
* [Flashing Firmware](newbs_flashing.md)
* [Testing and Debugging](newbs_testing_debugging.md)
* [Best Git Practices](newbs_git_best_practices.md)
* [Learn More with these Resources](newbs_learn_more_resources.md)
1. [Getting Started](newbs_getting_started.md)
2. [Building Your First Firmware](newbs_building_firmware.md)
3. [Flashing Firmware](newbs_flashing.md)
4. [Testing and Debugging](newbs_testing_debugging.md)
5. [Best Git Practices](newbs_git_best_practices.md)
6. [Learn More with these Resources](newbs_learn_more_resources.md)

This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).

Expand Down
46 changes: 14 additions & 32 deletions docs/newbs_building_firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,29 @@

Now that you have setup your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware.

If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory.
## Create a New Keymap

## Navigate To Your Keymaps Folder
To create your own keymap you'll want to create a copy of the `default` keymap. If you configured your build environment in the last step you can do that easily with the QMK CLI:

Start by navigating to the `keymaps` folder for your keyboard.
qmk new-keymap

If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
If you did not configure your environment, or you have multiple keyboards, you can specify a keyboard name:

### macOS:
qmk new-keymap -kb <keyboard_name>

``` open keyboards/<keyboard_folder>/keymaps ```
Look at the output from that command, you should see something like this:

### Windows:
Ψ <github_username> keymap directory created in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/<github_username>

``` start .\\keyboards\\<keyboard_folder>\\keymaps ```

## Create a Copy Of The `default` Keymap

Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.

To automate the process, you also have the option to run the `new_keymap.sh` script.

Navigate to the `qmk_firmware/util` directory and type the following:

```
./new_keymap.sh <keyboard path> <username>
```

For example, for a user named John, trying to make a new keymap for the 1up60hse, they would type in

```
./new_keymap.sh 1upkeyboards/1up60hse john
```
This is the location of your new `keymap.c` file.

## Open `keymap.c` In Your Favorite Text Editor

Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
Open your `keymap.c` file in your text editor. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a particular layer.
This line indicates where the list of Layers begins. Below that you'll find lines containing `LAYOUT`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a particular layer.

!> When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.

Expand All @@ -58,13 +40,13 @@ How to complete this step is entirely up to you. Make the one change that's been

## Build Your Firmware

When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the compile command:

make <my_keyboard>:<my_keymap>
qmk compile

For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
If you did not configure your environment, or you have multiple keyboards, you can specify a keyboard and/or keymap:

make planck/rev5:xyverz
qmk compile -kb <keyboard> -km <keymap>

While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this:

Expand Down
Loading

0 comments on commit a701c15

Please sign in to comment.