]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/home.md
Added whitefox keymap
[qmk_firmware.git] / docs / home.md
1 # Quantum Mechanical Keyboard Firmware
2
3 You have found the QMK Firmware documentation site. This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) \([view differences](differences_from_tmk.md)\) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.
4
5 # Getting started
6
7 Before you are able to compile, you'll need to install an environment for AVR or ARM development. You'll find the instructions for any OS below. If you find another/better way to set things up from scratch, please consider [making a pull request](https://github.com/qmk/qmk_firmware/pulls) with your changes!
8
9 * [Build Environment Setup](build_environment_setup.md)
10 * [QMK Overview](qmk_overview.md)
11
12 # Configuring QMK Firmware
13
14 The QMK Firmware can be configured via the `keymaps` array data. For simply generating a [basic keycode](keycodes.md), you add it as an element of your `keymaps` array data. For more complicated actions, there are more advanced keycodes that are organized carefully to represent common operations, some of which can be found on the [Key Functions](key_functions.md) page.
15
16 For more details of the `keymaps` array, see [Keymap Overview](keymap.md) page.
17
18 ## Space Cadet Shift: The future, built in
19
20 Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it.
21
22 ## The Leader key: A new kind of modifier
23
24 Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page.
25
26 ## Tap Dance: A single key can do 3, 5, or 100 different things
27
28 Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](tap_dance.md) page.
29
30 ## Temporarily setting the default layer
31
32 `DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
33
34 ## Macro shortcuts: Send a whole string when pressing just one key
35
36 How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros.
37
38 ## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
39
40 Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
41
42 ```
43 #include <keymap_colemak.h>
44 ```
45
46 If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
47
48 * `CM_*` for all of the Colemak-equivalent characters
49 * `DV_*` for all of the Dvorak-equivalent characters
50
51 These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
52
53 To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
54
55 ## Backlight Breathing
56
57 In order to enable backlight breathing, the following line must be added to your config.h file.
58
59 ```
60 #define BACKLIGHT_BREATHING
61 ```
62
63 The following function calls are used to control the breathing effect.
64
65 * `breathing_enable()` - Enable the free-running breathing effect.
66 * `breathing_disable()` - Disable the free-running breathing effect immediately.
67 * `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
68 * `breathing_toggle()` - Toggle the free-running breathing effect.
69 * `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
70
71 The following function calls are used to control the maximum brightness of the breathing effect.
72
73 * `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
74 * `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
75
76 The following function calls are used to control the cycling speed of the breathing effect.
77
78 * `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
79 * `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
80 * `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
81 * `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
82
83 The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
84
85 ```
86 case MACRO_FUNCTION:
87     if (record->event.pressed)
88     {
89         breathing_speed_set(3);
90         breathing_enable();
91         layer_on(LAYER_FUNCTION);
92     }
93     else
94     {
95         breathing_speed_set(1);
96         breathing_self_disable();
97         layer_off(LAYER_FUNCTION);
98     }
99     break;
100 ```
101
102 The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
103
104 ```
105 case MACRO_RAISED:
106   if (record->event.pressed)
107   {
108     layer_on(LAYER_RAISED);
109     breathing_speed_set(2);
110     breathing_pulse();
111     update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
112   }
113   else
114   {
115     layer_off(LAYER_RAISED);
116     update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
117   }
118   break;
119 ```
120
121 ## Other firmware shortcut keycodes
122
123 * `RESET` - puts the MCU in DFU mode for flashing new firmware \(with `make dfu`\)
124 * `DEBUG` - the firmware into debug mode - you'll need hid\_listen to see things
125 * `BL_ON` - turns the backlight on
126 * `BL_OFF` - turns the backlight off
127 * `BL_<n>` - sets the backlight to level _n_
128 * `BL_INC` - increments the backlight level by one
129 * `BL_DEC` - decrements the backlight level by one
130 * `BL_TOGG` - toggles the backlight
131 * `BL_STEP` - steps through the backlight levels
132
133 Enable the backlight from the Makefile.
134