Merge branch 'master' into ps2avrGB
@ -1,12 +1,12 @@
|
|||||||
[submodule "lib/chibios"]
|
[submodule "lib/chibios"]
|
||||||
path = lib/chibios
|
path = lib/chibios
|
||||||
url = https://github.com/ChibiOS/ChibiOS.git
|
url = https://github.com/qmk/ChibiOS
|
||||||
[submodule "lib/chibios-contrib"]
|
[submodule "lib/chibios-contrib"]
|
||||||
path = lib/chibios-contrib
|
path = lib/chibios-contrib
|
||||||
url = https://github.com/ChibiOS/ChibiOS-Contrib.git
|
url = https://github.com/qmk/ChibiOS-Contrib
|
||||||
[submodule "lib/ugfx"]
|
[submodule "lib/ugfx"]
|
||||||
path = lib/ugfx
|
path = lib/ugfx
|
||||||
url = https://bitbucket.org/Tectu/ugfx
|
url = https://github.com/qmk/uGFX
|
||||||
[submodule "lib/googletest"]
|
[submodule "lib/googletest"]
|
||||||
path = lib/googletest
|
path = lib/googletest
|
||||||
url = https://github.com/google/googletest
|
url = https://github.com/google/googletest
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
# Copyright 2017 Fred Sundvik
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include $(TMK_PATH)/protocol.mk
|
||||||
|
|
||||||
|
TEST_PATH=tests/$(TEST)
|
||||||
|
|
||||||
|
$(TEST)_SRC= \
|
||||||
|
$(TEST_PATH)/test.cpp \
|
||||||
|
$(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)_DEFS=$(TMK_COMMON_DEFS)
|
||||||
|
$(TEST)_CONFIG=$(TEST_PATH)/config.h
|
||||||
|
VPATH+=$(TOP_DIR)/tests/test_common
|
@ -0,0 +1,157 @@
|
|||||||
|
# Copyright 2017 Fred Sundvik
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
SERIAL_DIR := $(QUANTUM_DIR)/serial_link
|
||||||
|
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||||
|
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
||||||
|
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
||||||
|
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
||||||
|
COMMON_VPATH += $(SERIAL_PATH)
|
||||||
|
|
||||||
|
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||||
|
OPT_DEFS += -DAPI_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/api.c
|
||||||
|
MIDI_ENABLE=yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
MUSIC_ENABLE := 0
|
||||||
|
|
||||||
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
|
MUSIC_ENABLE := 1
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DMIDI_ENABLE
|
||||||
|
MUSIC_ENABLE := 1
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(MUSIC_ENABLE), 1)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DCOMBO_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DVIRTSER_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUCIS_ENABLE
|
||||||
|
UNICODE_COMMON = yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||||
|
UNICODE_COMMON = yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODE_ENABLE
|
||||||
|
UNICODE_COMMON = yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||||
|
CIE1931_CURVE = yes
|
||||||
|
LED_BREATHING_TABLE = yes
|
||||||
|
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||||
|
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||||
|
else
|
||||||
|
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DPRINTING_ENABLE
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||||
|
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||||
|
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||||
|
OPT_DEFS += $(SERIAL_DEFS)
|
||||||
|
VAPTH += $(SERIAL_PATH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(VARIABLE_TRACE)),)
|
||||||
|
SRC += $(QUANTUM_DIR)/variable_trace.c
|
||||||
|
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
|
||||||
|
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
|
||||||
|
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LCD_ENABLE)), yes)
|
||||||
|
CIE1931_CURVE = yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||||
|
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||||
|
CIE1931_CURVE = yes
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||||
|
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||||
|
LED_TABLES = yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
|
||||||
|
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
|
||||||
|
LED_TABLES = yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_TABLES)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
QUANTUM_SRC:= \
|
||||||
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
|
$(QUANTUM_DIR)/keycode_config.c \
|
||||||
|
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||||
|
|
||||||
|
ifndef CUSTOM_MATRIX
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||||
|
endif
|
@ -0,0 +1,35 @@
|
|||||||
|
# Adding your keyboard to QMK
|
||||||
|
|
||||||
|
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||||
|
|
||||||
|
## Naming your directory/project
|
||||||
|
|
||||||
|
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Dashes (`-`) aren't allow by our build system, and will confuse it with keymaps/subprojects. Your directory and your `.h` and `.c` files should have exactly the same name. Subprojects/revision should follow the same format.
|
||||||
|
|
||||||
|
## `readme.md`
|
||||||
|
|
||||||
|
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
|
||||||
|
|
||||||
|
## Image/Hardware files
|
||||||
|
|
||||||
|
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
|
||||||
|
|
||||||
|
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||||
|
|
||||||
|
## Non-production/handwired projects
|
||||||
|
|
||||||
|
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||||
|
|
||||||
|
## Warnings as errors
|
||||||
|
|
||||||
|
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||||
|
|
||||||
|
## Licenses
|
||||||
|
|
||||||
|
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, it this format:
|
||||||
|
|
||||||
|
Copyright 2017 Your Name <your@email.com>
|
||||||
|
|
||||||
|
## Technical details
|
||||||
|
|
||||||
|
If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
|
@ -0,0 +1,106 @@
|
|||||||
|
# ISP Flashing Guide
|
||||||
|
|
||||||
|
If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following:
|
||||||
|
|
||||||
|
libusb: warning [darwin_transfer_status] transfer error: timed out
|
||||||
|
dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60)
|
||||||
|
atmel.c:1627: atmel_flash: flash data dfu_download failed.
|
||||||
|
atmel.c:1629: Expected message length of 1072, got -60.
|
||||||
|
atmel.c:1434: Error flashing the block: err -2.
|
||||||
|
ERROR
|
||||||
|
Memory write error, use debug for more info.
|
||||||
|
commands.c:360: Error writing memory data. (err -4)
|
||||||
|
|
||||||
|
dfu.c:844: -EPIPE: a) Babble detect or b) Endpoint stalled 0xffffffe0 (-32)
|
||||||
|
Device is write protected.
|
||||||
|
dfu.c:252: dfu_clear_status( 0x7fff4fc2ea80 )
|
||||||
|
atmel.c:1434: Error flashing the block: err -2.
|
||||||
|
ERROR
|
||||||
|
Memory write error, use debug for more info.
|
||||||
|
commands.c:360: Error writing memory data. (err -4)
|
||||||
|
|
||||||
|
You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Arduino, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions!
|
||||||
|
|
||||||
|
## Software needed
|
||||||
|
|
||||||
|
* [The Arduino IDE](https://www.arduino.cc/en/Main/Software)
|
||||||
|
* [Teensyduino](https://www.pjrc.com/teensy/td_download.html) (if you're using a Teensy)
|
||||||
|
* [WinAVR](http://www.ladyada.net/learn/avr/setup-win.html) (Windows)
|
||||||
|
|
||||||
|
## Wiring
|
||||||
|
|
||||||
|
This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner:
|
||||||
|
|
||||||
|
Flasher B0 <-> Keyboard RESET
|
||||||
|
Flasher B1 <-> Keyboard B1 (SCLK)
|
||||||
|
Flasher B2 <-> Keyboard B2 (MOSI)
|
||||||
|
Flasher B3 <-> Keyboard B3 (MISO)
|
||||||
|
Flasher VCC <-> Keyboard VCC
|
||||||
|
Flasher GND <-> Keyboard GND
|
||||||
|
|
||||||
|
## The ISP firmware
|
||||||
|
|
||||||
|
Make sure your keyboard is unplugged from any device, and plug in your Teensy.
|
||||||
|
|
||||||
|
1. Run Arduino after you have everything installed
|
||||||
|
2. Select `Tools > Board * > Teensy 2.0`
|
||||||
|
3. Click `File > Examples > 11.ArduinoISP > ArduinoISP`
|
||||||
|
|
||||||
|
Then scroll down until you see something that looks like this block of code:
|
||||||
|
|
||||||
|
// Configure which pins to use:
|
||||||
|
|
||||||
|
// The standard pin configuration.
|
||||||
|
#ifndef ARDUINO_HOODLOADER2
|
||||||
|
|
||||||
|
#define RESET 0 // Use 0 (B0) instead of 10
|
||||||
|
#define LED_HB 11 // Use 11 (LED on the Teensy 2.0)
|
||||||
|
#define LED_ERR 8 // This won't be used unless you have an LED hooked-up to 8 (D3)
|
||||||
|
#define LED_PMODE 7 // This won't be used unless you have an LED hooked-up to 7 (D2)
|
||||||
|
|
||||||
|
And make the changes in the last four lines. If you're using something besides the Teenys 2.0, you'll want to choose something else that makes sense for `LED_HB`. We define `RESET` as `0`/`B0` because that's what's close - if you want to use another pin for some reason, [you can use the pinouts to choose something else](https://www.pjrc.com/teensy/pinout.html).
|
||||||
|
|
||||||
|
Once you've made your changes, you can click the Upload button (right arrow), which will open up the Teensy flasher app - you'll need to press the reset button on the Teensy the first time, but after that, it's automatic (you shouldn't be flashing this more than once, though). Once flashed, the orange LED on the Teensy will flash on and off, indicating it's ready for some action.
|
||||||
|
|
||||||
|
## The .hex file
|
||||||
|
|
||||||
|
Before flashing your firmware, you're going to need to and do a little preparation. We'll be appending [this bootloader (also a .hex file)](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) to the end of our firmware by opening the original .hex file in a text editor, and removing the last line, which should be `:00000001FF` (this is an EOF message). After that's been removed, copy the entire bootloader's contents and paste it at the end of the original file, and save it.
|
||||||
|
|
||||||
|
It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to ISP to write new firmware to your keyboard.
|
||||||
|
|
||||||
|
## Flashing your firmware
|
||||||
|
|
||||||
|
Make sure your keyboard is unplugged from any device, and plug in your Teensy.
|
||||||
|
|
||||||
|
Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with:
|
||||||
|
|
||||||
|
avrdude -c avrisp -P COM3 -p atmega32u4
|
||||||
|
|
||||||
|
and you should get something like the following output:
|
||||||
|
|
||||||
|
avrdude: AVR device initialized and ready to accept instructions
|
||||||
|
|
||||||
|
Reading | ################################################## | 100% 0.02s
|
||||||
|
|
||||||
|
avrdude: Device signature = 0x1e9587
|
||||||
|
|
||||||
|
avrdude: safemode: Fuses OK
|
||||||
|
|
||||||
|
avrdude done. Thank you.
|
||||||
|
|
||||||
|
Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify. This is the full command:
|
||||||
|
|
||||||
|
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
|
||||||
|
|
||||||
|
You should see a couple of progress bars, then you should see:
|
||||||
|
|
||||||
|
avrdude: verifying ...
|
||||||
|
avrdude: 32768 bytes of flash verified
|
||||||
|
|
||||||
|
avrdude: safemode: Fuses OK
|
||||||
|
|
||||||
|
avrdude done. Thank you.
|
||||||
|
|
||||||
|
Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works.
|
||||||
|
|
||||||
|
If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
@ -1,26 +1,16 @@
|
|||||||
Atomic keyboard firmware
|
Atomic
|
||||||
======================
|
===
|
||||||
DIY/Assembled ortholinear 60% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com).
|
|
||||||
|
|
||||||
## Quantum MK Firmware
|
![Atomic](http://i.imgur.com/3gNDJAh.jpg)
|
||||||
|
|
||||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/atomic/)
|
||||||
|
|
||||||
## Building
|
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||||
|
Hardware Supported: Atomic PCB rev1, Teensy 2.0
|
||||||
|
Hardware Availability: no longer available
|
||||||
|
|
||||||
Download or clone the whole firmware and navigate to the keyboards/atomic folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
make atomic-default
|
||||||
|
|
||||||
### Default
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
To build with the default keymap, simply run `make default`.
|
|
||||||
|
|
||||||
### Other Keymaps
|
|
||||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
|
|
||||||
|
|
||||||
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make [default|jack|<name>]
|
|
||||||
```
|
|
||||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
|
@ -0,0 +1,4 @@
|
|||||||
|
NKRO_ENABLE = true
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
@ -0,0 +1,10 @@
|
|||||||
|
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||||
|
|
||||||
|
Atreus52 Modification
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Firmware for my custom keyboard based on the Atreus layout, but with 5 rows and only 5 columns per hand.
|
||||||
|
More documentation coming soon.
|
||||||
|
|
||||||
|
# License
|
||||||
|
GPL-3+
|
@ -0,0 +1,18 @@
|
|||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#undef MANUFACTURER
|
||||||
|
#undef PRODUCT
|
||||||
|
#undef DESCRIPTION
|
||||||
|
#undef MATRIX_ROW_PINS
|
||||||
|
#undef MATRIX_COL_PINS
|
||||||
|
#undef DIODE_DIRECTION
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define MANUFACTURER Mesh Industries
|
||||||
|
#define PRODUCT Atreus52 Treeboard
|
||||||
|
#define DESCRIPTION q.m.k. keyboard firmware for Atreus52
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
#define MATRIX_COL_PINS { B2, B1, F7, F6, F5, F4, B6, D3, D2, D1, D0, D4, B3 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
@ -0,0 +1,99 @@
|
|||||||
|
#include "atreus62.h"
|
||||||
|
|
||||||
|
// Layers
|
||||||
|
#define DVORAK 0
|
||||||
|
#define QWERTY 1
|
||||||
|
#define RAISE 2
|
||||||
|
#define LOWER 3
|
||||||
|
#define BDO 4
|
||||||
|
#define RESETL 5
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[DVORAK] = KC_KEYMAP(
|
||||||
|
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||||
|
NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
|
||||||
|
NO, A, O, E, U, I, D, H, T, N, S, NO, \
|
||||||
|
NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
|
||||||
|
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||||
|
|
||||||
|
[QWERTY] = KC_KEYMAP(
|
||||||
|
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||||
|
NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
|
||||||
|
NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
|
||||||
|
NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
|
||||||
|
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||||
|
|
||||||
|
[RAISE] = KC_KEYMAP(
|
||||||
|
NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \
|
||||||
|
NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \
|
||||||
|
NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \
|
||||||
|
NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \
|
||||||
|
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO ),
|
||||||
|
|
||||||
|
[LOWER] = KC_KEYMAP(
|
||||||
|
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \
|
||||||
|
NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \
|
||||||
|
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||||
|
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \
|
||||||
|
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO ),
|
||||||
|
|
||||||
|
[BDO] = KC_KEYMAP(
|
||||||
|
NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \
|
||||||
|
NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \
|
||||||
|
NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \
|
||||||
|
NO, T, Z, X, C, V, 8, B, N, M, L, NO, \
|
||||||
|
NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO ),
|
||||||
|
|
||||||
|
[RESETL] = KEYMAP(
|
||||||
|
KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO )
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer
|
||||||
|
[1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer
|
||||||
|
[2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer
|
||||||
|
[3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint8_t qw_dv_swap_state = 0;
|
||||||
|
|
||||||
|
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode == KC_LGUI) {
|
||||||
|
if (record->event.pressed)
|
||||||
|
qw_dv_swap_state |= 0b00000001;
|
||||||
|
else
|
||||||
|
qw_dv_swap_state &= ~(0b00000001);
|
||||||
|
}
|
||||||
|
if (keycode == KC_LCTL) {
|
||||||
|
if (record->event.pressed)
|
||||||
|
qw_dv_swap_state |= 0b00000010;
|
||||||
|
else
|
||||||
|
qw_dv_swap_state &= ~(0b00000010);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qw_dv_swap_state == 0b00000011) {
|
||||||
|
layer_invert(DVORAK);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE ?= yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE ?= yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
CUSTOM_MATRIX ?= yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
@ -1,2 +1,9 @@
|
|||||||
|
|
||||||
MOUSEKEY_ENABLE = yes
|
MOUSEKEY_ENABLE = yes
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
|
|
||||||
|
MIDI_ENABLE = yes
|
||||||
|
|
||||||
|
# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size
|
||||||
|
CONSOLE_ENABLE = false
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
#define MIDI_BASIC
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
Setting the modified Space Cadet Parens for German layout
|
||||||
|
|
||||||
|
Default is
|
||||||
|
#define LSPO_KEY KC_9
|
||||||
|
#define RSPC_KEY KC_0
|
||||||
|
*/
|
||||||
|
#define LSPO_KEY KC_8
|
||||||
|
#define RSPC_KEY KC_9
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,289 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This section of macros is for tap or hold functionality. Keys will fire off the second symbol in the name if tapped
|
||||||
|
* or fire the first symbol in the name if held. For example
|
||||||
|
* GUI_Z
|
||||||
|
*
|
||||||
|
* - will fire z if tapped
|
||||||
|
* - will fire cmd/super/win if held
|
||||||
|
*/
|
||||||
|
#define ALT_DOT ALT_T(KC_DOT)
|
||||||
|
#define ALT_X ALT_T(KC_X)
|
||||||
|
#define CTL_SLSH CTL_T(KC_SLSH)
|
||||||
|
#define CTL_Z CTL_T(KC_Z)
|
||||||
|
#define GUI_C GUI_T(KC_C)
|
||||||
|
#define GUI_COMM GUI_T(KC_COMM)
|
||||||
|
#define HPR_ESC ALL_T(KC_ESC)
|
||||||
|
#define HPR_QUO ALL_T(KC_QUOT)
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define SYMB 1
|
||||||
|
#define MDIA 2
|
||||||
|
#define MOUSE 3
|
||||||
|
#define DEV 4
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2| '" |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl|X/Alt |C/GUI | V | B | | | | N | M |,/GUI |./ALT |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,------------.
|
||||||
|
* |MOUSE | Home | | PgDn | PgUp|
|
||||||
|
* ,------|------|------| |------+-----+------.
|
||||||
|
* | | | ESC | | ESC | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | LGui | | LGui | | |
|
||||||
|
* `--------------------' `-------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DEV),
|
||||||
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
|
||||||
|
|
||||||
|
TG(MOUSE), KC_HOME,
|
||||||
|
KC_ESC,
|
||||||
|
KC_SPC, KC_BSPC, KC_LGUI,
|
||||||
|
|
||||||
|
// right hand
|
||||||
|
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
|
||||||
|
MEH_T(KC_NO), KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT,
|
||||||
|
KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, KC_FN1,
|
||||||
|
|
||||||
|
KC_PGDN, KC_PGUP,
|
||||||
|
KC_ESC,
|
||||||
|
KC_LGUI, KC_TAB, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| | Prev | Next | Mute | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | VolDn| VolUp| | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
[MOUSE] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_ACL2, KC_ACL1, KC_ACL0, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
[DEV] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_TRNS,
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
case SYMB:
|
||||||
|
// Binary 1 represented by the leds
|
||||||
|
// --*
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case MDIA:
|
||||||
|
// Binary 2 represented by the leds
|
||||||
|
// -*-
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case MOUSE:
|
||||||
|
// Binary 3 represented by the leds
|
||||||
|
// -**
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case DEV:
|
||||||
|
// Binary 4 represented by the leds
|
||||||
|
// *--
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// switch (keycode) {
|
||||||
|
// case QWERTY:
|
||||||
|
// return false
|
||||||
|
// break;
|
||||||
|
// case LOWER:
|
||||||
|
// if (record->event.pressed) {
|
||||||
|
// layer_on(_LOWER);
|
||||||
|
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
// } else {
|
||||||
|
// layer_off(_LOWER);
|
||||||
|
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// break;
|
||||||
|
// case RAISE:
|
||||||
|
// if (record->event.pressed) {
|
||||||
|
// layer_on(_RAISE);
|
||||||
|
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
// } else {
|
||||||
|
// layer_off(_RAISE);
|
||||||
|
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
|
Before Width: | Height: | Size: 20 KiB |
@ -1,2 +0,0 @@
|
|||||||
GFXINC += drivers/gdisp/emulator_lcd
|
|
||||||
GFXSRC += drivers/gdisp/emulator_lcd/emulator_lcd.c
|
|
@ -1,10 +0,0 @@
|
|||||||
#define GDISP_DRIVER_VMT GDISPVMT_EMULATOR_LCD_ERGODOX
|
|
||||||
#define GDISP_HARDWARE_DRAWPIXEL TRUE
|
|
||||||
#define GDISP_HARDWARE_PIXELREAD TRUE
|
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
|
|
||||||
#define GDISP_SCREEN_WIDTH 128
|
|
||||||
#define GDISP_SCREEN_HEIGHT 32
|
|
||||||
#define ROTATE_180_IS_FLIP
|
|
||||||
|
|
||||||
#include "emulator/emulator_driver_impl.h"
|
|
@ -1,2 +0,0 @@
|
|||||||
GFXINC += drivers/gdisp/emulator_led
|
|
||||||
GFXSRC += drivers/gdisp/emulator_led/emulator_led.c
|
|
@ -1,10 +0,0 @@
|
|||||||
#define GDISP_DRIVER_VMT GDISPVMT_EMULATOR_LED_ERGODOX
|
|
||||||
#define GDISP_HARDWARE_DRAWPIXEL TRUE
|
|
||||||
#define GDISP_HARDWARE_PIXELREAD TRUE
|
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
|
|
||||||
#define GDISP_SCREEN_WIDTH 7
|
|
||||||
#define GDISP_SCREEN_HEIGHT 7
|
|
||||||
#define ROTATE_180_IS_FLIP
|
|
||||||
|
|
||||||
#include "emulator/emulator_driver_impl.h"
|
|
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef CONFIG_H_
|
||||||
|
#define CONFIG_H_
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 150
|
||||||
|
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
|
||||||
|
#endif
|
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 814 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 63 KiB |
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2016 Kaleb Elwert
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
@ -0,0 +1,6 @@
|
|||||||
|
TAP_DANCE_ENABLE=yes
|
||||||
|
UNICODE_ENABLE=yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,79 @@
|
|||||||
|
# Belak's Ergodox Layout
|
||||||
|
|
||||||
|
This has been based off of [emacs\_osx\_dk](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/emacs_osx_dk)
|
||||||
|
from the main qmk repo. However, I've taken some of the ideas for the thumbs
|
||||||
|
from [dvorak\_emacs](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/dvorak_emacs)
|
||||||
|
and tweaked it a bit based on the keycaps I have.
|
||||||
|
|
||||||
|
This keyboard is intended for use in emacs (one of the main reasons for easy
|
||||||
|
access to modifiers) but it could be useful in other instances as well.
|
||||||
|
|
||||||
|
The main repo is used as a testbed, so sometimes the layout may be in a strange
|
||||||
|
state. The qmk version should be relatively stable.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
This is currently being used on a regular ergodox, but it should work fine on
|
||||||
|
the infinity as well. Though, you may have to modify the commands to build and
|
||||||
|
flash the firmware to match the separate halves as defined in the infinity
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
If you are using this keymap in the qmk repo, you should be able to just run
|
||||||
|
`make ergodox-belak-teensy`. If you're using this externally (I sometimes make
|
||||||
|
changes before syncing them to qmk), use the following instructions:
|
||||||
|
|
||||||
|
1. Clone the main qmk repo
|
||||||
|
2. Clone this to `$QMK/keyboards/ergodox/keymaps/belak-external`
|
||||||
|
3. Run `make ergodox-belak-external-teensy` from the root of the qmk repo.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
Fifth Revision
|
||||||
|
|
||||||
|
* Change layer keys to tap-dance keys which cycle through additional layers
|
||||||
|
* Add a few emoji keys (in preparation for an emoji layer)
|
||||||
|
|
||||||
|
Fourth Revision
|
||||||
|
|
||||||
|
* Remove media layer
|
||||||
|
* Add a layer which swaps control and gui on the thumb keys.
|
||||||
|
* Add some basic code to save settings to the eeprom
|
||||||
|
* Save the state of the keys swapped in the thumb in the eeprom
|
||||||
|
|
||||||
|
Third Revision
|
||||||
|
|
||||||
|
* Add numpad layer and remove numpad from symbols layer
|
||||||
|
* Disable media layer
|
||||||
|
* Add arrow keys on ijkl to the symbols layer
|
||||||
|
* Replace ALT on held enter and held delete with GUI (for better OSX
|
||||||
|
compatibility, as there's already an ALT key relatively close)
|
||||||
|
* Replace keys above enter and delete with temporary layer switch buttons not
|
||||||
|
matching the other layer switch for that hand.
|
||||||
|
* Reindent and space out most of the layer definitions
|
||||||
|
|
||||||
|
Second Revision
|
||||||
|
|
||||||
|
* Clean up definitions to make differences between layers easier to see
|
||||||
|
* Remove old LCD code
|
||||||
|
* Add new LCD code based on fredizzimo's branch
|
||||||
|
|
||||||
|
First Revision
|
||||||
|
|
||||||
|
* Reverse grave and escape
|
||||||
|
|
||||||
|
Initial Version
|
||||||
|
|
||||||
|
* Copy from emacs\_osx\_dk
|
||||||
|
* "Fix" right alt
|
||||||
|
* Change thumb keys to match default layout (backspace, delete, enter, space)
|
||||||
|
* Add modifiers to thumb keys (ctrl to backspace and space, alt to delete and
|
||||||
|
enter)
|
||||||
|
* Replace the RAlt below the brackets with LGui and RGui
|
||||||
|
* Remove LCtrl and RCtrl from the keys above shift
|
||||||
|
* Add browser forward, and move browser back
|
||||||
|
* "Fix" the order of volume keys
|
||||||
|
|
||||||
|
## Repository
|
||||||
|
|
||||||
|
The original code for this is kept at https://github.com/belak/ergodox-layout and
|
||||||
|
is synced to qmk every few main revisions.
|
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Fred Sundvik
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Currently we are assuming that both the backlight and LCD are enabled
|
||||||
|
// But it's entirely possible to write a custom visualizer that use only
|
||||||
|
// one of them
|
||||||
|
#ifndef LCD_BACKLIGHT_ENABLE
|
||||||
|
#error This visualizer needs that LCD backlight is enabled
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LCD_ENABLE
|
||||||
|
#error This visualizer needs that LCD is enabled
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "simple_visualizer.h"
|
||||||
|
|
||||||
|
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
|
||||||
|
uint8_t saturation = 60;
|
||||||
|
if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
|
||||||
|
saturation = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state->status.layer & 0x4) {
|
||||||
|
state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
|
||||||
|
state->layer_text = "Media";
|
||||||
|
}
|
||||||
|
else if (state->status.layer & 0x2) {
|
||||||
|
state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
|
||||||
|
state->layer_text = "Symbols";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
|
||||||
|
state->layer_text = "Base";
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 294 KiB |
Before Width: | Height: | Size: 230 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 379 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 189 KiB |
@ -0,0 +1 @@
|
|||||||
|
https://i.imgur.com/fKX0Zbs.png
|
Before Width: | Height: | Size: 252 KiB |