Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and jackhumbert committed Dec 9, 2017
1 parent af37bb2 commit bb53635
Show file tree
Hide file tree
Showing 28 changed files with 88 additions and 88 deletions.
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely

We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.

* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your code change actually compiles.
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
Expand Down Expand Up @@ -111,7 +111,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke

Keyboards are the raison d'être for QMK. Some keyboards are community maintained, while others are maintained by the people responsible for making a particular keyboard. The `readme.md` should tell you who maintains a particular keyboard. If you have questions relating to a particular keyboard you can [Open An Issue](https://github.com/qmk/qmk_firmware/issues) and tag the maintainer in your question.

We also ask that you follow these guidelines:
We also ask that you follow these guidelines:

* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
* Keep the number of commits reasonable or we will squash your PR
Expand All @@ -136,7 +136,7 @@ Here are some things to keep in mind when working on your feature or bug fix.
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.

We also ask that you follow these guidelines:
We also ask that you follow these guidelines:

* Keep the number of commits reasonable or we will squash your PR
* Do not lump keyboards or keymaps in with core changes. Submit your core changes first.
Expand Down
8 changes: 4 additions & 4 deletions docs/custom_quantum_functions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to Customize Your Keyboard's Behavior

For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.

This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level.

Expand Down Expand Up @@ -66,7 +66,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {

### `process_record_*` Function Documentation

* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`

The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events.
Expand Down Expand Up @@ -130,7 +130,7 @@ void led_set_kb(uint8_t usb_led) {

### `led_set_*` Function Documentation

* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
* Keymap: `void led_set_user(uint8_t usb_led)`

# Matrix Initialization Code
Expand All @@ -155,7 +155,7 @@ void matrix_init_kb(void) {

### `matrix_init_*` Function Documentation

* Keyboard/Revision: `void matrix_init_kb(void)`
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`

# Matrix Scanning Code
Expand Down
12 changes: 6 additions & 6 deletions docs/faq_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page covers questions about building QMK. If you have not yet you should re
You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.

In short when your controller is ATMega32u4,

$ sudo dfu-programmer atmega32u4 erase --force
$ sudo dfu-programmer atmega32u4 flash your.hex
$ sudo dfu-programmer atmega32u4 reset
Expand Down Expand Up @@ -81,11 +81,11 @@ make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.

```
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 2048
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 2048
# Atmel DFU loader 4096 (TMK Alt Controller)
# LUFA bootloader 4096
# USBaspLoader 2048
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=2048
```
18 changes: 9 additions & 9 deletions docs/faq_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad
Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
```
# Size of Bootloaders in bytes:
# Atmel DFU loader(ATmega32U4) 4096
# Atmel DFU loader(AT90USB128) 8192
# LUFA bootloader(ATmega32U4) 4096
# Arduino Caterina(ATmega32U4) 4096
# USBaspLoader(ATmega***) 2048
# Teensy halfKay(ATmega32U4) 512
# Atmel DFU loader(ATmega32U4) 4096
# Atmel DFU loader(AT90USB128) 8192
# LUFA bootloader(ATmega32U4) 4096
# Arduino Caterina(ATmega32U4) 4096
# USBaspLoader(ATmega***) 2048
# Teensy halfKay(ATmega32U4) 512
# Teensy++ halfKay(AT90USB128) 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
```
Expand All @@ -135,14 +135,14 @@ byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
| | | |
| | | |
| Application | | Application |
| | | |
| | | |
= = = =
| | 32KB-4KB | | 128KB-8KB
0x6000 +---------------+ 0x1E000 +---------------+
| Bootloader | 4KB | Bootloader | 8KB
0x7FFF +---------------+ 0x1FFFF +---------------+
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
0x0000 +---------------+ 0x00000 +---------------+
| | | |
Expand Down Expand Up @@ -230,7 +230,7 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).

As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.

https://github.com/tmk/tmk_keyboard/issues/266
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
Expand Down
4 changes: 2 additions & 2 deletions docs/faq_keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For Modifier keys and layer actions you have to place `KC_TRANS` on same positio
## Mechanical Lock Switch Support

This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`:

```
#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE
Expand Down Expand Up @@ -187,7 +187,7 @@ ___TO BE IMPROVED___
real_mods is intended to retains state of real/physical modifier key state, while
weak_mods retains state of virtual or temporary modifiers which should not affect state real modifier key.

Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),

with weak_mods,
* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If you are just getting started with QMK you will want to keep everything simple
### Intermediate Users
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
### Advanced Users
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif

## Music Mode

The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.

Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.

Expand Down
2 changes: 1 addition & 1 deletion docs/feature_dynamic_macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For users of the earlier versions of dynamic macros: It is still possible to fin
```c
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/feature_layouts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Layouts: Using a Keymap with Multiple Keyboards

The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
The `layouts/` folder contains different physical key layouts that can apply to different keyboards.

```
layouts/
Expand All @@ -21,7 +21,7 @@ layouts/
| + ...
```

The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.
The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.

Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:

Expand Down
4 changes: 2 additions & 2 deletions docs/feature_macros.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Macros

Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.

{% hint style='danger' %}
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor.
Expand Down Expand Up @@ -245,7 +245,7 @@ This will clear all keys besides the mods currently pressed.
## Advanced Example: Single-Key Copy/Paste
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
```c
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ These enable settings supported by the PS/2 mouse protocol: http://www.computer-

```
/* Use remote mode instead of the default stream mode (see link) */
#define PS2_MOUSE_USE_REMOTE_MODE
#define PS2_MOUSE_USE_REMOTE_MODE
/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
#define PS2_MOUSE_ENABLE_SCROLLING
Expand Down
8 changes: 4 additions & 4 deletions docs/feature_tap_dance.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_HOLD = 4,
DOUBLE_HOLD = 4,
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
// Add more enums here if you want for triple, quadruple, etc.
// Add more enums here if you want for triple, quadruple, etc.
};
typedef struct {
Expand All @@ -209,14 +209,14 @@ int cur_dance (qk_tap_dance_state_t *state) {
if (state->interrupted) return DOUBLE_SINGLE_TAP;
else if (state->pressed) return DOUBLE_HOLD;
else return DOUBLE_TAP;
}
}
else return 6; //magic number. At some point this method will expand to work for more presses
}
//**************** Definitions needed for quad function to work *********************//
//instanalize an instance of 'tap' for the 'x' tap dance.
static tap xtap_state = {
static tap xtap_state = {
.is_press_action = true,
.state = 0
};
Expand Down
8 changes: 4 additions & 4 deletions docs/feature_terminal.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ Prints out the entire keymap for a certain layer

```
> keymap 0
0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f,
>
>
```

### `exit`
Expand Down
10 changes: 5 additions & 5 deletions docs/feature_userspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ All this only happens when you build a keymap named `<name>`, like this:

make planck:<name>

For example,
For example,

make planck:jack

Expand All @@ -32,9 +32,9 @@ Please include authorship (your name, github username, email), and optionally [a

For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` .

### Consolidated Macros
### Consolidated Macros

If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps.
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps.

First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes

Expand All @@ -47,7 +47,7 @@ Once you've done that, you'll want to set the keycode definitions that you need
#include "quantum.h"
// Define all of
// Define all of
enum custom_keycodes {
KC_MAKE = SAFE_RANGE,
NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
Expand Down Expand Up @@ -90,6 +90,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
```

This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.

Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
Loading

0 comments on commit bb53635

Please sign in to comment.