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: (348 commits)
  Creates a layouts/ folder for keymaps shared between keyboards (qmk#1609)
  update 9key readme
  update build script
  Update keymap.c
  Update config.h
  Update Makefile
  fix link brackets
  fix(9key): Fix layout of 9key readme
  update(9key): Add readme with updated format
  Add support for 9key by Bishop Keyboards
  JD40 MiniVan port
  Adding Makefile
  Creating Mac Version of JIS Keymap
  move to compiled [skip ci]
  Fix avoid certificate errors that occur during '2-setup-environment-win.bat'
  update travis script
  convert to unix line-endings [skip ci]
  attempt to fix line-ending travis stuff
  Add back original copyrights
  Readme correction qmk#2
  ...
  • Loading branch information
akatrevorjay committed Aug 24, 2017
2 parents ba20898 + d2ff66a commit 3dca437
Show file tree
Hide file tree
Showing 897 changed files with 19,968 additions and 5,611 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ util/Win_Check_Output.txt
*.png
*.jpg
*.gif

# Do not ignore MiniDox left/right hand eeprom files
!keyboards/minidox/*.eep

# things travis sees
secrets.tar
id_rsa_*
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ addons:
- binutils-arm-none-eabi
- libnewlib-arm-none-eabi
- diffutils
- dos2unix
after_success:
bash util/travis_compiled_push.sh
notifications:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ ENV keymap=default

VOLUME /qmk
WORKDIR /qmk
CMD make clean; make;
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ endif
# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
override SILENT := false

QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
ifneq ($(QMK_VERSION),)
$(info QMK Firmware v$(QMK_VERSION))
endif

ON_ERROR := error_occurred=1

BREAK_ON_ERRORS = no
Expand Down Expand Up @@ -310,11 +315,21 @@ define PARSE_SUBPROJECT
ifneq ($$(CURRENT_SP),allsp)
# get a list of all keymaps
KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
LAYOUTS :=
$$(eval -include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/rules.mk)
KEYBOARD_LAYOUTS := $$(LAYOUTS)
ifneq ($$(CURRENT_SP),)
# if the subproject is defined, then also look for keymaps inside the subproject folder
SP_KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/keymaps/*/.)))
KEYMAPS := $$(sort $$(KEYMAPS) $$(SP_KEYMAPS))
# $$(eval -include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/rules.mk)
# KEYBOARD_LAYOUTS := $$(sort $$(KEYBOARD_LAYOUTS) $$(LAYOUTS))
endif

LAYOUT_KEYMAPS :=
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))

KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
# compile all the keymaps
ifeq ($$(RULE),)
Expand Down Expand Up @@ -420,7 +435,7 @@ define BUILD_TEST
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)
Expand Down
15 changes: 11 additions & 4 deletions book.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"summary": "_summary.md"
},
"plugins" : [
"anchors",
"edit-link",
"forkmegithub",
"git-author",
"hints",
"numbered-headings",
"page-toc",
"terminal",
"toolbar"
"toolbar",
"bulk-redirect"
],
"pluginsConfig": {
"edit-link": {
Expand All @@ -25,6 +23,11 @@
"page-toc": {
"selector": ".markdown-section h1, .markdown-section h2"
},
"terminal": {
"copyButtons": true,
"fade": false,
"style": "flat"
},
"toolbar": {
"buttons": [
{
Expand All @@ -33,6 +36,10 @@
"url": "https://github.com/qmk/qmk_firmware"
}
]
},
"bulk-redirect": {
"basepath": "/",
"redirectsFile": "docs/redirects.json"
}
},
"root": "./docs/"
Expand Down
3 changes: 2 additions & 1 deletion build_full_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ $(TEST)_SRC= \
$(TEST_PATH)/keymap.c \
$(TMK_COMMON_SRC) \
$(QUANTUM_SRC) \
$(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)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
$(TEST)_CONFIG=$(TEST_PATH)/config.h
VPATH+=$(TOP_DIR)/tests/test_common
12 changes: 9 additions & 3 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ifneq ("$(wildcard $(KEYBOARD_C))","")
else
$(error "$(KEYBOARD_C)" does not exist)
endif
OPT_DEFS += -DKEYBOARD_$(KEYBOARD)

ifneq ($(SUBPROJECT),)
SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
Expand Down Expand Up @@ -97,11 +98,13 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
-include $(MAIN_KEYMAP_PATH)/Makefile
KEYMAP_C := $(MAIN_KEYMAP_C)
KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
else ifneq ($(LAYOUTS),)
include build_layout.mk
else
$(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist)
$(error Could not find keymap)
# this state should never be reached
endif


# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
Expand Down Expand Up @@ -157,7 +160,10 @@ endif

OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
$(KEYMAP_OUTPUT)_SRC := $(SRC)
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD).h\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH)/config.h\" \
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
-DQMK_SUBPROJECT=\"$(SUBPROJECT)\" -DQMK_SUBPROJECT_H=\"$(SUBPROJECT).h\" -DQMK_SUBPROJECT_CONFIG_H=\"$(SUBPROJECT_PATH)/config.h\"
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC)
Expand Down
18 changes: 18 additions & 0 deletions build_layout.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
LAYOUTS_PATH := layouts
LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))

