Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/qmk/qmk_firmware
Browse files Browse the repository at this point in the history
* 'master' of git://github.com/qmk/qmk_firmware: (106 commits)
  fix implementation issues from SSD1306 clean up, added rotation (qmk#1494)
  Fix printf error in make output on msys2
  Fix bitfield problem when compiling in native mingw
  clean up ssd1306 implementation
  update drivers to exclude lets_split include
  Adds Hadron Keyboard (qmk#1492)
  Updates maartenwut's keymap (qmk#1489)
  Fix unreferenced errors with mingw compiler and unit tests
  Add more dependencies, everything can be compiled now
  Add tools to the path
  Extract flip
  Install arm toolchain
  Download and extract avr tools
  Fix overlong lines, and a few spelling errors
  Use home directory for download on msys2
  Adds Minidox Keyboard (qmk#1487)
  Update README.md
  Start mvoing hardware drivers to /drivers/ (qmk#1433)
  Install unzip
  Add symlinks only on WSL
  ...
  • Loading branch information
akatrevorjay committed Jul 13, 2017
2 parents d5e59c9 + 6ed8ce4 commit ba20898
Show file tree
Hide file tree
Showing 1,932 changed files with 345,838 additions and 52,282 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ quantum/version.h
CMakeLists.txt
.DS_STORE
/util/wsl_downloaded
/util/win_downloaded

# Eclipse/PyCharm/Other IDE Settings
.cproject
Expand All @@ -32,7 +33,9 @@ CMakeLists.txt
.browse.VC.db*
*.stackdump
util/Win_Check_Output.txt
.vscode
# Let these ones be user specific, since we have so many different configurations
.vscode/launch.json
.vscode/tasks.json
.stfolder

# trevorj
Expand Down
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Place your settings in this file to overwrite default and user settings.
{
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/.build": true,
"**/*.hex": true
},
"files.associations": {
"*.h": "c",
"*.c": "c",
"*.cpp": "cpp",
"*.hpp": "cpp"
}
}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ define RUN_TEST
+error_occurred=0;\
$($(TEST)_COMMAND)\
if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;


endef

# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
Expand Down
47 changes: 31 additions & 16 deletions book.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
{
"structure": {
"readme": "home.md",
"summary": "_summary.md"
},
"plugins" : ["toolbar", "edit-link", "anchors"],
"plugins" : [
"anchors",
"edit-link",
"forkmegithub",
"git-author",
"hints",
"numbered-headings",
"page-toc",
"terminal",
"toolbar"
],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/qmk/qmk_firmware/edit/master/docs",
"label": "Suggest an edit"
},
"toolbar": {
"buttons":
[
{
"label": "QMK Firmware",
"icon": "fa fa-github",
"url": "https://github.com/qmk/qmk_firmware"
}
]
}
"edit-link": {
"base": "https://github.com/qmk/qmk_firmware/edit/master/docs",
"label": "Suggest an edit"
},
"forkmegithub": {
"color": "red",
"url": "https://github.com/qmk/qmk_firmware"
},
"page-toc": {
"selector": ".markdown-section h1, .markdown-section h2"
},
"toolbar": {
"buttons": [
{
"label": "QMK Firmware",
"icon": "fa fa-github",
"url": "https://github.com/qmk/qmk_firmware"
}
]
}
},
"root": "./docs/"
}
6 changes: 4 additions & 2 deletions build_full_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
TEST_PATH=tests/$(TEST)

$(TEST)_SRC= \
$(TEST_PATH)/test.cpp \
$(TEST_PATH)/keymap.c \
$(TMK_COMMON_SRC) \
$(QUANTUM_SRC) \
tests/test_common/matrix.c \
tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \
tests/test_common/test_fixture.cpp
$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))

$(TEST)_DEFS=$(TMK_COMMON_DEFS)
$(TEST)_CONFIG=$(TEST_PATH)/config.h
VPATH+=$(TOP_DIR)/tests/test_common
VPATH+=$(TOP_DIR)/tests/test_common
6 changes: 5 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ LIB_PATH = $(TOP_DIR)/lib
QUANTUM_DIR = quantum
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)

DRIVER_DIR = drivers
DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR)

BUILD_DIR := $(TOP_DIR)/.build

