Skip to content

Commit

Permalink
Merge branch 'master' into sjb-keymaps
Browse files Browse the repository at this point in the history
* master:
  Typo fixes
  Reverted Dockerfile to put the CMD back
  update my neo2 keymap
  [deadcyclo layout] Refactoring. Use custom functions and macros
  [deadcyclo layout] fixed failing tests
  race condition between oneshot_mods and tap_dance
  Clarify license on abnt2 keymap (qmk#1038)
  [deadcyclo layout] Added more unicode keys and ibus unicode compose trigger keys
  albert ergodox keymap
  replace jackhumbert with qmk
  Add gitter image, start update to qmk org
  Remove COLEMAK from preonic_keycodes enum
  [deadcyclo layout] Added lotsof new emojis and some new unicode keys
  Update readme for smt Preonic keymap
  Add smt keymap for Preonic
  [deadcyclo layout] Added unicode layer
  [deadcyclo layout] Added support for ergodox ez shine
  updated all the other keymaps to support the new changes.
  fix: infinity60 keyboard was not using quantum features.
  Compare Makefile with itself instead of using `--help`
  • Loading branch information
SjB committed Feb 3, 2017
2 parents 8967738 + f0633f2 commit 1f47121
Show file tree
Hide file tree
Showing 37 changed files with 1,709 additions and 178 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ ENV subproject=ez
ENV keymap=default

VOLUME /qmk
WORKDIR /qmk
WORKDIR /qmk
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
40 changes: 20 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ ifdef SILENT
endif

# We need to make sure that silent is always turned off at the top level
# Otherwise the [OK], [ERROR] and [WARN] messags won't be displayed correctly
# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
override SILENT := false

ON_ERROR := error_occured=1
ON_ERROR := error_occurred=1

STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
Expand All @@ -34,13 +34,13 @@ ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
BUILD_DIR := $(ROOT_DIR)/.build
TEST_DIR := $(BUILD_DIR)/test
ERROR_FILE := $(BUILD_DIR)/error_occured
ERROR_FILE := $(BUILD_DIR)/error_occurred

MAKEFILE_INCLUDED=yes

# Helper function to process the newt element of a space separated path
# It works a bit like the traditional functional head tail
# so the CURRENT_PATH_ELEMENT will beome the new head
# so the CURRENT_PATH_ELEMENT will become the new head
# and the PATH_ELEMENTS are the rest that are still unprocessed
define NEXT_PATH_ELEMENT
$$(eval CURRENT_PATH_ELEMENT := $$(firstword $$(PATH_ELEMENTS)))
Expand Down Expand Up @@ -84,7 +84,7 @@ endif
# Only consider folders with makefiles, to prevent errors in case there are extra folders
KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))

#Compability with the old make variables, anything you specify directly on the command line
#Compatibility with the old make variables, anything you specify directly on the command line
# always overrides the detected folders
ifdef keyboard
KEYBOARD := $(keyboard)
Expand All @@ -106,7 +106,7 @@ endif
#$(info Keyboards: $(KEYBOARDS))


# Set the default goal depening on where we are running make from
# Set the default goal depending on where we are running make from
# this handles the case where you run make without any arguments
.DEFAULT_GOAL := all
ifneq ($(KEYMAP),)
Expand Down Expand Up @@ -170,7 +170,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3
endef

# A recursive helper function for finding the longest match
# $1 The list to be checed
# $1 The list to be checked
# It works by always removing the currently matched item from the list
# and call itself recursively, until a match is found
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
Expand All @@ -180,7 +180,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
$$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1))
# If a match is found in the current list, otherwise just return what we had before
ifeq ($$(RULE_FOUND),true)
# Save the best match so far and call itself recursivel
# Save the best match so far and call itself recursively
BEST_MATCH := $$(MATCHED_ITEM)
BEST_MATCH_RULE := $$(RULE)
RULE_FOUND := false
Expand Down Expand Up @@ -337,7 +337,7 @@ define PARSE_SUBPROJECT
$$(eval $$(call PARSE_ALL_KEYMAPS))
endif
else
# As earlier mentione,d when allsb is specified, we call our self recursively
# As earlier mentioned when allsb is specified, we call our self recursively
# for all of the subprojects
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))
endif
Expand Down Expand Up @@ -403,11 +403,11 @@ define BUILD
printf "$$(MAKE_MSG)\n\n"; \
$$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \
if [ $$$$? -gt 0 ]; \
then error_occured=1; \
then error_occurred=1; \
fi;
endef

