@ -1,8 +1,8 @@ | |||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||||
MOUSEKEY_ENABLE ?= yes # Mouse keys | |||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control | |||||
CONSOLE_ENABLE ?= yes # Console for debug | |||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration | |||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend | |||||
NKRO_ENABLE ?= yes # USB Nkey Rollover | |||||
CUSTOM_MATRIX ?= yes # Custom matrix file | |||||
MOUSEKEY_ENABLE = yes # Mouse keys | |||||
EXTRAKEY_ENABLE = yes # Audio control and System control | |||||
CONSOLE_ENABLE = yes # Console for debug | |||||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||||
NKRO_ENABLE = yes # USB Nkey Rollover | |||||
CUSTOM_MATRIX = yes # Custom matrix file |
@ -1,97 +1,17 @@ | |||||
Clueboard keyboard firmware | |||||
====================== | |||||
# Clueboard 66% | |||||
DIY/Assembled compact 66% keyboard by [Clueboard](http://clueboard.co). | |||||
![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) | |||||
For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). | |||||
A fully customizable 66% keyboard. | |||||
## First Time Setup | |||||
* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) | |||||
* Hardware Supported: Clueboard 66% PCB | |||||
* rev1 (1.0) | |||||
* rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) | |||||
* Hardware Availability: [clueboard.co](https://clueboard.co/) | |||||
Download or clone the whole firmware and navigate to the keyboards/clueboard directory. Once your dev env is setup, you'll be able to generate the default .hex: | |||||
Make example for this keyboard (after setting up your build environment): | |||||
``` | |||||
$ make | |||||
``` | |||||
make cluepad-default | |||||
You will see a lot of output and if everything worked correctly you will see something similar to this: | |||||
``` | |||||
Size after: | |||||
text data bss dec hex filename | |||||
0 19992 0 19992 4e18 clueboard_rev2_default.hex | |||||
``` | |||||
At this point you can press RESET on your Clueboard and flash your keyboard with this command: | |||||
``` | |||||
$ make dfu | |||||
``` | |||||
If you would like to use one of the alternative keymaps, or create your own, see below. | |||||
## Clueboard 1.0 | |||||
If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `rev1` to your make command, like this: | |||||
``` | |||||
$ make rev1 | |||||
``` | |||||
And when flashing your keyboard: | |||||
``` | |||||
$ make rev1-dfu | |||||
``` | |||||
If you are flashing an alternative layout to your rev1, include both `rev1` and `<keymap>` in your command, for example when flashing max: | |||||
``` | |||||
$ make rev1-max-dfu | |||||
``` | |||||
## Alternate Keymaps | |||||
There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `<keymap>` to your command: | |||||
``` | |||||
$ make skully | |||||
``` | |||||
And when flashing your keyboard, put `<keymap>` between "make" and "dfu": | |||||
``` | |||||
$ make skully-dfu | |||||
``` | |||||
### Notable Layouts | |||||
These layouts are notable for one reason or another. If you are looking for ideas or inspiration you should look at these first: | |||||
* [keymaps/default](keymaps/default) - The default Clueboard layout | |||||
* [keymaps/max](keymaps/max) - A maximised layout that makes use of every key and feature of the Clueboard 2.0 PCB. | |||||
* [keymaps/skully](keymaps/skully) - The layout that @skullydazed uses on his own Clueboards. | |||||
## Create Your Own Keymap | |||||
There are a lot of possibilities when creating your own keymap, and the primary documentation for doing that is [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. As a way to get started, here is the procedure I recommend: | |||||
* Copy `[keymaps/default](keymaps/default/)` to `keymaps/<your_layout>`. | |||||
* Compile the firmware (`$ make <your_layout>`) | |||||
* Flash the firmware (`$ make <your_layout>-dfu`) | |||||
* Make sure everything works like the default keyboard | |||||
* Modify `keymaps/<your_layout>/readme.md` to tell others about your layout. | |||||
* Modify `keymaps/<your_layout>/keymap.c` to reflect your desired layout. | |||||
* Compile your new custom firmware (`$ make <your_layout>`) | |||||
** If you have warnings you may flash without fixing them, but something may not work right. | |||||
** If you have any errors you must fix them before continuing. | |||||
* Flash the firmware (`$ make <your_layout>-dfu`) | |||||
## Share Your Keymap | |||||
Got your layout dialed in? Please share it with the world so we can benefit from your work! Simply submit a pull request with your layout and we'll include it in the official repository. Please use the following guidelines when putting together your pull request: | |||||
* Include a readme.md that states what your primary keyboard use is, how your layout differs from the default, and highlights anything you think makes your layout particularly great. | |||||
* If your layout requires certain features (EG, RGB underlight or backlighting) ensure you have a Makefile and config.h that reflects that | |||||
* If your layout requires special hardware to be added, please describe that in the readme.md | |||||
TODO: Write up or link quick how-to on creating and submitting a PR. (Pull requests accepted. :) | |||||
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. |
@ -1,28 +1,13 @@ | |||||
cluecard keyboard firmware | |||||
====================== | |||||
# Cluecard | |||||
## Quantum MK Firmware | |||||
A simple QMK dev kit. | |||||
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). | |||||
* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) | |||||
* Hardware Supported: Cluecard 1.0 | |||||
* Hardware Availability: Special gift from [skullydazed](https://github.com/skullydazed) | |||||
## Building | |||||
Make example for this keyboard (after setting up your build environment): | |||||
Download or clone the whole firmware and navigate to the keyboards/cluecard folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. | |||||
make cluecard-default | |||||
Depending on which keymap you would like to use, you will have to compile slightly differently. | |||||
### Default | |||||
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 folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant 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 **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` | |||||
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. |
@ -1,4 +1,15 @@ | |||||
Cluepad number pad firmware | |||||
====================== | |||||
# Cluepad | |||||
TODO: to be updated. | |||||
![Cluepad](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) | |||||
A basic 17 key numpad PCB. | |||||
* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) | |||||
* Hardware Supported: Cluepad PCB 1.0 | |||||
* Hardware Availability: [clueboard.co](https://clueboard.co/) | |||||
Make example for this keyboard (after setting up your build environment): | |||||
make cluepad-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. |
@ -1,8 +1,17 @@ | |||||
DK60 keyboard firmware | |||||
====================== | |||||
DK60 | |||||
=== | |||||
Another 60% keyboard with different HHKB layout | |||||
![DK60](https://github.com/Dbroqua/DK60/raw/master/Previews/DK60.png) | |||||
More information here: https://github.com/Dbroqua/DK60 | |||||
Another 60% keyboard with different HHKB layout made and sold by dbroqua. [More info on github/dbroqua](https://github.com/Dbroqua/DK60/) | |||||
* Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) | |||||
* Hardware Supported: DK60 PCB revA | |||||
Make example for this keyboard (after setting up your build environment): | |||||
make dk60-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. | |||||
Open Hardware project! | Open Hardware project! |
@ -0,0 +1,5 @@ | |||||
SUBPROJECT_DEFAULT = rev1 | |||||
ifndef MAKEFILE_INCLUDED | |||||
include ../../Makefile | |||||
endif |
@ -0,0 +1,77 @@ | |||||
/* | |||||
Copyright 2012 Jun Wako <wakojun@gmail.com> | |||||
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/>. | |||||
*/ | |||||
#ifndef CONFIG_H | |||||
#define CONFIG_H | |||||
#include "config_common.h" | |||||
/* USB Device descriptor parameter */ | |||||
#define VENDOR_ID 0x1337 | |||||
#define PRODUCT_ID 0x6006 | |||||
#define MANUFACTURER Bishop Keyboards | |||||
#define PRODUCT The ECO Keyboard | |||||
#define DESCRIPTION An economical ortholinear keyboard | |||||
/* key matrix size */ | |||||
#define MATRIX_ROWS 4 | |||||
#define MATRIX_COLS 14 | |||||
#define CATERINA_BOOTLOADER | |||||
/* COL2ROW or ROW2COL */ | |||||
#define DIODE_DIRECTION COL2ROW | |||||
/* define if matrix has ghost */ | |||||
//#define MATRIX_HAS_GHOST | |||||
/* Set 0 if debouncing isn't needed */ | |||||
#define DEBOUNCING_DELAY 5 | |||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |||||
#define LOCKING_SUPPORT_ENABLE | |||||
/* Locking resynchronize hack */ | |||||
#define LOCKING_RESYNC_ENABLE | |||||
/* key combination for command */ | |||||
#define IS_COMMAND() ( \ | |||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||||
) | |||||
/* | |||||
* Feature disable options | |||||
* These options are also useful to firmware size reduction. | |||||
*/ | |||||
/* disable debug print */ | |||||
//#define NO_DEBUG | |||||
/* disable print */ | |||||
//#define NO_PRINT | |||||
/* disable action features */ | |||||
//#define NO_ACTION_LAYER | |||||
//#define NO_ACTION_TAPPING | |||||
//#define NO_ACTION_ONESHOT | |||||
//#define NO_ACTION_MACRO | |||||
//#define NO_ACTION_FUNCTION | |||||
#ifdef SUBPROJECT_rev1 | |||||
#include "rev1/config.h" | |||||
#endif | |||||
#endif |
@ -0,0 +1 @@ | |||||
#include "eco.h" |
@ -0,0 +1,10 @@ | |||||
#ifndef ECO_H | |||||
#define ECO_H | |||||
#ifdef SUBPROJECT_rev1 | |||||
#include "rev1.h" | |||||
#endif | |||||
#include "quantum.h" | |||||
#endif |
@ -0,0 +1,25 @@ | |||||
# Build Options | |||||
# change to "no" to disable the options, or define them in the Makefile in | |||||
# the appropriate keymap folder that will get included automatically | |||||
# | |||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||||
CONSOLE_ENABLE = no # Console for debug(+400) | |||||
COMMAND_ENABLE = no # Commands for debug and configuration | |||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||||
MIDI_ENABLE = no # MIDI controls | |||||
AUDIO_ENABLE = no # Audio output on port C6 | |||||
UNICODE_ENABLE = no # Unicode | |||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | |||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||||
ifndef QUANTUM_DIR | |||||
include ../../../../Makefile | |||||
endif |
@ -0,0 +1,217 @@ | |||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard, | |||||
// this is the style you want to emulate. | |||||
// Below layout is based upon /u/That-Canadian's planck layout | |||||
#include "eco.h" | |||||
#include "action_layer.h" | |||||
#ifdef AUDIO_ENABLE | |||||
#include "audio.h" | |||||
#endif | |||||
#include "eeconfig.h" | |||||
extern keymap_config_t keymap_config; | |||||
// Each layer gets a name for readability, which is then used in the keymap matrix below. | |||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | |||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them | |||||
// entirely and just use numbers. | |||||
#define _QWERTY 0 | |||||
#define _LOWER 2 | |||||
#define _RAISE 3 | |||||
#define _FUNCTION 15 | |||||
#define _ADJUST 16 | |||||
enum eco_keycodes { | |||||
QWERTY = SAFE_RANGE, | |||||
LOWER, | |||||
RAISE | |||||
}; | |||||
// Fillers to make layering more clear | |||||
#define _______ KC_TRNS | |||||
#define XXXXXXX KC_NO | |||||
// Defines for task manager and such | |||||
#define CALTDEL LCTL(LALT(KC_DEL)) | |||||
#define TSKMGR LCTL(LSFT(KC_ESC)) | |||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||
/* Qwerty | |||||
* ,-------------------------------------------------------------------------------------------------. | |||||
* | Tab | Q | W | E | R | T | ( | ) | Y | U | I | O | P | Bksp | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | Func | A | S | D | F | G | [ | ] | H | J | K | L | ; | Enter| | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | Shift| Z | X | C | V | B | { | } | N | M | , | . | / | ' | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | Ctrl | ` | GUI | Alt |Lower | Space|Pg-dwn| Pg-up| Space|Raise | Left | Down | Up |Right | | |||||
* `-------------------------------------------------------------------------------------------------' | |||||
*/ | |||||
[_QWERTY] = { | |||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | |||||
{MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, | |||||
{OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, | |||||
{KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_PGDN, KC_PGUP, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | |||||
}, | |||||
/* Lower | |||||
* ,-------------------------------------------------------------------------------------------------. | |||||
* | Esc | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | Del | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | F1 | F2 | F3 | F4 | F5 | | | F6 | _ | + | { | } |Enter | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | Mute | | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | |Lower | | | | Bksp |Raise | Next | Vol- | Vol+ | Play | | |||||
* `-------------------------------------------------------------------------------------------------' | |||||
*/ | |||||
[_LOWER] = { | |||||
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, | |||||
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, | |||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | |||||
}, | |||||
/* Raise | |||||
* ,-------------------------------------------------------------------------------------------------. | |||||
* | Esc | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | Del | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | 4 | 5 | 6 | + | | | | | - | = | [ | ] |Enter | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* |Enter | 7 | 8 | 9 | - | | | | | | | Mute | | \ | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | , | 0 | . |Lower | Bksp | | | |Raise | Next | Vol- | Vol+ | Play | | |||||
* `-------------------------------------------------------------------------------------------------' | |||||
*/ | |||||
[_RAISE] = { | |||||
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, | |||||
{_______, KC_4, KC_5, KC_6, KC_PLUS, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, | |||||
{KC_ENT, KC_7, KC_8, KC_9, KC_MINS, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_BSLS}, | |||||
{_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | |||||
}, | |||||
/* Adjust (Lower + Raise) | |||||
* ,-------------------------------------------------------------------------------------------------. | |||||
* |Taskmg| Reset| | | | | | | | | | | |caltde| | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | | | | | | | | | | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | | | | | | | | | | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | | | | | | | | | | | | | |||||
* `-------------------------------------------------------------------------------------------------' | |||||
*/ | |||||
[_ADJUST] = { | |||||
{TSKMGR, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | |||||
}, | |||||
/* Function | |||||
* ,-------------------------------------------------------------------------------------------------. | |||||
* | | | | | | | | | | | Up | | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | | | | | | | Left | Down |Right | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | Caps | | | | | | | | | | | | | | | |||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | |||||
* | | | | | | | | | | | | | | | | |||||
* `-------------------------------------------------------------------------------------------------' | |||||
*/ | |||||
[_FUNCTION] = { | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, | |||||
{KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | |||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | |||||
} | |||||
}; | |||||
#ifdef AUDIO_ENABLE | |||||
float tone_startup[][2] = SONG(STARTUP_SOUND); | |||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND); | |||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND); | |||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND); | |||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | |||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | |||||
#endif | |||||
void persistant_default_layer_set(uint16_t default_layer) { | |||||
eeconfig_update_default_layer(default_layer); | |||||
default_layer_set(default_layer); | |||||
} | |||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||||
switch (keycode) { | |||||
case QWERTY: | |||||
if (record->event.pressed) { | |||||
#ifdef AUDIO_ENABLE | |||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | |||||
#endif | |||||
persistant_default_layer_set(1UL<<_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; | |||||
} | |||||
void matrix_init_user(void) { | |||||
#ifdef AUDIO_ENABLE | |||||
startup_user(); | |||||
#endif | |||||
} | |||||
#ifdef AUDIO_ENABLE | |||||
void startup_user() | |||||
{ | |||||
_delay_ms(20); // gets rid of tick | |||||
PLAY_NOTE_ARRAY(tone_startup, false, 0); | |||||
} | |||||
void shutdown_user() | |||||
{ | |||||
PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | |||||
_delay_ms(150); | |||||
stop_all_notes(); | |||||
} | |||||
void music_on_user(void) | |||||
{ | |||||
music_scale_user(); | |||||
} | |||||
void music_scale_user(void) | |||||
{ | |||||
PLAY_NOTE_ARRAY(music_scale, false, 0); | |||||
} | |||||
#endif |
@ -0,0 +1 @@ | |||||
# ECO Layout by u/That-Canadian |
@ -0,0 +1,15 @@ | |||||
ECO | |||||
=== | |||||
![ECO](http://i.imgur.com/YligKxr.jpg) | |||||
An economical 4x14 ortholinear keyboard | |||||
Keyboard Maintainer: BishopKeyboards and That-Canadian | |||||
Hardware Supported: ECO PCB rev1 Pro Micro | |||||
Make example for this keyboard (after setting up your build environment): | |||||
make eco-rev1-that_canadian | |||||
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. |
@ -0,0 +1,3 @@ | |||||
ifndef MAKEFILE_INCLUDED | |||||
include ../../Makefile | |||||
endif |
@ -0,0 +1,30 @@ | |||||
/* | |||||
Copyright 2012 Jun Wako <wakojun@gmail.com> | |||||
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/>. | |||||
*/ | |||||
#ifndef REV1_CONFIG_H | |||||
#define REV1_CONFIG_H | |||||
#include "../config.h" | |||||
#define DEVICE_VER 0x0001 | |||||
/* ECO V1 pin-out */ | |||||
#define MATRIX_ROW_PINS { B1, B6, B2, B3 } | |||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } | |||||
#define UNUSED_PINS | |||||
#endif |
@ -0,0 +1 @@ | |||||
#include "eco.h" |
@ -0,0 +1,24 @@ | |||||
#ifndef REV1_H | |||||
#define REV1_H | |||||
#include "../eco.h" | |||||
//void promicro_bootloader_jmp(bool program); | |||||
#include "quantum.h" | |||||
//void promicro_bootloader_jmp(bool program); | |||||
#define KEYMAP( \ | |||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ | |||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ | |||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ | |||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ | |||||
) \ | |||||
{ \ | |||||
{ k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ | |||||
{ k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ | |||||
{ k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ | |||||
{ k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ | |||||
} | |||||
#endif |
@ -0,0 +1,5 @@ | |||||
BACKLIGHT_ENABLE = no | |||||
ifndef QUANTUM_DIR | |||||
include ../../../Makefile | |||||
endif |
@ -0,0 +1,68 @@ | |||||
# MCU name | |||||
#MCU = at90usb1287 | |||||
MCU = atmega32u4 | |||||
# Processor frequency. | |||||
# This will define a symbol, F_CPU, in all source code files equal to the | |||||
# processor frequency in Hz. You can then use this symbol in your source code to | |||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||||
# automatically to create a 32-bit value in your source code. | |||||
# | |||||
# This will be an integer division of F_USB below, as it is sourced by | |||||
# F_USB after it has run through any CPU prescalers. Note that this value | |||||
# does not *change* the processor frequency - it should merely be updated to | |||||
# reflect the processor speed set externally so that the code can use accurate | |||||
# software delays. | |||||
F_CPU = 16000000 | |||||
# | |||||
# LUFA specific | |||||
# | |||||
# Target architecture (see library "Board Types" documentation). | |||||
ARCH = AVR8 | |||||
# Input clock frequency. | |||||
# This will define a symbol, F_USB, in all source code files equal to the | |||||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||||
# at the end, this will be done automatically to create a 32-bit value in your | |||||
# source code. | |||||
# | |||||
# If no clock division is performed on the input clock inside the AVR (via the | |||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||||
F_USB = $(F_CPU) | |||||
# Interrupt driven control endpoint task(+60) | |||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||||
# Boot Section Size in *bytes* | |||||
# Teensy halfKay 512 | |||||
# Teensy++ halfKay 1024 | |||||
# Atmel DFU loader 4096 | |||||
# LUFA bootloader 4096 | |||||
# USBaspLoader 2048 | |||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||||
# Build Options | |||||
# change to "no" to disable the options, or define them in the Makefile in | |||||
# the appropriate keymap folder that will get included automatically | |||||
# | |||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700) | |||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||||
CONSOLE_ENABLE = no # Console for debug(+400) | |||||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | |||||
MIDI_ENABLE = yes # MIDI controls | |||||
AUDIO_ENABLE = yes # Audio output on port C6 | |||||
UNICODE_ENABLE = no # Unicode | |||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | |||||
API_SYSEX_ENABLE = no | |||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
@ -1,7 +1,7 @@ | |||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||||
COMMAND_ENABLE = no # Commands for debug and configuration | COMMAND_ENABLE = no # Commands for debug and configuration | ||||
RGBLIGHT_ENABLE ?= yes | |||||
MIDI_ENABLE ?= no | |||||
RGBLIGHT_ENABLE = yes | |||||
MIDI_ENABLE = no | |||||
ifndef MAKEFILE_INCLUDED | ifndef MAKEFILE_INCLUDED | ||||
include ../../../Makefile | include ../../../Makefile | ||||
@ -1,7 +1,7 @@ | |||||
BOOTMAGIC_ENABLE=no | BOOTMAGIC_ENABLE=no | ||||
COMMAND_ENABLE=no | COMMAND_ENABLE=no | ||||
SLEEP_LED_ENABLE=no | SLEEP_LED_ENABLE=no | ||||
FORCE_NKRO ?= yes | |||||
FORCE_NKRO = yes | |||||
DEBUG_ENABLE = no | DEBUG_ENABLE = no | ||||
CONSOLE_ENABLE = no | CONSOLE_ENABLE = no | ||||
TAP_DANCE_ENABLE = no | TAP_DANCE_ENABLE = no | ||||
@ -1,6 +1,3 @@ | |||||
RGBLIGHT_ENABLE ?= yes | |||||
MIDI_ENABLE ?= yes | |||||
ifndef QUANTUM_DIR | ifndef QUANTUM_DIR | ||||
include ../../../../Makefile | include ../../../../Makefile | ||||
endif | endif |
@ -0,0 +1,199 @@ | |||||
/* Copyright 2017 Andreas Lindhé | |||||
* | |||||
* 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 "ergodox.h" | |||||
#include "debug.h" | |||||
#include "action_layer.h" | |||||
#include "keymap_swedish.h" | |||||
#define BASE 0 // default layer | |||||
#define SYMB 1 // symbols | |||||
#define MDIA 2 // media keys | |||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||
/* Keymap 0: Basic layer | |||||
* | |||||
* ,--------------------------------------------------. ,--------------------------------------------------. | |||||
* | Print | ! | " | # | # | % | | |Middle| & | / | ( | ) | = | ? | | |||||
* | Screen | 1 | 2 @ | 3 £ | 4 $ | 5 | F11 | |Mouse | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | | |||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | |||||
* | Tab | Q | W | E | R | T | ~L1 | | L1 | Y | U | I | O | P | Å | | |||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | |||||
* | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | | |||||
* |--------+------+------+------+------+------| ` | | Del |------+------+------+------+------+--------| | |||||
* | LShft | Z | X | C | V | B | ' | | | N | M | , | . | - | RShift | | |||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | |||||
* | LCtl | ^ | * | LAlt | LGui | | AltGr| Down | Up | Left | Right| | |||||
* | (') | " ~ | ' ´ | | | | | | | | | | |||||
* `----------------------------------' `----------------------------------' | |||||
* ,-------------. ,--------------. | |||||
* | LCtl | LAlt | | Home | End | | |||||
* ,------|------|------| |------+-------+------. | |||||
* | | | ~ | | PgUp | | | | |||||
* | Space|Back- |------| |------| Tab |Enter | | |||||
* | |space | Esc | | PgDn | | L2 | | |||||
* `--------------------' `---------------------' | |||||
*/ | |||||
[BASE] = KEYMAP( // layer 0 : default | |||||
// left hand | |||||
KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F11, | |||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), | |||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, | |||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_ACUT, | |||||
CTL_T(NO_APOS), NO_CIRC, NO_ASTR, KC_LALT, KC_LGUI, | |||||
KC_LCTRL, KC_LALT, | |||||
NO_TILD, | |||||
KC_SPC, KC_BSPC, KC_ESC, | |||||
// right hand | |||||
KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, | |||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, | |||||
KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, | |||||
KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, | |||||
NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, | |||||
KC_HOME, KC_END, | |||||
KC_PGUP, | |||||
KC_PGDN, KC_TAB, LT(MDIA, KC_ENT) | |||||
), | |||||
/* Keymap 1: Symbol Layer | |||||
* | |||||
* ,--------------------------------------------------. ,--------------------------------------------------. | |||||
* | | | | | | | | | | | | / | * | - | | | |||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | |||||
* | | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | + | | | |||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | |||||
* | | F5 | F6 | F7 | F8 | |------| |------| | 4 | 5 | 6 | + | | | |||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | |||||
* | | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | Enter| | | |||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | |||||
* | | | | | | | 0 | , | . | Enter| | | |||||
* `----------------------------------' `----------------------------------' | |||||
* ,-------------. ,-------------. | |||||
* | | | | | | | |||||
* ,------|------|------| |------+------+------. | |||||
* | | | | | | | | | |||||
* | | |------| |------| | | | |||||
* | | | | | | | | | |||||
* `--------------------' `--------------------' | |||||
*/ | |||||
// SYMBOLS | |||||
[SYMB] = KEYMAP( | |||||
// left hand | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, KC_TRNS, | |||||
KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, | |||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, 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_PSLS, KC_PAST, KC_PMNS, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_PPLS, KC_TRNS, | |||||
KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_TRNS, | |||||
RESET, KC_TRNS, KC_1, KC_2, KC_3, KC_PENT, KC_TRNS, | |||||
KC_0, KC_COMM, KC_DOT, KC_PENT, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, | |||||
KC_TRNS, | |||||
KC_TRNS, KC_TRNS, KC_TRNS | |||||
), | |||||
/* Keymap 2: Media and mouse keys | |||||
* | |||||
* ,--------------------------------------------------. ,--------------------------------------------------. | |||||
* | | | | | | | | | | | | | | | | | |||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | |||||
* | | | | MsUp | | | | | | | | | | | | | |||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | |||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | Play | Pause| Prev | Next | | | |||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | |||||
* | | | | Lclk | Rclk | | | | | |VolDn |VolUp | Mute | | | | |||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | |||||
* | | | | | | | | | | | | | |||||
* `----------------------------------' `----------------------------------' | |||||
* ,-------------. ,-------------. | |||||
* | | | | | | | |||||
* ,------|------|------| |------+------+------. | |||||
* | | | | | | | | | |||||
* |LeClk |RiClk |------| |------| | | | |||||
* | | | | | | | | | |||||
* `--------------------' `--------------------' | |||||
*/ | |||||
// MEDIA AND MOUSE | |||||
[MDIA] = KEYMAP( | |||||
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_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, | |||||
KC_TRNS, | |||||
KC_BTN1, KC_BTN2, 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_MPLY, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, 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) | |||||
}; | |||||
// 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) { | |||||
// TODO: Make this relevant to the ErgoDox EZ. | |||||
case 1: | |||||
ergodox_right_led_3_on(); | |||||
break; | |||||
case 2: | |||||
ergodox_right_led_2_on(); | |||||
break; | |||||
case 3: | |||||
ergodox_right_led_2_on(); | |||||
ergodox_right_led_3_on(); | |||||
break; | |||||
default: | |||||
// none | |||||
break; | |||||
} | |||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { | |||||
// if capslk is on, set led 1 on | |||||
ergodox_right_led_1_on(); | |||||
} else { | |||||
ergodox_right_led_1_off(); | |||||
} | |||||
}; |
@ -0,0 +1,50 @@ | |||||
# swedish-lindhe ErgoDox (EZ) keymap | |||||
This is a setup that is very useful for me. It may or may not be for | |||||
you. I will use it in conjunction with the A5 overlayed sv_SE layout. | |||||
The layout is subject to change (in particular I'm thinking about adding | |||||
a macro recording feature), but it have not changed much the past year | |||||
or two so you can expect it to be stable enough to learn it. | |||||
A5: http://aoeu.info/s/dvorak/svorak | |||||
My xkb map: https://github.com/lindhe/dotfiles/blob/master/usr/share/X11/xkb/symbols/se-A5 | |||||
The most major points: | |||||
====================== | |||||
I think the layout image can be found on | |||||
[www.keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/d84bc5915707cb30a4f9f754e06ecea3) | |||||
L0: | |||||
--- | |||||
* Easily accessible F11 key for fullscreening | |||||
* Print screen | |||||
* Middle mouse button for X-paste | |||||
* Improved reachability of meta buttons (LCtrl, LALt, AltGr, LGui etc.) | |||||
* Cluster Page Up/Down + Home/End by the right thumb | |||||
* Vim-like arrow layout in right bottom row | |||||
* Set media layer toggle to right thumb (Enter) | |||||
* Set apostrophe on LCtl (putting it next to some other small | |||||
characters) | |||||
L1: | |||||
--- | |||||
* Full function key layout | |||||
* Teensy button | |||||
L2: | |||||
--- | |||||
* Improved media buttons layout (close by the jkl; Vim binding) | |||||
* Improved layout of emulated mouse buttons | |||||
LED behaviour to binary+CAPS | |||||
============================ | |||||
The ErgoDox LEDs on this layout is using the two rightmost LEDs as the | |||||
two LSB in a two digit binary number, representing layer 0, 1, 2 and 3. | |||||
The leftmost byte/LED indicates CAPS status. |
@ -0,0 +1,3 @@ | |||||
ifndef MAKEFILE_INCLUDED | |||||
include ../../../Makefile | |||||
endif |
@ -0,0 +1,24 @@ | |||||
Magicforce "61" Handwired | |||||
======================= | |||||
Basically I cut 7 keys off the magicforce68 and handwired everything to a | |||||
teensy++ 2.0 to make it a ~60% board. | |||||
## Wiring Layout | |||||
![Wiring Layout](https://imgur.com/gallery/RxYyA) | |||||
## Pinout | |||||
The following pins are used: | |||||
``` | |||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } | |||||
#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } | |||||
``` | |||||
## Compiling and loading the firmware | |||||
To build the firmware, run `make handwired-magicforce61`. | |||||
Flash the firmware using the teensy loader or avrdude. |
@ -0,0 +1,162 @@ | |||||
/* | |||||
Copyright 2012 Jun Wako <wakojun@gmail.com> | |||||
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/>. | |||||
*/ | |||||
#ifndef CONFIG_H | |||||
#define CONFIG_H | |||||
#include "config_common.h" | |||||
/* USB Device descriptor parameter */ | |||||
#define VENDOR_ID 0xFEED | |||||
#define PRODUCT_ID 0x6060 | |||||
#define DEVICE_VER 0x0001 | |||||
#define MANUFACTURER Hexwire | |||||
#define PRODUCT Magicforce 61 | |||||
#define DESCRIPTION Handwired Magicforce 61 | |||||
/* key matrix size */ | |||||
#define MATRIX_ROWS 5 | |||||
#define MATRIX_COLS 14 | |||||
/* | |||||
* Keyboard Matrix Assignments | |||||
* | |||||
* Change this to how you wired your keyboard | |||||
* COLS: AVR pins used for columns, left to right | |||||
* ROWS: AVR pins used for rows, top to bottom | |||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |||||
* | |||||
*/ | |||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } | |||||
#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } | |||||
#define UNUSED_PINS | |||||
/* COL2ROW or ROW2COL */ | |||||
#define DIODE_DIRECTION COL2ROW | |||||
// #define BACKLIGHT_PIN B7 | |||||
// #define BACKLIGHT_BREATHING | |||||
// #define BACKLIGHT_LEVELS 3 | |||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |||||
#define DEBOUNCING_DELAY 5 | |||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | |||||
//#define MATRIX_HAS_GHOST | |||||
/* number of backlight levels */ | |||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |||||
#define LOCKING_SUPPORT_ENABLE | |||||
/* Locking resynchronize hack */ | |||||
#define LOCKING_RESYNC_ENABLE | |||||
/* | |||||
* Force NKRO | |||||
* | |||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | |||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | |||||
* makefile for this to work.) | |||||
* | |||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | |||||
* until the next keyboard reset. | |||||
* | |||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is | |||||
* fully operational during normal computer usage. | |||||
* | |||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | |||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | |||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a | |||||
* power-up. | |||||
* | |||||
*/ | |||||
//#define FORCE_NKRO | |||||
/* | |||||
* Magic Key Options | |||||
* | |||||
* Magic keys are hotkey commands that allow control over firmware functions of | |||||
* the keyboard. They are best used in combination with the HID Listen program, | |||||
* found here: https://www.pjrc.com/teensy/hid_listen.html | |||||
* | |||||
* The options below allow the magic key functionality to be changed. This is | |||||
* useful if your keyboard/keypad is missing keys and you want magic key support. | |||||
* | |||||
*/ | |||||
/* key combination for magic key command */ | |||||
#define IS_COMMAND() ( \ | |||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||||
) | |||||
/* control how magic key switches layers */ | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | |||||
/* override magic key keymap */ | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | |||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | |||||
//#define MAGIC_KEY_HELP1 H | |||||
//#define MAGIC_KEY_HELP2 SLASH | |||||
//#define MAGIC_KEY_DEBUG D | |||||
//#define MAGIC_KEY_DEBUG_MATRIX X | |||||
//#define MAGIC_KEY_DEBUG_KBD K | |||||
//#define MAGIC_KEY_DEBUG_MOUSE M | |||||
//#define MAGIC_KEY_VERSION V | |||||
//#define MAGIC_KEY_STATUS S | |||||
//#define MAGIC_KEY_CONSOLE C | |||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC | |||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE | |||||
//#define MAGIC_KEY_LAYER0 0 | |||||
//#define MAGIC_KEY_LAYER1 1 | |||||
//#define MAGIC_KEY_LAYER2 2 | |||||
//#define MAGIC_KEY_LAYER3 3 | |||||
//#define MAGIC_KEY_LAYER4 4 | |||||
//#define MAGIC_KEY_LAYER5 5 | |||||
//#define MAGIC_KEY_LAYER6 6 | |||||
//#define MAGIC_KEY_LAYER7 7 | |||||
//#define MAGIC_KEY_LAYER8 8 | |||||
//#define MAGIC_KEY_LAYER9 9 | |||||
//#define MAGIC_KEY_BOOTLOADER PAUSE | |||||
//#define MAGIC_KEY_LOCK CAPS | |||||
//#define MAGIC_KEY_EEPROM E | |||||
//#define MAGIC_KEY_NKRO N | |||||
//#define MAGIC_KEY_SLEEP_LED Z | |||||
/* | |||||
* Feature disable options | |||||
* These options are also useful to firmware size reduction. | |||||
*/ | |||||
/* disable debug print */ | |||||
//#define NO_DEBUG | |||||
/* disable print */ | |||||
//#define NO_PRINT | |||||
/* disable action features */ | |||||
//#define NO_ACTION_LAYER | |||||
//#define NO_ACTION_TAPPING | |||||
//#define NO_ACTION_ONESHOT | |||||
//#define NO_ACTION_MACRO | |||||
//#define NO_ACTION_FUNCTION | |||||
#endif |
@ -0,0 +1,69 @@ | |||||
#include "magicforce61.h" | |||||
#define _QWERTY 0 | |||||
#define _FN1 1 | |||||
#define _FN2 2 | |||||
#define KC_ KC_TRNS | |||||
#define KC_X0 LT(_FN2, KC_GRV) | |||||
#define KC_X1 MO(_FN1) | |||||
#define KC_NAV_ESC LT(_FN1, KC_ESC) | |||||
#define KC_GUI MAGIC_UNNO_GUI | |||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||
[_QWERTY] = KEYMAP( | |||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ | |||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , | |||||
/*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */ | |||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , | |||||
/*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */ | |||||
NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , | |||||
/*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */ | |||||
LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC , | |||||
/*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */ | |||||
LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1 | |||||
/*`-----+-----+-----+------------------------------+------+-----+-----' ANY */ | |||||
), | |||||
[_FN1] = KEYMAP( | |||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ | |||||
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , | |||||
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ | |||||
, , UP , , , , , ,INS ,PSCR, , , , , | |||||
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ | |||||
,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , , | |||||
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ | |||||
, , , , , ,VOLD,VOLU,MUTE, , , , | |||||
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ | |||||
, , , , , , , MPLY | |||||
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ | |||||
), | |||||
[_FN2] = KEYMAP( | |||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ | |||||
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , | |||||
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ | |||||
, , , , , , , 7 , 8 , 9 , , , , , | |||||
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ | |||||
, , , , , , , 4 , 5 , 6 , , , , | |||||
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ | |||||
, , , , , , 0 , 1 , 2 , 3 , , , | |||||
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ | |||||
, , , , , , , | |||||
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ | |||||
) | |||||
}; | |||||
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; | |||||
}; |
@ -0,0 +1,8 @@ | |||||
#include "magicforce61.h" | |||||
void matrix_init_kb(void) { | |||||
// put your keyboard start-up code here | |||||
// runs once when the firmware starts up | |||||
matrix_init_user(); | |||||
} |
@ -0,0 +1,20 @@ | |||||
#ifndef MAGICFORCE61_H | |||||
#define MAGICFORCE61_H | |||||
#include "quantum.h" | |||||
#define KEYMAP( \ | |||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | |||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | |||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | |||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ | |||||
K40, K41, K42, K45, K49, K4A, K4C, K4D \ | |||||
) { \ | |||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \ | |||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \ | |||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D }, \ | |||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_##K3D }, \ | |||||
{ KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_NO, KC_##K4C, KC_##K4D }, \ | |||||
} | |||||
#endif |
@ -0,0 +1,83 @@ | |||||
# MCU name | |||||
MCU = at90usb1286 | |||||
# Processor frequency. | |||||
# This will define a symbol, F_CPU, in all source code files equal to the | |||||
# processor frequency in Hz. You can then use this symbol in your source code to | |||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||||
# automatically to create a 32-bit value in your source code. | |||||
# | |||||
# This will be an integer division of F_USB below, as it is sourced by | |||||
# F_USB after it has run through any CPU prescalers. Note that this value | |||||
# does not *change* the processor frequency - it should merely be updated to | |||||
# reflect the processor speed set externally so that the code can use accurate | |||||
# software delays. | |||||
F_CPU = 16000000 | |||||
# | |||||
# LUFA specific | |||||
# | |||||
# Target architecture (see library "Board Types" documentation). | |||||
ARCH = AVR8 | |||||
# Input clock frequency. | |||||
# This will define a symbol, F_USB, in all source code files equal to the | |||||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||||
# at the end, this will be done automatically to create a 32-bit value in your | |||||
# source code. | |||||
# | |||||
# If no clock division is performed on the input clock inside the AVR (via the | |||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||||
F_USB = $(F_CPU) | |||||
# Interrupt driven control endpoint task(+60) | |||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||||
# Boot Section Size in *bytes* | |||||
# Teensy halfKay 512 | |||||
# Teensy++ halfKay 1024 | |||||
# Atmel DFU loader 4096 | |||||
# LUFA bootloader 4096 | |||||
# USBaspLoader 2048 | |||||
OPT_DEFS += -DBOOTLOADER_SIZE=1024 | |||||
# Build Options | |||||
# change yes to no to disable | |||||
# | |||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | |||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | |||||
CONSOLE_ENABLE ?= yes # Console for debug(+400) | |||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration | |||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | |||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||||
NKRO_ENABLE ?= no # USB Nkey Rollover | |||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default | |||||
MIDI_ENABLE ?= no # MIDI controls | |||||
UNICODE_ENABLE ?= no # Unicode | |||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | |||||
AUDIO_ENABLE ?= no # Audio output on port C6 | |||||
ifndef QUANTUM_DIR | |||||
include ../../../Makefile | |||||
endif | |||||
avrdude: build | |||||
ls /dev/tty* > /tmp/1; \ | |||||
echo "Reset your Pro Micro now"; \ | |||||
while [[ -z $$USB ]]; do \ | |||||
sleep 1; \ | |||||
ls /dev/tty* > /tmp/2; \ | |||||
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ | |||||
done; \ | |||||
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex | |||||
.PHONY: avrdude |