COMMON_VPATH := $(TOP_DIR)
Expand All @@ -17,4 +20,5 @@ COMMON_VPATH += $(QUANTUM_PATH)
COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
COMMON_VPATH += $(QUANTUM_PATH)/audio
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(DRIVER_PATH)
2 changes: 1 addition & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif

ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes
Expand Down
25 changes: 25 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Quantum Mechanical Keyboard Firmware

## What is QMK Firmware? {#what-is-qmk-firmware}

QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) 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.

## How to get it {#how-to-get-it}

If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork.

Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`[email protected]:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`).

## How to compile {#how-to-compile}

Before you are able to compile, you'll need to [install an environment](build_environment_setup.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:

make planck-rev4-default

This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects), in which case, it can be omitted:

make preonic-default

## How to customize {#how-to-customize}

QMK has lots of [features](features/README.md) to explore, and a good deal of [reference documentation](reference/README.md) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
69 changes: 41 additions & 28 deletions docs/_summary.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
* [Getting started](README.md)
* [QMK Overview](qmk_overview.md)
* [Build Environment Setup](build_environment_setup.md)
* [Vagrant Guide](vagrant_guide.md)
* [Make instructions](make_instructions.md)
* [FAQ: Creating a Keymap](faq_keymap.md)
* [FAQ: Compiling QMK](faq_build.md)
* [How to Github](how_to_github.md)

### Getting started
* [Introduction](home.md)
* [QMK Overview](qmk_overview.md)
* [Build Environment Setup](build_environment_setup.md)
* [Make instructions](make_instructions.md)
* [Features](features/README.md)
* [Layer switching](key_functions.md)
* [Leader Key](leader_key.md)
* [Macros](macros.md)
* [Dynamic Macros](dynamic_macros.md)
* [Space Cadet](space_cadet_shift.md)
* [Tap Dance](tap_dance.md)
* [Mouse keys](mouse_keys.md)
* [Unicode](unicode.md)

### Making a keymap
* [Keymap overview](keymap.md)
* [Custom Quantum Functions](custom_quantum_functions.md)
* [Keycodes](keycodes.md)
* [Layer switching](key_functions.md)
* [Leader Key](leader_key.md)
* [Macros](macros.md)
* [Dynamic Macros](dynamic_macros.md)
* [Space Cadet](space_cadet_shift.md)
* [Tap Dance](tap_dance.md)
* [Mouse keys](mouse_keys.md)
* [FAQ: Creating a Keymap](faq_keymap.md)
* [FAQ: Compiling QMK](faq_build.md)
* Reference
* [Glossary](glossary.md)
* [Keymap overview](keymap.md)
* [Keycodes](keycodes.md)
* [Basic Keycodes](basic_keycodes.md)
* [Quantum Keycodes](quantum_keycodes.md)
* [The `config.h` File](config_options.md)
* [Customizing Functionality](custom_quantum_functions.md)
* [Documentation Best Practices](documentation_best_practices.md)
* [Unit Testing](unit_testing.md)

### For hardware makers and modders
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
* [Modding your keyboard](modding_your_keyboard.md)
* [Adding features to QMK](adding_features_to_qmk.md)
* [ISP flashing guide](isp_flashing_guide.md)
* For Makers and Modders
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
* [Adding features to QMK](adding_features_to_qmk.md)
* [Hand Wiring Guide](hand_wiring.md)
* [ISP flashing guide](isp_flashing_guide.md)
* [Modding your keyboard](modding_your_keyboard.md)
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)

* For a Deeper Understanding
* [How Keyboards Work](basic_how_keyboards_work.md)
* [Understanding QMK](understanding_qmk.md)

### Other topics
* [General FAQ](faq.md)
* [Differences from TMK](differences_from_tmk.md)
* [Using Eclipse with QMK](eclipse.md)
* Other Topics
* [General FAQ](faq.md)
* [Using Eclipse with QMK](eclipse.md)
17 changes: 13 additions & 4 deletions docs/adding_features_to_qmk.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK! These are generally done via [pull request](https://github.com/qmk/qmk_firmware/pulls) after forking, and here are some things to keep in mind when creating one:
# How To Add Features To QMK

* **Disable by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, [open an issue](https://github.com/qmk/qmk_firmware/issues) for everyone to discuss it!
If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK!

Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.html), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:

* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)