# Just parse all the keymaps for a specifc keyboard
# Just parse all the keymaps for a specific keyboard
define PARSE_ALL_KEYMAPS
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS)))
endef
Expand All @@ -428,7 +428,7 @@ define BUILD_TEST
printf "$$(TEST_MSG)\n"; \
$$(TEST_EXECUTABLE); \
if [ $$$$? -gt 0 ]; \
then error_occured=1; \
then error_occurred=1; \
fi; \
printf "\n";
endif
Expand All @@ -448,7 +448,7 @@ endef


# Set the silent mode depending on if we are trying to compile multiple keyboards or not
# By default it's on in that case, but it can be overriden by specifying silent=false
# By default it's on in that case, but it can be overridden by specifying silent=false
# from the command line
define SET_SILENT_MODE
ifdef SUB_IS_SILENT
Expand All @@ -465,16 +465,16 @@ include $(ROOT_DIR)/message.mk
# The empty line is important here, as it will force a new shell to be created for each command
# Otherwise the command line will become too long with a lot of keyboards and keymaps
define RUN_COMMAND
+error_occured=0;\
+error_occurred=0;\
$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;


endef
define RUN_TEST
+error_occured=0;\
+error_occurred=0;\
$($(TEST)_COMMAND)\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;

endef

Expand All @@ -487,7 +487,7 @@ $(SUBPROJECTS): %: %-allkm
.PHONY: %
%:
# Check if we have the CMP tool installed
cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
# Check if the submodules are dirty, and display a warning if they are
ifndef SKIP_GIT
git submodule status --recursive 2>/dev/null | \
Expand All @@ -514,7 +514,7 @@ endif
.PHONY: all
all: all-keyboards test-all

# Define some shortcuts, mostly for compability with the old syntax
# Define some shortcuts, mostly for compatibility with the old syntax
.PHONY: all-keyboards
all-keyboards: allkb-allsp-allkm

Expand All @@ -537,4 +537,4 @@ BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)

include $(ROOT_DIR)/testlist.mk
include $(ROOT_DIR)/testlist.mk
4 changes: 2 additions & 2 deletions doc/BUILD_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
1. If you have ever installed WinAVR, uninstall it.
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
Expand Down Expand Up @@ -38,7 +38,7 @@ Debian/Ubuntu example:
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).

## Verify Your Installation
1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
Expand Down
2 changes: 1 addition & 1 deletion doc/CYGWIN_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ If you did everything else right. This part should be a snap! Grab the latest so
###Build Planck and Load the Firmware
```
$ cd ~/src
$ git clone https://github.com/jackhumbert/qmk_firmware.git
$ git clone https://github.com/qmk/qmk_firmware.git
$ cd qmk_firmware/keyboards/planck
$ make
```
Expand Down
6 changes: 3 additions & 3 deletions doc/HAND_WIRE.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ As you move along, be sure that the Teensy is staying in place - recutting and s

From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.

To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).

The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:

Expand Down Expand Up @@ -276,7 +276,7 @@ This can be accomplished by using the following `keymaps` definition:
),
};

Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.

It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.

Expand Down Expand Up @@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h

Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.

There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)

## Trouble-shooting compiling

Expand Down
6 changes: 3 additions & 3 deletions doc/PCB_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Windows
1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!

Expand All @@ -32,7 +32,7 @@ Note that, since it will be directly accessing USB hardware, the
`dfu-programmer` program needs to be run as root.

## Verify Your Installation
1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware
1. Clone the following repository: https://github.com/qmk/qmk_firmware
2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck`
3. Run `make`. This should output a lot of information about the build process.

Expand Down Expand Up @@ -80,7 +80,7 @@ when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to

### Keymap

Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h).
Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h).

You can use modifiers with keycodes like this:

Expand Down
2 changes: 1 addition & 1 deletion keyboards/atreus/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac

### Remember: These are just aliases

These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).

Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.

Expand Down
2 changes: 1 addition & 1 deletion keyboards/ergodox/keymaps/ab/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get
* Easy on beginners. It has everything you need for your day to day usage.

#### Cons
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md)
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md)
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.

#### Notes
Expand Down
5 changes: 5 additions & 0 deletions keyboards/ergodox/keymaps/albert/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
COMMAND_ENABLE = no # Commands for debug and configuration

ifndef QUANTUM_DIR
include ../../../../Makefile
endif
12 changes: 12 additions & 0 deletions keyboards/ergodox/keymaps/albert/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H

#include "../../config.h"

/* using UK layout for space-cadet-shift */
#define LSPO_KEY KC_9
#define RSPC_KEY KC_0

#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis

#endif
Loading

0 comments on commit 1f47121

Please sign in to comment.