define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
KEYMAP_C := $$(LAYOUT_KEYMAP_C)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
endif
endef

define SEARCH_LAYOUTS
$$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO)))
endef

$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
13 changes: 12 additions & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
endif

ifeq ($(strip $(STENO_ENABLE)), yes)
OPT_DEFS += -DSTENO_ENABLE
VIRTSER_ENABLE := yes
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
endif

ifeq ($(strip $(VIRTSER_ENABLE)), yes)
OPT_DEFS += -DVIRTSER_ENABLE
endif
Expand Down Expand Up @@ -98,6 +104,11 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
endif

ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
OPT_DEFS += -DKEY_LOCK_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
endif

ifeq ($(strip $(PRINTING_ENABLE)), yes)
OPT_DEFS += -DPRINTING_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
Expand Down Expand Up @@ -150,4 +161,4 @@ QUANTUM_SRC:= \

ifndef CUSTOM_MATRIX
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
endif
endif
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk

## 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:
Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.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

Expand All @@ -22,4 +22,4 @@ This would build the `rev4` revision of the `planck` with the `default` keymap.

## 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).
QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
61 changes: 42 additions & 19 deletions docs/_summary.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,57 @@
* [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](README.md)
* [QMK Introduction](getting_started_introduction.md)
* [Install Build Tools](getting_started_build_tools.md)
* Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
* [Build/Compile instructions](getting_started_make_guide.md)
* [How to Use Github](getting_started_github.md)

* [Features](features/README.md)
* [Layer switching](key_functions.md)
* [Leader Key](leader_key.md)
* [Macros](macros.md)
* [FAQ](faq.md)
* [General FAQ](faq_general.md)
* [Build/Compile QMK](faq_build.md)
* [Debugging/Troubleshooting QMK](faq_debug.md)
* [Keymap](faq_keymap.md)

* [Features](features.md)
* [Layouts](feature_layouts.md)
* [Common Shortcuts](feature_common_shortcuts.md)
* [Backlight](feature_backlight.md)
* [Bootmagic](feature_bootmagic.md)
* [Dynamic Macros](dynamic_macros.md)
* [Key Lock](key_lock.md)
* [Leader Key](feature_leader_key.md)
* [Macros](macros.md)
* [Mouse keys](mouse_keys.md)
* [PS2 Mouse](feature_ps2_mouse.md)
* [Space Cadet](space_cadet_shift.md)
* [Tap Dance](tap_dance.md)
* [Mouse keys](mouse_keys.md)
* [Audio](feature_audio.md)
* [Thermal Printer](feature_thermal_printer.md)
* [Stenography](stenography.md)
* [Unicode](unicode.md)

* Reference
* [Glossary](glossary.md)
* [Keymap overview](keymap.md)
* [Keycodes](keycodes.md)
* [Basic Keycodes](basic_keycodes.md)
* [Quantum Keycodes](quantum_keycodes.md)
* [Basic](keycodes_basic.md)
* [Quantum](quantum_keycodes.md)
* [Backlight](feature_backlight.md#backlight-keycodes)
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
* [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
* [Mod+Key](feature_common_shortcuts.md#modifier-keys)
* [Mod Tap](feature_common_shortcuts.md#mod-tap)
* [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
* [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
* [Stenography](stenography.md#keycode-reference)
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.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 Makers and Modders
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
* [Adding features to QMK](adding_features_to_qmk.md)
Expand All @@ -37,9 +61,8 @@
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)

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

* Other Topics
* [General FAQ](faq.md)
* [Using Eclipse with QMK](eclipse.md)
4 changes: 2 additions & 2 deletions docs/adding_features_to_qmk.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ Once you have implemented your new feature you will generally submit a [pull req

* **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.
* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects 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.
* **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).
* **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), we'd love to talk about how QMK can be improved.
2 changes: 1 addition & 1 deletion docs/custom_quantum_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum my_keycodes {

## Programming The Behavior Of Any Keycode

When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()' and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.

These function are called every time a key is pressed or released.

Expand Down
Loading

0 comments on commit 3dca437

Please sign in to comment.