Once you have implemented your new feature you will generally submit a [pull request](https://github.com/qmk/qmk_firmware/pulls). Here are some things to keep in mind when creating one:

* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work.
* **Explain your feature** - submitting a markdown write-up of what your feature does with your PR may be needed, and it will allow a collaborator to easily copy it into the wiki for documentation (after proofing and editing).
* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues).
* **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.
* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues).
58 changes: 17 additions & 41 deletions docs/basic_how_keyboards_work.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ in the next sections.
Whenever you press a key, the firmware of your keyboard can register this event.
It can register when the key is pressed, held and released.

This usually happens with a [periodic scan of key presses with a frequency around 100 hz](https://github.com/benblazak/ergodox-firmware/blob/master/references.md#typical-keyboard-information).
This speed often is limited by the mechanical key response time, the protocol
to transfer those key presses (here USB HID), and by the software it is used in.
This usually happens with a periodic scan of key presses. This speed often is limited by the mechanical key response time, the protocol to transfer those key presses (here USB HID), and by the software it is used in.

## 2. What the Firmware Sends

The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf)
tells what a keyboard can actually send through USB to have a chance to be
properly recognised. This includes a pre-defined list of keycodes which are
simple numbers from `0x00` to `0xE7`. The firmware assigns a keycode to each
key of the keyboard.
The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) tells what a keyboard can actually send through USB to have a chance to be properly recognised. This includes a pre-defined list of scancodes which are simple numbers from `0x00` to `0xE7`. The firmware assigns a scancode to each key of the keyboard.

The firmware does not send actually letters or characters, but only keycodes.
Thus, by modifying the firmware, you only can modify what keycode is sent over
The firmware does not send actually letters or characters, but only scancodes.
Thus, by modifying the firmware, you only can modify what scancode is sent over
USB for a given key.

## 3. What the Operating System Does
Expand All @@ -45,49 +39,31 @@ Once the keycode reaches the operating system, a piece of software has to have
it match an actual character thanks to a keyboard layout. For example, if your
layout is set to QWERTY, a sample of the matching table is as follow:

``` text
| keycode | character |
|---------+-----------|
| 0x04 | a/A |
| 0x05 | b/B |
| 0x06 | c/C |
| ... | ... |
| 0x1C | y/Y |
| 0x1D | z/Z |
| ... | ... |
|---------+-----------|
```
|---------|-----------|
| 0x04 | a/A |
| 0x05 | b/B |
| 0x06 | c/C |
| ... | ... |
| 0x1C | y/Y |
| 0x1D | z/Z |
| ... | ... |

## Back to the firmware

As the layout is generally fixed (unless you create your own), the firmware can
actually call a keycode by its layout name directly to ease things for you.

This is exactly what is done here with `KC_A` actually representing `0x04` in
QWERTY. The full list can be found in `keycode.txt`.
As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in `keycode.txt`.

## List of Characters You Can Send

Putting aside shortcuts, having a limited set of keycodes mapped to a limited
layout means that **the list of characters you can assign to a given key only
is the ones present in the layout**.
Putting aside shortcuts, having a limited set of keycodes mapped to a limited layout means that **the list of characters you can assign to a given key only is the ones present in the layout**.

For example, this means that if you have a QWERTY US layout, and you want to
assign 1 key to produce `` (euro currency symbol), you are unable to do so,
because the QWERTY US layout does not have such mapping. You could fix that by
using a QWERTY UK layout, or a QWERTY US International.
For example, this means that if you have a QWERTY US layout, and you want to assign 1 key to produce `` (euro currency symbol), you are unable to do so, because the QWERTY US layout does not have such mapping. You could fix that by using a QWERTY UK layout, or a QWERTY US International.

You may wonder why a keyboard layout containing all of Unicode is not devised
then? The limited number of keycode available through USB simply disallow such
a thing.
You may wonder why a keyboard layout containing all of Unicode is not devised then? The limited number of keycode available through USB simply disallow such a thing.

## How to (Maybe) Enter Unicode Characters

You can have the firmware send *sequences of keys* to use the [software Unicode
Input
Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of
the target operating system, thus effectively entering characters independently
of the layout defined in the OS.
You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS.

Yet, it does come with multiple disadvantages:

Expand Down
Loading

0 comments on commit ba20898

Please sign in to comment.