From 6d4f6f3f4965e3e71d878c36da71b745cc18e345 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Fri, 8 Mar 2019 07:30:02 +1100 Subject: [Docs] Add Tap Dance example to the docs (#5326) * add a tapdance example for creating advanced mod-tap and layer-tap keys * add optional curly braces to match QMK conventions * change example to use `register_code16()` and tapdance keycodes more closely matching QMK variants --- docs/contributing.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs/contributing.md') diff --git a/docs/contributing.md b/docs/contributing.md index 88b9d7d9b..15066185b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -129,6 +129,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/. +When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + ## Keymaps Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. -- cgit v1.2.3-24-g4f1b