[Docs] Clarify Zadig usage in FAQ Docs (#6360)
[jackhill/qmk/firmware.git] / docs / newbs_getting_started.md
CommitLineData
08e48eb6 1# Introduction
2
3dec80b7 3Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when buttons are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating the equivalent of an executable program for your keyboard.
08e48eb6 4
3dec80b7 5QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful keymaps — you only have to follow a few simple syntax rules.
08e48eb6 6
7# Getting Started
8
efe36046
M
9Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for.
10
11If you would prefer a more graphical user interface approach, please consider using the online [QMK Configurator](https://config.qmk.fm). Please refer to [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md).
12
08e48eb6 13
6a4e0893 14## Download Software
15
16### Text Editor
17
3dec80b7
18You'll need a program that can edit and save **plain text** files. If you're on Windows you can make do with Notepad, and on Linux you can use gedit. Both of these are simple but functional text editors. On macOS, be careful with the default TextEdit app: it will not save plain text files unless you explicitly select _Make Plain Text_ from the _Format_ menu.
19
20You can also download and install a dedicated text editor like [Sublime Text](https://www.sublimetext.com/) or [VS Code](https://code.visualstudio.com/). This is probably the best way to go regardless of platform, as these programs are specifically made for editing code.
6a4e0893 21
303f425c 22?> Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
6a4e0893 23
24### QMK Toolbox
08e48eb6 25
3dec80b7 26QMK Toolbox is an optional graphical program for Windows and macOS that allows you to both program and debug your custom keyboard. You will likely find it invaluable for easily flashing your keyboard and viewing debug messages that it prints.
06b36372 27
3dec80b7 28[Download the latest release here.](https://github.com/qmk/qmk_toolbox/releases/latest)
08e48eb6 29
3dec80b7
30* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer)
31* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer)
08e48eb6 32
3dec80b7 33## Set Up Your Environment
08e48eb6 34
3dec80b7 35We've tried to make QMK as easy to set up as possible. You only have to prepare your Linux or Unix environment, then let QMK install the rest.
08e48eb6 36
3dec80b7 37?> If you haven't worked with the Linux/Unix command line before, there are a few basic concepts and commands you should learn. These resources will teach you enough to be able to work with QMK:<br>
ccc87421 38[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
39[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
48e11240 40
08e48eb6 41### Windows
42
3dec80b7 43You will need to install MSYS2 and Git.
08e48eb6 44
3dec80b7
45* Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org).
46* Close any open MSYS2 terminals and open a new MSYS2 MinGW 64-bit terminal.
47* Install Git by running this command: `pacman -S git`.
08e48eb6 48
49### macOS
50
3dec80b7 51You will need to install Homebrew. Follow the instructions on the [Homebrew homepage](https://brew.sh).
08e48eb6 52
3dec80b7 53After Homebrew is installed, continue with _Set Up QMK_. In that step you will run a script that will install other packages.
06b36372 54
08e48eb6 55### Linux
56
3dec80b7 57You will need to install Git. It's very likely that you already have it, but if not, one of the following commands should install it:
08e48eb6 58
3dec80b7
59* Debian / Ubuntu / Devuan: `apt-get install git`
60* Fedora / Red Hat / CentOS: `yum install git`
08e48eb6 61* Arch: `pacman -S git`
62
3dec80b7 63?> Docker is also an option on all platforms. [Click here for details.](getting_started_build_tools.md#docker)
08e48eb6 64
3dec80b7
65## Set Up QMK
66
67Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands:
08e48eb6 68
161d469f
DJ
69```shell
70git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
71cd qmk_firmware
72```
08e48eb6 73
3dec80b7 74?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message.
08e48eb6 75
3dec80b7 76QMK comes with a script to help you set up the rest of what you'll need. You should run it now by typing in this command:
08e48eb6 77
3dec80b7 78 util/qmk_install.sh
08e48eb6 79
80## Test Your Build Environment
81
3dec80b7 82Now that your QMK build environment is set up, you can build a firmware for your keyboard. Start by trying to build the keyboard's default keymap. You should be able to do that with a command in this format:
08e48eb6 83
6a4e0893 84 make <keyboard>:default
08e48eb6 85
3dec80b7 86For example, to build a firmware for a Clueboard 66% you would use:
08e48eb6 87
6a4e0893 88 make clueboard/66/rev3:default
08e48eb6 89
90When it is done you should have a lot of output that ends similar to this:
91
92```
3dec80b7
93Linking: .build/clueboard_66_rev3_default.elf [OK]
94Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK]
95Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK]
96Checking file size of clueboard_66_rev3_default.hex [OK]
97 * The firmware size is fine - 26356/28672 (2316 bytes free)
08e48eb6 98```
6a4e0893 99
3dec80b7 100# Creating Your Keymap
6a4e0893 101
3dec80b7 102You are now ready to create your own personal keymap! Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.