This commit is contained in:
Christopher Browne 2016-06-22 11:26:26 -04:00
commit b0caf32741
559 changed files with 3748 additions and 17234 deletions

70
keyboards/alps64/Makefile Normal file
View file

@ -0,0 +1,70 @@
# Target file name (without extension).
# project specific files
SRC = led.c
# MCU name
MCU = atmega32u2
# 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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # 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
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
ifndef QUANTUM_DIR
include ../../Makefile
endif

43
keyboards/alps64/alps64.c Normal file
View file

@ -0,0 +1,43 @@
/*
Copyright 2012,2013 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/>.
*/
#include "quantum.h"
#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
void matrix_init_kb(void) {
LED_ON();
_delay_ms(500);
LED_OFF();
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}

40
keyboards/alps64/alps64.h Normal file
View file

@ -0,0 +1,40 @@
/*
Copyright 2012,2013 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 ALPS64_H
#define ALPS64_H
#include "quantum.h"
/* Alps64 keymap definition macro */
#define KEYMAP( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
K30, K40, K50, K60, K70, K00, K10, K20 \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 } \
}
#endif

75
keyboards/alps64/config.h Normal file
View file

@ -0,0 +1,75 @@
/*
Copyright 2015 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 0x6464
#define DEVICE_VER 0x0001
#define MANUFACTURER TMK
#define PRODUCT Alps64
#define DESCRIPTION TMK keyboard firmware for Alps64
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 8
#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 }
#define UNUSED_PINS
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 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
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
#include "alps64.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
KEYMAP( \
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \
LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL),
};
const uint16_t PROGMEM fn_actions[] = {};

34
keyboards/alps64/led.c Normal file
View file

@ -0,0 +1,34 @@
/*
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/>.
*/
#include <avr/io.h>
#include "stdint.h"
#include "led.h"
void led_set(uint8_t usb_led)
{
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output high
DDRC |= (1<<5);
PORTC |= (1<<5);
} else {
// Hi-Z
DDRC &= ~(1<<5);
PORTC &= ~(1<<5);
}
}

197
keyboards/alps64/matrix.c Normal file
View file

@ -0,0 +1,197 @@
/*
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/>.
*/
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
static uint8_t debouncing = DEBOUNCE;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
inline
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
}
inline
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
}
void matrix_init(void)
{
// initialize row and col
unselect_rows();
init_cols();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
//debug
debug_matrix = true;
LED_ON();
_delay_ms(500);
LED_OFF();
}
uint8_t matrix_scan(void)
{
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
select_row(i);
_delay_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols();
if (matrix_debouncing[i] != cols) {
matrix_debouncing[i] = cols;
if (debouncing) {
debug("bounce!: "); debug_hex(debouncing); debug("\n");
}
debouncing = DEBOUNCE;
}
unselect_rows();
}
if (debouncing) {
if (--debouncing) {
_delay_ms(1);
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debouncing[i];
}
}
}
return 1;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & ((matrix_row_t)1<<col));
}
inline
matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void)
{
print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": ");
pbin_reverse16(matrix_get_row(row));
print("\n");
}
}
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7
* pin: B0 B1 B2 B3 B4 B5 B6 B7
*/
static void init_cols(void)
{
// Input with pull-up(DDR:0, PORT:1)
DDRB &= ~0b11111111;
PORTB |= 0b11111111;
}
/* Returns status of switches(1:on, 0:off) */
static matrix_row_t read_cols(void)
{
// Invert because PIN indicates 'switch on' with low(0) and 'off' with high(1)
return ~PINB;
}
/* Row pin configuration
* row: 0 1 2 3 4 5 6 7
* pin: D0 D1 D2 D3 D4 D5 D6 C2
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRD &= ~0b01111111;
PORTD &= ~0b01111111;
DDRC &= ~0b00000100;
PORTC &= ~0b00000100;
}
static void select_row(uint8_t row)
{
// Output low(DDR:1, PORT:0) to select
switch (row) {
case 0:
DDRD |= (1<<0);
PORTD &= ~(1<<0);
break;
case 1:
DDRD |= (1<<1);
PORTD &= ~(1<<1);
break;
case 2:
DDRD |= (1<<2);
PORTD &= ~(1<<2);
break;
case 3:
DDRD |= (1<<3);
PORTD &= ~(1<<3);
break;
case 4:
DDRD |= (1<<4);
PORTD &= ~(1<<4);
break;
case 5:
DDRD |= (1<<5);
PORTD &= ~(1<<5);
break;
case 6:
DDRD |= (1<<6);
PORTD &= ~(1<<6);
break;
case 7:
DDRC |= (1<<2);
PORTC &= ~(1<<2);
break;
}
}

View file

@ -0,0 +1,74 @@
# 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=512
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE ?= yes # 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
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
# 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 ?= yes # USB Nkey Rollover
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
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

View file

@ -0,0 +1,24 @@
arrow_pad keyboard firmware
======================
## Quantum MK Firmware
For the full Quantum feature list, see [the parent README.md](/README.md).
## Building
Download or clone the whole firmware and navigate to the keyboards/arrow_pad 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.
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`.
### 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 file named `<name>.c` in the keymaps folder, 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 `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

View file

@ -0,0 +1,114 @@
#include "arrow_pad.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave this function blank - it can be defined in a keymap file
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
bool process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file
return true;
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {
// leave this function blank - it can be defined in a keymap file
}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
#endif
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_action_user(record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}
#ifdef BACKLIGHT_ENABLE
#define CHANNEL OCR1C
void backlight_init_ports()
{
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
// Use full 16-bit resolution.
ICR1 = 0xFFFF;
// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
// Pin PB7 = OCR1C (Timer 1, Channel C)
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
// (i.e. start high, go low when counter matches.)
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init();
}
void backlight_set(uint8_t level)
{
if ( level == 0 )
{
// Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1));
CHANNEL = 0x0;
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
}
else if ( level == BACKLIGHT_LEVELS )
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF;
}
else
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
}
}
#endif

View file

@ -0,0 +1,18 @@
#ifndef ARROW_PAD_H
#define ARROW_PAD_H
#include "matrix.h"
#include "keymap.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#include <avr/io.h>
#include <stddef.h>
void matrix_init_user(void);
void matrix_scan_user(void);
bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led);
void backlight_init_ports(void);
#endif

View file

@ -0,0 +1,158 @@
/*
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 0x4096
#define DEVICE_VER 0x0001
#define MANUFACTURER Nobody
#define PRODUCT GoldPad
#define DESCRIPTION A custom keyboard
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 4
/*
* 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 { F0, F1, F4, F5, F6, F7 }
#define MATRIX_COL_PINS { B0, B1, B2, B3 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* 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 */
#define BACKLIGHT_LEVELS 3
/* 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,163 @@
// 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.
#include "arrow_pad.h"
#include "led.h"
// This is the 21-key keypad to 2x11 element matrix mapping
#define KEYMAP( \
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
KM___7, KM___8, KM___9, KM_EQU, \
KM___4, KM___5, KM___6, KM_PLS, \
KM___1, KM___2, KM___3, ___ENT, \
KM___0, _____0, KM_DOT, KM_ENT \
) { \
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
{ KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
{ KM___7, KM___8, KM___9, KM_EQU }, \
{ KM___4, KM___5, KM___6, KM_PLS }, \
{ KM___1, KM___2, KM___3, KC_NO }, \
{ KM___0, KC_NO, KM_DOT, KM_ENT } \
}
#define LAYER_BASE 0
#define LAYER_EDIT 1
#define LAYER_FUNCTION 2
#define MACRO_COPY_CUT 0
#define MACRO_SHIFT_CONTROL 1
#define MACRO_CONTROL_ALT 2
#define M_COPY KC_FN5
#define M_SHFCT KC_FN6
#define M_CTALT KC_FN7
#define SC_UNDO LCTL(KC_Z)
#define SC_REDO LCTL(KC_Y)
#define SC_CUT LCTL(KC_X)
#define SC_COPY LCTL(KC_C)
#define SC_PSTE LCTL(KC_V)
#define SC_SELA LCTL(KC_A)
#define SC_SAVE LCTL(KC_S)
#define SC_OPEN LCTL(KC_O)
#define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4)
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = KEYMAP( \
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PEQL, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, XXXXXXX, \
KC_P0, KC_PCMM, KC_PDOT, KC_PENT ),
[LAYER_EDIT] = KEYMAP( \
KC_ESC, KC_TAB, KC_SPC, _______, \
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
[LAYER_FUNCTION] = KEYMAP( \
KC_FN2, KC_FN3, KC_FN4, _______, \
KC_FN1, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, XXXXXXX, \
RESET, _______, _______, _______ ),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
[2] = ACTION_BACKLIGHT_TOGGLE(),
[3] = ACTION_BACKLIGHT_INCREASE(),
[4] = ACTION_BACKLIGHT_DECREASE(),
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch (id) {
case MACRO_COPY_CUT:
if (record->event.pressed) {
register_code(KC_LCTL);
if (record->tap.count == 1) {
register_code(KC_C);
unregister_code(KC_C);
}
else if (record->tap.count == 2) {
register_code(KC_X);
unregister_code(KC_X);
}
unregister_code(KC_LCTL);
}
break;
case MACRO_SHIFT_CONTROL:
if (record->event.pressed) {
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count == 3) register_code(KC_PENT);;
}
else {
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
unregister_code(KC_PENT);
}
break;
case MACRO_CONTROL_ALT:
if (record->event.pressed) {
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
}
else {
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
}
break;
}
return MACRO_NONE;
}
void led_set_user(uint8_t usb_led)
{
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
} else {
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
} else {
// Hi-Z
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
}

View file

@ -0,0 +1,17 @@
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # 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
CONFIG_H = keymaps/$(KEYMAP)/config.h

View file

@ -0,0 +1,893 @@
:100000000C944A010C948E010C948E010C948E0178
:100010000C948E010C948E010C948E010C948E0124
:100020000C948E010C948E010C94B10A0C94830BE9
:100030000C9424180C948E010C948E010C948E0157
:100040000C948E010C948E010C948E010C948E01F4
:100050000C948E010C948C180C948E010C948E01CF
:100060000C948E010C948E010C948E010C948E01D4
:100070000C948E010C948E010C948E010C948E01C4
:100080000C948E010C948E010C948E010C948E01B4
:100090000C948E010C948E010C948E010C948E01A4
:1000A0000C948E010C948E010C948E01F00B120CAA
:1000B000000D120C000D570C7A0C000DCF0CE20C49
:1000C000730F730FA20FA20F06110611061106116E
:1000D000E10F061191109110F71006110611001191
:1000E0009E109E109E109E109E109E109E109E10A0
:1000F0009E109E109E109E109E109E109E109E1090
:10010000AE10BC10C310CA10D410F1A2028A00D2E3
:1001100000D000D100C801C802C829002B0031005E
:10012000C0005F0060006100570059005A005B008A
:1001300053005400550056005C005D005E005800FE
:1001400000006200630029002B002C0001004A001F
:1001500052004B00C7004D0051004E00C100190174
:100160001C011D015000C5004F00C60000002A0000
:100170004C00C200C300C4000100010001000100E6
:100180000100010001000100C100010001000100A7
:1001900001000100010001000000005001001A03ED
:1001A0004100720072006F00770020005000610073
:1001B000640020003200310000000E034E006F008A
:1001C00062006F0064007900000004030904090262
:1001D0003B00020100A0FA09040000010301010034
:1001E000092111010001223F000705810308000ACF
:1001F000090401000103000000092111010001228E
:1002000039000705820310000112011001000000EF
:1002100008EDFE974001000102000105010906A159
:1002200001050719E029E7150025019508750181E9
:1002300002050819012905950575019102950175B9
:100240000391010507190029771500250195787597
:10025000018102C005010906A101050719E029E78E
:100260001500250195087501810295017508810128
:100270000508190129059505750191029501750378
:1002800091010507190029FF150025FF950675083E
:100290008100C00011241FBECFEFDAE0DEBFCDBF6A
:1002A00004B603FE24C08091C3019091C401A091C3
:1002B000C501B091C6018730904BA740B04BB9F44F
:1002C0001092C3011092C4011092C5011092C60190
:1002D00014BE84B7877F84BF88E10FB6F8948093FB
:1002E0006000109260000FBEE0E0FFE3099511E0AE
:1002F000A0E0B1E0E4E9F7E302C005900D92AA3175
:10030000B107D9F711E0AAE1B1E001C01D92A33C09
:10031000B107E1F70E94F8070C94C81B0C94000089
:100320000895089581E008950C9490010C94910132
:100330000C9492010C9400020895CF93DF93EC018A
:100340006130F1F018F06230E9F155C08A818823FC
:1003500009F451C080EE0E94670E8D81807F80314C
:1003600029F486E00E94670E86E006C0803231F4F0
:100370008BE10E94670E8BE10E94060F80EE1FC08A
:100380008A818823C1F08D8182958F7090E00397D8
:100390001CF482E00E942E0F8D81807F803219F440
:1003A00081E00E942E0F8D81807F803321F588E5CA
:1003B0000E94670E20C083E00E94350F88E50E94EE
:1003C000060F19C08A81882399F08D8182958F70DC
:1003D00090E002971CF481E00E942E0F8D8182959F
:1003E0008F7090E002973CF084E00E942E0F03C0D3
:1003F00085E00E94350F80E090E0DF91CF91089575
:1004000081FF03C0569A5E9A02C056985E9880FF9C
:1004100005C03F9A88B18F6788B908953F9847987B
:10042000089581E008950C94110208950F931F938D
:10043000CF93DF938C01FC01C081D181CE010E945A
:100440005E16BE010E94C202EC01B8010E941302B6
:10045000882309F48DC0F8018281882309F44AC0F9
:100460008091250181111FC0C431F0E5DF0709F03B
:1004700051C00E94150281E0809325010E94561808
:10048000909324018093230110921C0110921E016D
:1004900010921D011092200110921F011092220152
:1004A0001092210165C080912301909124010E9446
:1004B0006218883C910570F480911C01E82FF0E0EF
:1004C000EE0FFF1FE35EFE4FD183C0838F5F8093EB
:1004D0001C014EC0C43880E5D80721F0C538D0458E
:1004E00001F13AC0F8018281882341F010921A018B
:1004F00082E01EC0C438E0E5DE0759F580911A019C
:10050000811106C086E20E94670E86E20E94060FF5
:1005100082E01CC0C438F0E5DF0741F3C538D045A0
:10052000D9F4F8018281882331F010921B0180E216
:100530000E942E0F1DC080911B01811106C087E211
:100540000E94670E87E20E94060F80E20E94350F2C
:100550000FC0C538D04529F381E080931A018093FC
:100560001B01C801DF91CF911F910F910C9498014D
:1005700080E0DF91CF911F910F9108950C94940129
:100580000C9496019BE0799FF001112496E1899FDC
:10059000E00DF11D1124E60FF11DEE0FFF1FE65EC9
:1005A000FE4F859194910895880F991FFC01E6579D
:1005B000F040859194910895880F991FFC01E65FA2
:1005C000FE4F8591949108950F931F93CF93DF93DE
:1005D000EC01811520E3920750F5C11580E2D807A0
:1005E00008F0C3C0CB3BD10590F4C83AD10508F060
:1005F0006AC0C53AD10508F05BC0C430D10508F027
:10060000D0C1219709F0CAC101E010E00AC2CF3F72
:10061000D10511F008F0C5C1C03FD10508F0A2C056
:10062000CE01805E9109089708F4BBC1B7C1C13003
:1006300090E5D90709F4A2C020F5C0318FE4D807AE
:1006400070F4C11590E4D90708F094C0C11521E3F6
:10065000D20708F0A3C1DD278E01106CE2C1C115DD
:10066000D04509F09BC10E9465118FEF94E32CE007
:10067000815090402040E1F700C000000E94B11876
:10068000D0C1C11597E5D90758F4C03121E5D2078B
:1006900008F01CC1C43180E5D80708F475C07EC1DC
:1006A000CE0190578115904108F078C1DF7073C179
:1006B000C53AD10509F477C1C63AD10509F076C12A
:1006C00002E810E4AEC1C83AD10509F472C1C93AD2
:1006D000D10509F471C1CA3AD10509F470C1CB3A08
:1006E000D10509F46FC1CC3AD10509F46EC1CD3AF8
:1006F000D10509F46DC1C03BD10509F46CC1CE3AF6
:10070000D10509F46BC1CF3AD10509F46AC1C13BE7
:10071000D10509F469C1C23BD10509F468C1C33BE5
:10072000D10509F467C1C43BD10509F466C1C53BD5
:10073000D10509F465C1C63BD10509F464C1C73BC5
:10074000D10509F463C1C83BD10509F462C1C93BB5
:10075000D10509F461C1CA3BD10509F460C100E0CB
:1007600014E45FC18E0110655CC1CE019F700E94D0
:10077000DC0258C1DF708E01106A53C18091AE0156
:1007800081608093AE014DC10E94611A811102C047
:100790000E94471A0E947E1A90E09093C3018093B2
:1007A000C201C23080E5D80721F48091C201816086
:1007B00086C0C43090E5D90721F48091C2018260DF
:1007C0007EC0C63020E5D20721F48091C20184604A
:1007D00076C0C83080E5D80719F48091C20127C0DF
:1007E000CA3090E5D90721F48091C201806167C0C9
:1007F000CC3020E5D20721F48091C20180625FC035
:10080000CE3080E5D80721F48091C201806457C0C2
:10081000C03190E5D90721F48091C20180684FC0B2
:10082000C23120E5D20729F48091C201846088603A
:1008300046C0C33080E5D80721F48091C2018E7F85
:100840003EC0C53090E5D90721F48091C2018D7F6B
:1008500036C0C73020E5D20721F48091C2018B7FDA
:100860002EC0C93080E5D80719F48091C20126C096
:10087000CB3090E5D90721F48091C2018F7E1FC053
:10088000CD3020E5D20721F48091C2018F7D17C0C1
:10089000CF3080E5D80721F48091C2018F7B0FC053
:1008A000C13190E5D90721F48091C2018F7707C04B
:1008B000C331D04531F48091C2018B7F877F809313
:1008C000C2018091C2010E94821AABC08D2F99276C
:1008D0008F70992781309105D9F49E0123703327B9
:1008E00002C0880F991F2A95E2F79C688E0144E0A8
:1008F000000F111F4A95E1F700271370802B912BF1
:1009000053E0CC0FDD1F5A95E1F7C076DD272FC0ED
:100910008230910531F4DC2FCC278E01016F106AF3
:1009200080C08330910569F4CE018370992701E07E
:1009300010E002C0000F111F8A95E2F7C8019C6801
:100940000FC084309105B9F4CE018370992701E07E
:1009500010E002C0000F111F8A95E2F7C8019A68E3
:1009600023E0CC0FDD1F2A95E1F7C07ED7708C0104
:100970000C2B1D2B56C08530910531F4DC2FCC2774
:100980008E01046F106A4DC0069709F04AC0CF71FE
:10099000DD27DC2FCC278E01106243C000E010E081
:1009A00040C08E013EC001E810E43BC003E810E403
:1009B00038C002EE14E435C009EE14E432C00AEE89
:1009C00014E42FC005EB14E42CC006EB14E429C09A
:1009D00007EB14E426C00CEC14E423C00DEC14E483
:1009E00020C003E815E41DC00AE815E41AC002E9B6
:1009F00015E417C004E915E414C001E216E411C0BF
:100A000003E216E40EC004E216E40BC005E216E4AD
:100A100008C006E216E405C007E216E402C00AE2D6
:100A200016E4C801DF91CF911F910F9108959BE0CB
:100A3000799FF001112496E1899FE00DF11D1124A9
:100A4000E60FF11DEE0FFF1FE65EFE4F85919491BC
:100A5000803E9105E0F4803C910558F58133910585
:100A600009F46FC048F48932910509F463C08A32F1
:100A7000910509F46DC072C089339105E9F082389F
:100A80009105D1F08533910509F44DC067C0833ECF
:100A9000910581F138F4803E9105B9F0823E9105CF
:100AA000D9F05CC0863E910561F1873E9105A1F1C8
:100AB00055C00E94D40208952091C20120FD02C0B9
:100AC00021FF4CC080EE90E049C08091C20180FFC0
:100AD000F9CF89E390E042C08091C20182FF0EC04D
:100AE0008091C20184FF03C080E090E037C083EEB4
:100AF00090E034C08091C20182FFF2CF82EE90E09C
:100B00002DC08091C20183FF0BC08091C20184FD82
:100B1000EBCF87EE90E022C08091C20183FFF5CF3A
:100B200086EE90E01BC08091C20185FF07C089E27C
:100B300090E014C08091C20185FFF9CF85E390E079
:100B40000DC08091C20186FF07C08AE290E006C016
:100B50008091C20186FFF9CF81E390E00E94E40218
:100B600008950C949A01E82FF0E0E15FFE4F808138
:100B7000E82FEF70F0E082958F7021E030E0A9015E
:100B800002C0440F551F8A95E2F740A308950F93C2
:100B90001F93CF93DF9385B7806885BF85B7806843
:100BA00085BFCAE0D0E001E010E0FE01E15FFE4F4A
:100BB0008081E82FEF70F0E021A182958F70A8016D
:100BC00002C0440F551F8A95E2F7CA01822B81A308
:100BD0008C2F0E94B305219740F75D9A5B9ADF91B5
:100BE000CF911F910F910C94BE020F931F93CF933F
:100BF000DF9301E311E0CAE0D5E08C2F0E94B3053A
:100C00004D9902C082E001C080E04B9B8160F801F9
:100C100092918F01981719F08083D09300018C2F47
:100C20000E94B305C15048F78091000187FD1CC0A8
:100C30008150809300018F3F39F08FE99FE0019749
:100C4000F1F700C0000010C080E090E0FC01EF5C14
:100C5000FE4FDC01AA5DBE4F1A962C9122870197A8
:100C6000853FEFEF9E0791F70E94C00281E0DF9180
:100C7000CF911F910F91089591E001C0990F8A952E
:100C8000EAF72AE030E040E050E061E070E0F9018E
:100C9000EF5CFE4F8081892349F0FB01022E02C0E8
:100CA000EE0FFF1F0A94E2F74E2B5F2B2150310904
:100CB00070F7CA0108950895CF9381E00E943C0621
:100CC0000E94D917C82F80E00E943C060E94D917C5
:100CD0008C0FCF91089580914C0108950895CF9382
:100CE000DF9300D01F92CDB7DEB72091B901243039
:100CF00021F523E029839B838A8381E08093E900A7
:100D00008FEF9091E800815095FD06C095ED9A9582
:100D1000F1F700008111F5CF8091E80085FF0DC04B
:100D200040E050E063E070E0CE0101960E94A1082F
:100D30008091E8008E778093E8000F900F900F90DD
:100D4000DF91CF910895CF93DF9300D01F92CDB75D
:100D5000DEB72091B901243021F522E029839B835D
:100D60008A8381E08093E9008FEF9091E8008150C1
:100D700095FD06C095ED9A95F1F700008111F5CF2C
:100D80008091E80085FF0DC040E050E063E070E036
:100D9000CE0101960E94A1088091E8008E77809391
:100DA000E8000F900F900F90DF91CF910895CF93AF
:100DB000DF932091B901243009F048C0EC01809103
:100DC0000B018823E1F080910C018823C1F082E0BF
:100DD0008093E9008FEF9091E800815095FD06C067
:100DE00095E19A95F1F700008111F5CF8091E80027
:100DF00085FF2CC040E050E060E170E017C081E06A
:100E00008093E9008FEF9091E800815095FD06C036
:100E100095ED9A95F1F700008111F5CF8091E800EA
:100E200085FF14C040E050E068E070E0CE010E9411
:100E3000A1088091E8008E778093E80080E1FE01B0
:100E4000ACE3B1E001900D928A95E1F7DF91CF918B
:100E500008958091B801811109C00E94360A0E944C
:100E6000930A8091E20084608093E20008951092DA
:100E7000B8010895089508950C941E1842E061EC9D
:100E800081E00E94B00942E161EC82E00C94B0097B
:100E90008091BB01833009F453C030F4813071F08C
:100EA000823009F48CC008958A3009F478C08B3000
:100EB00009F45EC0893009F09AC020C08091BA015F
:100EC000813A09F094C08091E800877F8093E80020
:100ED0008091BE019091BF01892B21F460E18CE3E8
:100EE00091E003C060E080E090E070E00E94EC08D8
:100EF0008091E8008B778093E80008958091BA0193
:100F0000813209F074C08091BE019091BF010297B7
:100F100008F06DC08091E800877F8093E8008091A1
:100F2000E80082FD05C08091B9018111F8CF5FC052
:100F30008091F10080934C018091E8008B7753C041
:100F40008091BA01813A09F052C08091BE0190911E
:100F5000BF01892B09F04BC08091E800877F809307
:100F6000E8008091E80080FFFCCF80910B0136C043
:100F70008091BA018132D9F58091BE019091BF0173
:100F8000892BA9F58091E800877F8093E8000E9473
:100F9000E5098091BC0180930B010C94651180914F
:100FA000BA01813221F58091E800877F8093E800C3
:100FB0000E94E5098091BD0180934D0108958091C3
:100FC000BA01813AA1F48091E800877F8093E8001C
:100FD0008091E80080FFFCCF80914D018093F1006B
:100FE0008091E8008E778093E8000C94E5090895DD
:100FF00084B7877F84BF88E10FB6F8948093600040
:10100000109260000FBE90E080E80FB6F8948093D5
:101010006100909361000FBE0E947D0D0E94360A10
:101020000E94930A8091E20084608093E2007894A9
:101030000E94190D0E947F0D81E091E00E94340D05
:101040008091B901853069F40E94E5178091B7015C
:101050008823B1F30E941018882391F30E948B0813
:10106000EFCF0E94890DECCF292F33272330310594
:10107000C9F064F42130310581F02230310509F0E6
:1010800042C08BE390E02EEC31E041C021323105CB
:10109000F1F02232310549F136C082E190E029E0D9
:1010A00032E035C099278130910541F082309105B9
:1010B00041F0892B41F5EAECF1E005C0EAEBF1E003
:1010C00002C0EEE9F1E0849190E09F0120C0662328
:1010D00039F06130C1F489E090E029EF31E017C0C8
:1010E00089E090E020EE31E012C0662339F06130F3
:1010F00051F489E390E02BE132E009C08FE390E006
:1011000024E532E004C080E090E020E030E0FA0125
:1011100031832083089580E189BD82E189BD09B4CE
:1011200000FEFDCF8091D8008F7D8093D800809104
:10113000E00082608093E0008091E00081FDFCCFC0
:101140000895CF92DF92EF92FF920F931F93CF9368
:10115000DF93EC018B016A010E94040A811133C004
:10116000C114D10439F0F60180819181081B190B5B
:10117000C80FD91FE12CF12C0115110519F180912F
:10118000E80085FD16C08091E8008E778093E80026
:10119000C114D10449F0F60180819181E80EF91E55
:1011A000F182E08285E00FC00E94040A882321F3C7
:1011B0000AC089918093F10001501109FFEFEF1AE5
:1011C000FF0ADACF80E0DF91CF911F910F91FF905E
:1011D000EF90DF90CF9008952091C0013091C10130
:1011E0002617370748F06115710539F42091E8009A
:1011F0002E772093E80001C0B90140E06115710528
:10120000A9F12091B901222309F443C0253009F442
:1012100042C02091E80023FD40C02091E80022FD5B
:1012200032C02091E80020FFE9CF4091F3002091E7
:10123000F20030E0342BFC01CF016115710559F04B
:101240002830310540F481918093F100615071099B
:101250002F5F3F4FF1CF41E02830310509F040E0EA
:101260002091E8002E772093E800C8CF4111C9CF24
:101270000AC08091B901882361F0853061F08091C6
:10128000E80083FD0AC08091E80082FFF2CF80E091
:10129000089582E0089583E0089581E00895209103
:1012A000C0013091C1012617370748F0611571055B
:1012B00039F42091E8002E772093E80001C0B901AD
:1012C000FC0120E06115710591F18091B90188233D
:1012D00009F440C0853009F43FC08091E80083FDE7
:1012E0003DC08091E80082FD2FC08091E80080FF22
:1012F000E9CF2091F3008091F20090E0922B6115EC
:10130000710559F08830910540F424912093F10043
:101310003196615071090196F2CF21E0089709F0EA
:1013200020E08091E8008E778093E800CBCF2111F8
:10133000CCCF0AC08091B901882361F0853061F07B
:101340008091E80083FD0AC08091E80082FFF2CF1F
:1013500080E0089582E0089583E0089581E0089593
:10136000982F973058F59093E900981739F07091BD
:10137000EC002091ED005091F00003C0242F762F57
:1013800050E021FF19C03091EB003E7F3093EB001D
:101390003091ED003D7F3093ED003091EB003160F6
:1013A0003093EB007093EC002093ED005093F0002D
:1013B0002091EE0027FF07C09F5FD3CF8F708093EF
:1013C000E90081E0089580E008958091BA0187FFE7
:1013D00011C08091E80082FD05C08091B9018111A2
:1013E000F8CF11C08091E8008B770BC08091B901D4
:1013F000882349F08091E80080FFF8CF8091E800D1
:101400008E778093E80008952091E4003091E50004
:1014100095E64091EC00842F817040FF22C08091BE
:10142000E80080FD1CC08091B901882391F08530CF
:1014300091F08091EB0085FD10C04091E400509147
:10144000E5004217530729F39A01915011F784E000
:10145000089582E0089583E0089581E0089580E092
:1014600008954091E80042FFDECF08950E94A40A4B
:101470000E94AC0AE0EEF0E0808181608083E8EDBC
:10148000F0E080818F77808319BCA7EDB0E08C916C
:101490008E7F8C9380818F7E80831092B801089517
:1014A0000F931F93CF93DF930E94A40A0E94AC0A6C
:1014B000C8EDD0E088818F778883888180688883B1
:1014C00088818F7D888319BC1092B9011092B50173
:1014D0001092B7011092B60100EE10E0F801808181
:1014E0008B7F808388818160888342E060E080E038
:1014F0000E94B009E1EEF0E080818E7F8083E2EE11
:10150000F0E0808181608083808188608083F80141
:1015100080818E7F8083888180618883DF91CF91F5
:101520001F910F910895E8EDF0E080818F7E808318
:10153000E7EDF0E080818160808384E082BF81E01C
:101540008093B8010C94500AE8EDF0E080818E7F22
:1015500080831092E20008951092DA001092E10068
:1015600008951F920F920FB60F9211242F933F935D
:101570004F935F936F937F938F939F93AF93BF939B
:10158000EF93FF938091E10082FF0BC08091E20016
:1015900082FF07C08091E1008B7F8093E1000E9471
:1015A000180D8091DA0080FF1FC08091D80080FF65
:1015B0001BC08091DA008E7F8093DA008091D90081
:1015C00080FF0DC080E189BD82E189BD09B400FEC4
:1015D000FDCF81E08093B9010E94290705C019BCA5
:1015E0001092B9010E9437078091E10080FF19C075
:1015F0008091E20080FF15C08091E2008E7F809391
:10160000E2008091E20080618093E2008091D80046
:1016100080628093D80019BC85E08093B9010E9454
:101620003B078091E10084FF30C08091E20084FF9D
:101630002CC080E189BD82E189BD09B400FEFDCFE7
:101640008091D8008F7D8093D8008091E1008F7EBB
:101650008093E1008091E2008F7E8093E200809190
:10166000E20081608093E2008091B501882311F04F
:1016700084E007C08091E30087FD02C081E001C0E3
:1016800083E08093B9010E943C078091E10083FFD1
:1016900029C08091E20083FF25C08091E100877F0F
:1016A0008093E10082E08093B9011092B5018091AE
:1016B000E1008E7F8093E1008091E2008E7F809335
:1016C000E2008091E20080618093E20042E060E00D
:1016D00080E00E94B0098091F00088608093F00063
:1016E0000E943A07FF91EF91BF91AF919F918F9127
:1016F0007F916F915F914F913F912F910F900FBE0E
:101700000F901F9018951F920F920FB60F921124F1
:101710002F933F934F935F936F937F938F939F93F9
:10172000AF93BF93CF93DF93EF93FF93C091E90003
:10173000CF708091EC00D82FD17080FDD0E810924E
:10174000E9008091F000877F8093F00078940E94F8
:10175000C70B1092E9008091F00088608093F00040
:10176000CD2BCF70C093E900FF91EF91DF91CF9126
:10177000BF91AF919F918F917F916F915F914F91A9
:101780003F912F910F900FBE0F901F9018951F93B0
:10179000CF93DF93CDB7DEB7AA970FB6F894DEBF2D
:1017A0000FBECDBFEAEBF1E088E08E0F9091F10023
:1017B00091938E13FBCF0E9448078091E80083FF2E
:1017C0001FC18091BA019091BB01492F50E04A306E
:1017D000510508F015C1FA01EA5AFF4F0C948C1B11
:1017E000803881F0823809F00BC18091BE018F7082
:1017F0008093E9008091EB0085FB882780F91092A7
:10180000E90006C08091B6019091B7019111826004
:101810009091E800977F9093E8008093F1001092F8
:10182000F100C8C0282F2D7F09F0EAC0882319F0E5
:10183000823061F0E5C08091BC01813009F0E0C0E8
:10184000933009F080E08093B7012BC08091BC01F8
:10185000811127C08091BE018F7009F4D1C080939F
:10186000E9002091EB0020FF1CC0933021F480910F
:10187000EB00806214C09091EB0090619093EB00BC
:1018800021E030E0A90102C0440F551F8A95E2F71C
:101890004093EA001092EA008091EB008860809308
:1018A000EB001092E9008091E800877F86C08111EB
:1018B000A7C01091BC011F778091E3008078812B35
:1018C0008093E3008091E800877F8093E8000E9486
:1018D000E5098091E80080FFFCCF8091E3008068FB
:1018E0008093E300111102C082E001C083E0809385
:1018F000B90186C08058823008F082C08091BC0156
:101900009091BD018C3D53E0950779F583E08A8382
:101910008AE289834FB7F894DE01139620E03EE017
:1019200051E2E32FF0E050935700E49120FF03C011
:10193000E295EF703F5FEF708E2F90E0EA3010F08D
:10194000C79601C0C0968D939D932F5F243149F7B0
:101950004FBF8091E800877F8093E8006AE270E0E3
:10196000CE0101960E94EC0814C0AE014F5F5F4F9C
:101970006091BE010E943408BC01009709F440C088
:101980009091E800977F9093E80089819A810E9466
:101990004F098091E8008B778093E80031C0803850
:1019A00079F58091E800877F8093E8008091B50108
:1019B0008093F1008091E8008E778093E8000E9488
:1019C000E5091EC081111CC09091BC019230C0F489
:1019D0008091E800877F8093E8009093B5010E9492
:1019E000E5098091B501811106C08091E30087FD72
:1019F00002C081E001C084E08093B9010E943E07EB
:101A00008091E80083FF0AC08091E800877F80937F
:101A1000E8008091EB0080628093EB00AA960FB6FD
:101A2000F894DEBF0FBECDBFDF91CF911F91089517
:101A30000895CF938091B9018823A1F0C091E90066
:101A4000CF709091EC00892F817090FD80E8C82BB9
:101A50001092E9008091E80083FD0E94C70BCF70CF
:101A6000C093E900CF910895909353018093520160
:101A70000895E0915201F0915301309721F00190C7
:101A8000F081E02D099480E00895E0915201F091F9
:101A90005301309721F00280F381E02D09940895DD
:101AA00020915001309151018217930771F090936A
:101AB000510180935001E0915201F0915301309710
:101AC00021F00680F781E02D0994089520914E01C0
:101AD00030914F018217930771F090934F018093DB
:101AE0004E01E0915201F0915301309721F00084B2
:101AF000F185E02D0994089508950C947C0D0E94C1
:101B00004D180E94C7050E941A1981E080930C01AC
:101B100008955F926F927F928F929F92AF92BF9241
:101B2000CF92DF92EF92FF920F931F93CF93DF93A9
:101B300000D000D01F92CDB7DEB70E94F50599E521
:101B4000C92E91E0D92E01E010E0AA24A394B12C73
:101B5000502E802F0E943C064C01F601729062903C
:101B60006F01682679266114710431F4012B09F4A0
:101B70003BC000E010E0ECCF8091AE0181FD0E94FF
:101B80005B062AE030E07501022E02C0EE0CFF1C5D
:101B90000A94E2F7C70186219721892B09F129834D
:101BA0005A828E209F2091E0892809F490E09B833F
:101BB0000E9456188160782F9D838C8349815A81B9
:101BC0006B818D810E94390E000F111FF801EB5AB5
:101BD000FE4F80819181E826F926F182E08214C0CF
:101BE0002150310980F6C2CF8FEF89838A831B820F
:101BF0000E9456188160782F9D838C8349815A8179
:101C00006B818D810E94390E109154010E94390D13
:101C10001817D1F00E94390D809354010F900F9046
:101C20000F900F900F90DF91CF911F910F91FF9028
:101C3000EF90DF90CF90BF90AF909F908F907F906C
:101C40006F905F900C94B1050F900F900F900F90D4
:101C50000F90DF91CF911F910F91FF90EF90DF9048
:101C6000CF90BF90AF909F908F907F906F905F903C
:101C70000895CF93DF93CDB7DEB72B970FB6F894C7
:101C8000DEBF0FBECDBF4F83588769877A878B87AA
:101C9000DE01119686E0FD0111928A95E9F785E053
:101CA000FE01379601900D928A95E1F749815A819C
:101CB0006B817C818D819E810E9403142B960FB6CF
:101CC000F894DEBF0FBECDBFDF91CF910895CF93C3
:101CD000882309F499C0C82F8CEF8C0F813A48F4FF
:101CE0008C2F0E944A1B81118FC08C2F0E94DD1601
:101CF0000CC080E28C0F883058F4C77081E001C0BE
:101D0000880FCA95EAF70E946317CF910C94AA171F
:101D10008BE58C0F833078F4C53A29F0C63A31F060
:101D200083E890E005C081E890E002C082E890E09E
:101D3000CF910C94500D88E58C0F833108F064C06E
:101D4000C83A39F1C93A41F1CA3A49F1CB3A51F1AD
:101D5000CC3A59F1CD3A61F1C03B69F1CE3A71F11B
:101D6000CF3A79F1C13B81F1C23B89F1C33B91F19B
:101D7000C43B99F1C53BA1F1C63BA9F1C73BB1F109
:101D8000C83BB9F1C93BC1F1CA3BC9F180E090E061
:101D900038C082EE90E035C089EE90E032C08AEE25
:101DA00090E02FC085EB90E02CC086EB90E029C03E
:101DB00087EB90E026C08CEC90E023C08DEC90E0A7
:101DC00020C083E891E01DC08AE891E01AC082E952
:101DD00091E017C084E991E014C081E292E011C063
:101DE00083E292E00EC084E292E00BC085E292E0D2
:101DF00008C086E292E005C087E292E002C08AE273
:101E000092E0CF910C94660DCF910895882329F12B
:101E10009CEF980F913A18F40E941F170DC090E2A2
:101E2000980F983058F4877091E001C0990F8A9507
:101E3000EAF7892F0E9469170C94AA179BE5980F5F
:101E4000933020F480E090E00C94500D885A833158
:101E500020F480E090E00C94660D0895882321F032
:101E60000E9463170C94AA170895882321F00E94FA
:101E700069170C94AA1708957F928F929F92AF9240
:101E8000BF92CF92DF92EF92FF920F931F93CF9367
:101E9000DF931F92CDB7DEB77C01C62E772EFC01F3
:101EA000158112951F70028101110E9480170E94F6
:101EB000D616882379F0002369F080E28C0D8830F3
:101EC00048F082E00E94BF160E94D61691E0D82EFC
:101ED000D92601C0D12CE72DE295EF70F0E0E05A51
:101EE000FF4F0C948C1B872D807F172D1F7088232C
:101EF00011F01295107F002389F0112309F46DC1B0
:101F000080E28C0D883020F4812F0E94631703C07B
:101F1000812F0E9473170E94AA175FC18C2D0E9407
:101F2000060F112309F472C180E28C0D883020F471
:101F3000812F0E94691703C0812F0E9479170E9488
:101F4000AA1764C1872D807F972D9F70803211F46E
:101F5000892F03C0892F8295807FCC2021F0F1E06A
:101F6000CF16A1F01DC0002339F0112319F1113053
:101F700009F50E9493174AC1112319F0113009F491
:101F800045C189830E9496178981E5C0002321F00D
:101F9000163008F03BC10EC0153008F037C1DBC069
:101FA000002359F0112331F0F701958190FF15C1FD
:101FB0009F7095830E942E0F29C1112309F4CBC075
:101FC00012C1872D837009F052C001111FC18C2DE1
:101FD000829586958770880F880F9C2D9F70892E1B
:101FE000912CA12CB12C082E04C0880C991CAA1C81
:101FF000BB1C0A94D2F7C4FE14C00FE010E020E02E
:1020000030E0B901A80104C0440F551F661F771FB7
:102010008A95D2F7CB01BA0160957095809590951D
:1020200003C060E070E0CB01272D26952695237034
:1020300030E02230310569F02330310589F068291C
:1020400079298A299B292130310571F00E944B158D
:10205000DDC0682979298A299B290E946715D6C085
:102060000E944B15C501B4010E942F15CFC000235B
:1020700019F0872D817001C08695882309F4C6C0A8
:102080008C2D829586958770880F880F9C2D9F7068
:10209000892E912CA12CB12C082E04C0880C991CDF
:1020A000AA1CBB1C0A94D2F7C4FE14C00FE010E0B7
:1020B00020E030E0B901A80104C0440F551F661F9D
:1020C000771F8A95D2F7CB01BA01609570958095FC
:1020D000909503C060E070E0CB01272D26952695F2
:1020E0002370422F50E04230510569F043305105D2
:1020F00089F0682979298A299B294130510571F095
:102100000E94251683C0682979298A299B290E9463
:1021100041167CC00E942516C501B4010E94091613
:1021200075C08C2D90E0FC01E05EF109E531F10510
:1021300008F04FC0E059FF4F0C948C1B1C2D1F70F2
:10214000872D8F71002321F00E94A215812F32CF9D
:102150000E94C315812F0E94350F58C0002341F003
:10216000153008F053C0872D8F710E94E8154EC0BE
:10217000163008F04BC0F7CF002339F0872D8F7150
:102180000E94A21543C00023C9F3872D8F710E94BE
:10219000C3153CC0002329F0872D8F710E948D1537
:1021A00035C00E94831532C0002351F0172D1F71D6
:1021B000812F0E94A21563E0812F0E94B61626C0CF
:1021C00081E00E94BF16123008F182E00E94BF1623
:1021D0001DC0002331F0112389F28C2D0E94670E5F
:1021E00015C0112391F28C2D0E94060F0FC0472DB0
:1021F0004F706C2DC7010E949D010E94A71406C05C
:10220000472D4F706C2DC7010E949C01DD20F9F015
:102210000E94B21680FD1BC0F70112820E94AC160C
:102220000E94A215C7010E9436110E94AC160F90A1
:10223000DF91CF911F910F91FF90EF90DF90CF90A2
:10224000BF90AF909F908F907F900C94C3150F908C
:10225000DF91CF911F910F91FF90EF90DF90CF9082
:10226000BF90AF909F908F907F9008950F931F9392
:10227000CF93DF93EC01888199812B813C81232BC3
:10228000B9F09F3F11F48F3F99F0CE010E941602E2
:10229000882371F0688179818A810E94A8168C0157
:1022A0000E945D160E942415B801CE010E943C0FC9
:1022B000DF91CF911F910F9108950E9480170E9486
:1022C00090170E9455170C94AA170E9470170C942F
:1022D0005D110E949D16292F22952F7030E02C3021
:1022E00031054CF42A3031056CF42250310922308A
:1022F0003105A8F407C02C30310569F02F303105C5
:1023000051F00DC0803F69F018F4803E40F409C0E0
:10231000843F29F406C093FB882780F9089580E064
:10232000089581E00895CF93DF9300D000D01F92ED
:10233000CDB7DEB70F900F900F900F900F90DF91F9
:10234000CF910895CF93DF9300D000D000D0CDB7C8
:10235000DEB726960FB6F894DEBF0FBECDBFDF9175
:10236000CF9108951F93CF93DF93C091590116E049
:1023700080915A01C81799F0D0E01C9FF0011D9F71
:10238000F00D1124E55AFE4F408151816281738125
:10239000848195810E94A2112196C770E9CFDF91B7
:1023A000CF911F91089540918B0150918C016091C4
:1023B0008D0170918E0180918F01909190010C940C
:1023C000A2118091900182958F7009F054C0809184
:1023D0008D01882309F44FC080915901A0915A01C1
:1023E00060918B0170918C0140918E0150918F0111
:1023F000B6E08A1709F43FC090E041155105C1F1DC
:102400007F3F11F46F3FA1F1B89FF001B99FF00D2C
:102410001124E55AFE4F218172132AC020816213D4
:1024200027C02281211124C023813481241735073C
:1024300010F421503109241B350B283C3105C0F420
:10244000209190012F7020612093900126E0289F19
:10245000F001299FF00D1124E05AFE4F80818F700A
:10246000806180838BE891E00E9436110C94B21158
:1024700001968770BECF0895CF92DF92EF92FF92C0
:102480000F931F93CF93DF93CDB7DEB762970FB64D
:10249000F894DEBF0FBECDBF8C0185E0F801DE01F0
:1024A0001D9601900D928A95E1F7D8014C911196F5
:1024B0005C91119712966C9112971396CD90DC90C7
:1024C000149730918B0170918C0180918E019091C5
:1024D0008F01009709F46BC17F3F19F43F3F09F466
:1024E00066C1E0908D01EE2009F4C0C020919001FA
:1024F000C816D90628F0F601E81BF90BCF0104C075
:10250000809590958C0D9D1DFF24F394883C91053A
:1025100078F0F12C207F09F0C6C07C2DD98AC88ABA
:1025200089890E9493118BE891E00E943611B1C015
:10253000822F807F09F046C0751314C0341312C077
:10254000611110C02F702061209390010E94D3115F
:102550008BE891E00E94361180919001D801159688
:102560008C932EC0CD2819F15F3F11F44F3FF9F045
:10257000F62E61111CC08091590120915A0136E05C
:10258000821709F45AC090E0389FF001399FF00D8E
:102590001124E55AFE4F7181571306C0708147130D
:1025A00003C07281711103C001968770E9CFF62EC6
:1025B000662309F418C18091900181608093900195
:1025C000F12C11C1751308C0341306C0611104C089
:1025D00080919001D801C3C04D875E878D859E850F
:1025E0006A8B0E9469116A898823E1F16623D1F11F
:1025F00020919001822F82958F7090E0029774F065
:1026000080918B0190918C0198878F831986DB864E
:10261000CA862C87CE0107960E94361186E0F80103
:10262000ABE8B1E001900D928A95E1F70E94E111CB
:102630000E94D311FF24F394D6C04D875E878D8509
:102640009E850E949D16292F22952F7030E0223002
:1026500031050CF0BCC09F7009F0B6C0805E8830B8
:1026600008F4C1C0C8010E943611E4CFC816D906CB
:1026700008F453C0F601E81BF90BCF01883C910523
:1026800008F450C0F12C7C2DD98AC88A89890E940F
:102690009311EBE8F1E086E0DF011D928A95E9F7FE
:1026A0000E94D311A0C0751314C0341312C061115D
:1026B00010C080919001F8018583C8010E943611F5
:1026C00086E0EBE8F1E0DF011D928A95E9F7FE2C48
:1026D0008AC04D875E878D859E856A8B0E946911B1
:1026E0006A89882309F4BECF662309F4BBCF209101
:1026F0009001822F82958F7090E002970CF48ECF1C
:1027000080918B0190918C019A8389831B82DD8259
:10271000CC822E83CE0101967FCF809590958C0D33
:102720009D1DACCFF62E662309F49CCF75132EC0E9
:1027300034132CC02091900120FD1FC0822F829560
:102740008F70D9F0D80115962C9315978F3049F0DA
:102750008F5F982F9295907F822F8F70892B15967F
:102760008C93C8010E94361186E0F801ABE8B1E015
:1027700001900D928A95E1F793CF86E0F801ABE8DE
:10278000B1E001900D928A95E1F72DC04D875E87EB
:102790008D859E850E946911811140CF80919001A5
:1027A000816080939001C8010E9436111CC066238D
:1027B00009F458CF4D875E878D859E850E946911EB
:1027C000882309F44FCF2ACF811148CF0CC0243081
:1027D00031050CF047CF9F7009F440CFF801958187
:1027E000907F09F03BCF8F2D62960FB6F894DEBF35
:1027F0000FBECDBFDF91CF911F910F91FF90EF9052
:10280000DF90CF9008951F93CF93DF93CDB7DEB7BE
:102810002C970FB6F894DEBF0FBECDBF4F835887FD
:1028200069877A878B879C87CE0107960E943C1226
:10283000882369F08F8198852A853B85232BF1F1C8
:102840009F3F09F063C08F3F09F060C037C086E04A
:10285000FE013796DE01119601900D928A95E1F7FF
:102860006F817885EA85FB85309741F17F3F11F4D0
:102870006F3F21F120915A0130E0C9010196877024
:1028800099274091590150E08417950709F447C0F2
:1028900069837A83FD83EC8396E0929FD001939FB6
:1028A000B00D1124A55ABE4FFE01319601900D9234
:1028B0009A95E1F780935A010E94B21116E0809137
:1028C000590190915A018917C1F1189FC001112433
:1028D000855A9E4F0E943C12882379F1E09159015C
:1028E0001E9FF0011124E55AFE4F40815181628103
:1028F0007381848195810E94A2118091590190E099
:1029000001968770992780935901D9CF4F815885B7
:1029100069857A858B859C850E94A211CFCF0E9404
:10292000651110925A0110925901EBE8F1E086E02E
:10293000DF011D928A95E9F7C1CF2C960FB6F89466
:10294000DEBF0FBECDBFDF91CF911F910895EF92F3
:10295000FF920F931F93CF93DF938C01009709F49D
:102960006CC0F12CEE24E394E8012196F8018491E7
:10297000843740F4843008F051C0813081F08230D7
:1029800019F15BC0853709F444C0A8F19CE7980FA2
:10299000903708F052C08F770E94060F41C00E5F3B
:1029A0001F4FFE01C49180E28C0F883048F4C7703D
:1029B0008E2D01C0880FCA95EAF70E94831714C0B4
:1029C0008C2F0E94670E2DC00E5F1F4FFE01C49119
:1029D00080E28C0F883058F4C7708E2D01C0880FAC
:1029E000CA95EAF70E9489170E94AA171AC08C2F6D
:1029F0000E94060F16C00E5F1F4FFE01C491CC232C
:102A000081F08FE99FE00197F1F700C00000C1500D
:102A1000F6CF0E5F1F4FFE01F49003C00E94670EB9
:102A20008E018F2D882309F49FCFEFE9FFE03197C6
:102A3000F1F700C000008150F5CFDF91CF911F91D9
:102A40000F91FF90EF900895089560939501709312
:102A5000960180939701909398010C945D110F93C8
:102A60001F9300919501109196012091970130914B
:102A70009801DC01CB01802B912BA22BB32B8093EF
:102A8000950190939601A0939701B09398011F919F
:102A90000F910C945D110F931F930091950110916C
:102AA00096012091970130919801DC01CB018023A0
:102AB0009123A223B3238093950190939601A09331
:102AC0009701B09398011F910F910C945D110F9392
:102AD0001F930091950110919601209197013091DB
:102AE0009801DC01CB0180279127A227B32780938F
:102AF000950190939601A0939701B09398011F912F
:102B00000F910C945D11109291011092920110920C
:102B10009301109294010C945D1141E050E060E04B
:102B200070E004C0440F551F661F771F8A95D2F7C7
:102B3000409391015093920160939301709394019B
:102B40000C945D1141E050E060E070E004C0440F7F
:102B5000551F661F771F8A95D2F78091910190913A
:102B60009201A0919301B0919401482B592B6A2BAB
:102B70007B2B40939101509392016093930170934A
:102B800094010C945D1141E050E060E070E004C0FD
:102B9000440F551F661F771F8A95D2F740955095B1
:102BA000609570958091910190919201A09193010F
:102BB000B0919401482359236A237B2340939101C8
:102BC0005093920160939301709394010C945D1162
:102BD00041E050E060E070E004C0440F551F661F04
:102BE000771F8A95D2F78091910190919201A091DF
:102BF0009301B0919401482759276A277B27409376
:102C000091015093920160939301709394010C94FD
:102C10005D110F931F9300919101109192012091EA
:102C2000930130919401DC01CB01802B912BA22BDD
:102C3000B32B8093910190939201A0939301B09351
:102C400094011F910F910C945D110F931F930091AC
:102C50009101109192012091930130919401DC0136
:102C6000CB0180239123A223B323809391019093DE
:102C70009201A0939301B09394011F910F910C9432
:102C80005D110F931F93009191011091920120917A
:102C9000930130919401DC01CB0180279127A22779
:102CA000B3278093910190939201A0939301B093E5
:102CB00094011F910F910C945D110895CF92DF92B2
:102CC000EF92FF920F931F93CF93DF938C01C090ED
:102CD0009501D0909601E0909701F0909801809135
:102CE000910190919201A0919301B0919401C82A11
:102CF000D92AEA2AFB2ACFE1D0E0D701C6010C2E5F
:102D000004C0B695A795979587950A94D2F780FF4A
:102D100006C0B8018C2F0E941705019721F4219756
:102D200060F780E001C08C2FDF91CF911F910F9150
:102D3000FF90EF90DF90CF900895CF93DF93EC0159
:102D40000E945E16BE010E941705DF91CF91089583
:102D5000CB010E949D1608958091990185958595D6
:102D600085950895809199018770089598E0899FCD
:102D700090011124262B209399010C94A2152091E7
:102D800099018095822380939901982F977069F417
:102D900030E0482F552747FD50952417350729F077
:102DA0008595859585950C94C31508959091990105
:102DB000977081E009F480E0089590910B019923C8
:102DC00021F090910C01911109C020910D013091D9
:102DD0000E01F90132969FEF40E01FC0982F9695A3
:102DE000969596959F3050F5E0910D01F0910E016A
:102DF000E90FF11D877021E030E0A90102C0440F06
:102E0000551F8A95E2F7CA019181892B8183089524
:102E10009F3F39F04F5F4E3041F051915813F8CF3A
:102E20000DC05111F7CF942FF5CF9F3F39F0F90125
:102E3000E90FF11D97FDFA95828308950895909109
:102E40000B01992321F090910C01911109C020915F
:102E50000D0130910E01F9013296205F3F4F1FC0E6
:102E6000982F9695969596959F30F0F4E0910D01E8
:102E7000F0910E01E90FF11D877021E030E0A9010A
:102E800002C0440F551F8A95E2F7CA0180959181CF
:102E90008923818308953196E217F30729F0908101
:102EA0009813F9CF1082F7CF089581E090E0E09178
:102EB0000D01F0910E01E80FF91F1082019680318B
:102EC0009105A9F708959091AD01892B8093AD01EB
:102ED000089580959091AD0189238093AD01089567
:102EE0001092AD0108959091AC01892B8093AC01B3
:102EF000089580959091AC0189238093AC01089549
:102F00001092AC0108959091AB01892B8093AB0195
:102F1000089580959091AB0189238093AB0108952A
:102F20001092AB01089580939A01089510929A012E
:102F3000089580910D0190910E01FC0131969C0144
:102F4000205F3F4F80E0919191118F5FE217F3076F
:102F5000D1F70895E0910D01F0910E018091AD013E
:102F60008083E0910D01F0910E0190818091AC0180
:102F7000892B8083E0910D01F0910E019081809169
:102F8000AB01892B808380919A01882361F0E091C5
:102F90000D01F0910E019081892B80830E94991779
:102FA000811110929A0180910D0190910E010C9463
:102FB000450D20E0009739F0AC01415051098423C0
:102FC00095232F5FF7CF822F08958091B901843028
:102FD00021F11092AF0120E488E190E00FB6F8945F
:102FE000A895809360000FBE2093600080E00E944F
:102FF000B10583B7817F846083BF83B7816083BF5E
:103000007894889583B78E7F83BF88E10FB6F89454
:1030100080936000109260000FBE08950895089597
:103020000E940E180E94F5050E940F180E945C066F
:1030300091E0811101C090E0892F08950E946511EF
:103040000E94390D0C94B1051F920F920FB60F928A
:1030500011248F939F93AF93BF938091AF01811100
:1030600013C08091B0019091B101A091B201B091D3
:10307000B3014196A11DB11D8093B0019093B101A0
:10308000A093B201B093B301BF91AF919F918F9183
:103090000F900FBE0F901F90189582E084BD93E0B3
:1030A00095BD9AEF97BD80936E0008952FB7F89461
:1030B0008091B0019091B101A091B201B091B301A2
:1030C0002FBF0895CF92DF92EF92FF920F931F933D
:1030D0002FB7F8944091B0015091B1016091B201C5
:1030E0007091B3012FBF6A017B01EE24FF248C0194
:1030F00020E030E0C016D106E206F30610F441509D
:1031000051099A01281B390BC9011F910F91FF909A
:10311000EF90DF90CF9008951F920F920FB60F920D
:1031200011248F939F93AF93BF938091B00190919F
:10313000B101A091B201B091B3010196A11DB11DE1
:103140008093B0019093B101A093B201B093B30109
:10315000BF91AF919F918F910F900FBE0F901F90D5
:1031600018950E94360AF8942FEF87EA91E62150CD
:1031700080409040E1F700C0000087E090EBDC0168
:103180008093C3019093C401A093C501B093C6017D
:103190009CE088E10FB6F894A895809360000FBE7C
:1031A00090936000FFCFBF92CF92DF92EF92FF9299
:1031B0000F931F93CF93DF93B82E11E0EE24E39487
:1031C000F12C012F812F0E943C066C01CAE0D0E057
:1031D00097010C2E02C0220F331F0A94E2F72C2114
:1031E0003D21232B49F06C2F712F80E00E94C202F9
:1031F000B81202C081E006C0219750F710E001111B
:10320000E0CF80E0DF91CF911F910F91FF90EF9081
:10321000DF90CF90BF900895CF93C82F8CE20E948B
:10322000D318882321F08C2FCF910C94D31880E0F1
:10323000CF910895CF930E94611A811102C00E941C
:10324000471AC5E6C15049F00E94F5058FE39CE995
:103250000197F1F700C00000F5CF89E20E940C1938
:10326000811113C18AE20E940C1981110E94471A30
:1032700085E00E940C1981110E94B1180E946C1AFD
:103280008093AE0187E00E940C198823A9F18BE19D
:103290000E940C19882351F08091AE0181FB2227F6
:1032A00020F991E0922790FB81F90EC08EE00E94F8
:1032B0000C19882361F08091AE0182FB222720F94E
:1032C00091E0922790FB82F98093AE0115C080E1D6
:1032D0000E940C199091AE01882341F093FB2227A4
:1032E00020F981E0822780FB93F904C0892F809523
:1032F00080FB90F99093AE018091AE010E94701A0C
:103300000E947E1A8093C20180EE0E940C198823CD
:1033100041F08091C201982F909590FB80F98093A5
:10332000C20189E30E940C19882359F08091C201DF
:1033300081FB222720F991E0922790FB81F980936D
:10334000C20182EE0E940C19882359F08091C201BB
:1033500082FB222720F991E0922790FB82F980934B
:10336000C20186EE0E940C19882359F08091C20197
:1033700083FB222720F991E0922790FB83F9809329
:10338000C20183EE0E940C19882359F08091C2017A
:1033900084FB222720F991E0922790FB84F9809307
:1033A000C20185E30E940C19882359F08091C20163
:1033B00085FB222720F991E0922790FB85F98093E5
:1033C000C20181E30E940C19882359F08091C20147
:1033D00086FB222720F991E0922790FB86F98093C3
:1033E000C20181E10E940C19882359F08091C20129
:1033F00087FB222720F991E0922790FB87F98093A1
:10340000C2018091C2010E94821A8091C20187FB91
:10341000882780F980930C0187E20E940C19C82F3D
:103420008EE10E940C198111C2608FE10E940C197B
:103430008111C46080E20E940C198111C86081E290
:103440000E940C198111C06182E20E940C19811145
:10345000C06283E20E940C198111C06484E20E9460
:103460000C19882311F0C06802C0CC2329F08C2FDE
:103470000E94791A6C2F03C00E94751A682F70E0A1
:1034800080E090E0CF910C942515CF9108956DEEDA
:103490007EEF80E090E00E94B21B60E082E090E06E
:1034A0000E94A01B60E083E090E00E94A01B60E00F
:1034B00084E090E00E94A01B60E085E090E00C9426
:1034C000A01B80E090E00E949A1B21E08D3E9E4F61
:1034D00009F020E0822F089582E090E00C94921B86
:1034E000682F82E090E00C94A01B83E090E00C94A5
:1034F000921B682F83E090E00C94A01B84E090E086
:103500000C94921B682F84E090E00C94A01B0F9306
:103510001F938B3109F475C0A0F58E3009F484C077
:10352000C0F4873009F45BC068F4863009F0AAC0A3
:103530008091AE01817F8E7F8093AE0181E0809388
:10354000B401A1C0883009F496C08B3009F493C04F
:1035500099C0813109F472C068F4803109F092C0D9
:103560008091AE0183FB222720F991E0922790FB06
:1035700083F950C0863109F47EC0893109F47BC0DB
:1035800081C0853309F479C068F4873209F475C0C5
:1035900028F48E3108F476C08D515AC0893209F46E
:1035A0006CC070C0833438F48A3308F050C088335C
:1035B00009F461C067C0833409F45FC0883409F03E
:1035C00061C00E9465110FEF13ED20E30150104020
:1035D0002040E1F700C000000E94B1184CC090915B
:1035E000AE01892F8095817080FB90F929F096605B
:1035F00098609093AE0147C0997F977F9093AE01FA
:103600003AC08091AE0181FB222720F991E09227F8
:1036100090FB81F98093AE01992369F18091AE010D
:1036200081608093AE0127C08091AE0182FB22278A
:1036300020F991E0922790FB82F9ECCF0E9465116E
:1036400090910C0181E0892780930C0114C089536B
:1036500041E050E060E070E08A019B0104C0000F8F
:10366000111F221F331F8A95D2F7C901B8010E948A
:1036700025150E94651181E006C061E070E080E0E0
:1036800090E0F5CF80E01F910F91089580E00895BC
:1036900080E00895CF93C82F8091B401882319F05A
:1036A000813049F031C0E0910D01F0910E0180812F
:1036B000823261F507C0E0910D01F0910E01808129
:1036C000823261F48C2F0E94461B811104C08C2F22
:1036D0000E94871A17C081E090E014C08C2F0E94CE
:1036E000481B81110EC0C43149F018F4CB3049F0A9
:1036F0000FC0C93219F0C83321F00AC01092B401CA
:1037000007C081E0817006C01092B40180E002C061
:1037100080E0F8CFCF910895EE0FFF1F0590F49150
:10372000E02D0994F999FECF92BD81BDF89A9927B1
:1037300080B50895A8E1B0E042E050E00C94BA1BD7
:10374000262FF999FECF92BD81BDF89A019700B45A
:10375000021639F01FBA20BD0FB6F894FA9AF99AFA
:103760000FBE08950196272F0E94A11B0C94A01B49
:10377000DC01CB01FC01F999FECF06C0F2BDE1BD31
:10378000F89A319600B40D9241505040B8F7089520
:04379000F894FFCFDB
:10379400FF6B06D7066E06A3066F0601019B010F99
:0A37A4001F4F5F6F7F6353437949A5
:00000001FF

View file

@ -0,0 +1,158 @@
/*
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 0x4097
#define DEVICE_VER 0x0001
#define MANUFACTURER Nobody
#define PRODUCT Arrow Pad 21
#define DESCRIPTION 21-Key QMK Assistant
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 11
/*
* 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 { D3, D5 }
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* 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 */
#define BACKLIGHT_LEVELS 3
/* 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

View file

@ -0,0 +1,160 @@
// 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.
#include "arrow_pad.h"
#include "led.h"
// This is the 21-key keypad to 2x11 element matrix mapping
#define KEYMAP( \
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
KM___7, KM___8, KM___9, ___PLS, \
KM___4, KM___5, KM___6, KM_PLS, \
KM___1, KM___2, KM___3, ___ENT, \
KM___0, _____0, KM_DOT, KM_ENT \
) { \
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
}
#define LAYER_BASE 0
#define LAYER_EDIT 1
#define LAYER_FUNCTION 2
#define MACRO_COPY_CUT 0
#define MACRO_SHIFT_CONTROL 1
#define MACRO_CONTROL_ALT 2
#define M_COPY KC_FN5
#define M_SHFCT KC_FN6
#define M_CTALT KC_FN7
#define SC_UNDO LCTL(KC_Z)
#define SC_REDO LCTL(KC_Y)
#define SC_CUT LCTL(KC_X)
#define SC_COPY LCTL(KC_C)
#define SC_PSTE LCTL(KC_V)
#define SC_SELA LCTL(KC_A)
#define SC_SAVE LCTL(KC_S)
#define SC_OPEN LCTL(KC_O)
#define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4)
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = KEYMAP( \
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, XXXXXXX, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, XXXXXXX, \
KC_P0, XXXXXXX, KC_PDOT, KC_PENT ),
[LAYER_EDIT] = KEYMAP( \
KC_ESC, KC_TAB, KC_SPC, _______, \
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
KC_HOME, KC_UP, KC_PGUP, XXXXXXX, \
KC_LEFT, M_COPY, KC_RGHT, M_CTALT, \
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
KC_BSPC, XXXXXXX, KC_DEL, M_SHFCT),
[LAYER_FUNCTION] = KEYMAP( \
KC_FN2, KC_FN3, KC_FN4, _______, \
KC_FN1, _______, _______, _______, \
_______, _______, _______, XXXXXXX, \
_______, _______, _______, _______, \
_______, _______, _______, XXXXXXX, \
RESET, XXXXXXX, _______, _______ ),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
[2] = ACTION_BACKLIGHT_TOGGLE(),
[3] = ACTION_BACKLIGHT_INCREASE(),
[4] = ACTION_BACKLIGHT_DECREASE(),
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch (id) {
case MACRO_COPY_CUT:
if (record->event.pressed) {
register_code(KC_LCTL);
if (record->tap.count == 1) {
register_code(KC_C);
unregister_code(KC_C);
}
else if (record->tap.count == 2) {
register_code(KC_X);
unregister_code(KC_X);
}
unregister_code(KC_LCTL);
}
break;
case MACRO_SHIFT_CONTROL:
if (record->event.pressed) {
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count == 3) register_code(KC_PENT);;
}
else {
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
unregister_code(KC_PENT);
}
break;
case MACRO_CONTROL_ALT:
if (record->event.pressed) {
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
}
else {
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
}
break;
}
return MACRO_NONE;
}
void led_set_user(uint8_t usb_led)
{
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
} else {
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
} else {
// Hi-Z
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
}

View file

@ -0,0 +1,17 @@
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # 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 = yes # 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
CONFIG_H = keymaps/$(KEYMAP)/config.h

View file

@ -0,0 +1,935 @@
:100000000C9450010C9494010C9494010C94940160
:100010000C9494010C9494010C9494010C9494010C
:100020000C9494010C9494010C94580B0C942A0C8D
:100030000C94DC180C9494010C9494010C9494018D
:100040000C9494010C9494010C9494010C949401DC
:100050000C9494010C9444190C9494010C94940104
:100060000C9494010C9494010C9494010C949401BC
:100070000C9494010C9494010C9494010C949401AC
:100080000C9494010C9494010C9494010C9494019C
:100090000C9494010C9494010C9494010C9494018C
:1000A0000C9494010C9494010C949401970CB90C49
:1000B000A70DB90CA70DFE0C210DA70D760D890D0E
:1000C000FA0FFA0F29102910B311B311B311B3119C
:1000D0006810B311181118117F118811B311AD11E7
:1000E0002511251125112511251125112511251160
:1000F0002511251125112511251125112511251150
:10010000351143114A1151115B11F1A2028A00D23B
:1001100000D000D100C801C802C829002B0031005E
:10012000C00053005400550056005F00600061009D
:1001300067005C005D005E00570059005A005B00DC
:100140000000620000006300580029002B002C0012
:100150000100C10019011C011D014A0052004B00A1
:10016000E2005000C5004F00E0004D0051004E007D
:1001700000002A0000004C00C600C200C300C400FA
:100180000100C100010001000100010001000100A7
:100190000100010001000100010001000100010057
:1001A000000000500000010001001A03410072002D
:1001B00072006F0077002000500061006400200092
:1001C0003200340000000E034E006F0062006F002A
:1001D0006400790000000403090409023B000201E5
:1001E00000A0FA0904000001030101000921110126
:1001F0000001223F000705810308000A09040100ED
:100200000103000000092111010001223900070546
:1002100082031000011201100100000008EDFE969B
:100220004001000102000105010906A101050719AD
:10023000E029E715002501950875018102050819D7
:100240000129059505750191029501750391010537
:10025000071900297715002501957875018102C0DD
:1002600005010906A101050719E029E71500250187
:10027000950875018102950175088101050819012C
:1002800029059505750191029501750391010507F1
:10029000190029FF150025FF950675088100C0008B
:1002A00011241FBECFEFDAE0DEBFCDBF04B603FEE0
:1002B00024C08091B8019091B901A091BA01B09188
:1002C000BB018730904BA740B04BB9F41092B801F6
:1002D0001092B9011092BA011092BB0114BE84B7FA
:1002E000877F84BF88E10FB6F894809360001092F6
:1002F00060000FBEE0E0FFE3099511E0A0E0B1E08F
:10030000E8E3FAE302C005900D92AA31B107D9F7EC
:1003100011E0AAE1B1E001C01D92A83BB107E1F7ED
:100320000E949F080C941A1D0C94000008950895D3
:1003300081E008950C9497010C9498010C94450267
:10034000279A2F988FEF9FEF9093870080938600D6
:100350008AE08093800089E1809381000C94471C9F
:100360000E94A0010C949601282F81110BC080914E
:100370008000877F8093800010928D0010928C0007
:100380002F9808952F988091800088608093800036
:10039000233019F48FEF9FEF0FC083E090E0821BB2
:1003A0009109880F991F2FEF3FEFA90102C05695C1
:1003B00047958A95E2F7CA0190938D0080938C004F
:1003C00008950895CF93DF93EC016130F1F018F0B8
:1003D0006230E9F155C08A81882309F451C080EE6A
:1003E0000E94EE0E8D81807F803129F486E00E948C
:1003F000EE0E86E006C0803231F48BE10E94EE0EF4
:100400008BE10E948D0F80EE1FC08A818823C1F08E
:100410008D8182958F7090E003971CF482E00E949A
:10042000B50F8D81807F803219F481E00E94B50F75
:100430008D81807F803321F588E50E94EE0E20C0FB
:1004400083E00E94BC0F88E50E948D0F19C08A814D
:10045000882399F08D8182958F7090E002971CF42B
:1004600081E00E94B50F8D8182958F7090E0029798
:100470003CF084E00E94B50F03C085E00E94BC0FF1
:1004800080E090E0DF91CF91089581FF03C0569AFC
:100490005E9A02C056985E9880FF05C03F9A88B168
:1004A0008F6788B908953F984798089581E0089527
:1004B0000C94560208950F931F93CF93DF938C01F2
:1004C000FC01C081D181CE010E940B17BE010E94A8
:1004D0000703EC01B8010E945802882309F48DC07B
:1004E000F8018281882309F44AC080912501811195
:1004F0001FC0C431F0E5DF0709F051C00E945A0265
:1005000081E0809325010E940E199093240180932D
:10051000230110921C0110921E0110921D011092D5
:10052000200110921F01109222011092210165C03A
:1005300080912301909124010E941A19883C910511
:1005400070F480911C01E82FF0E0EE0FFF1FE35ED6
:10055000FE4FD183C0838F5F80931C014EC0C4388F
:1005600080E5D80721F0C538D04501F13AC0F8013F
:100570008281882341F010921A0182E01EC0C438A3
:10058000E0E5DE0759F580911A01811106C086E287
:100590000E94EE0E86E20E948D0F82E01CC0C438DD
:1005A000F0E5DF0741F3C538D045D9F4F801828181
:1005B000882331F010921B0180E20E94B50F1DC00C
:1005C00080911B01811106C087E20E94EE0E87E236
:1005D0000E948D0F80E20E94BC0F0FC0C538D0452D
:1005E00029F381E080931A0180931B01C801DF91F8
:1005F000CF911F910F910C949C0180E0DF91CF91DE
:100600001F910F9108950C94B0010C949A01E72F5B
:10061000F0E096E0899FE00DF11D1124EE0FFF1F21
:10062000EE0FFF1FE60FF11DEE0FFF1FE65EFE4F00
:10063000859194910895880F991FFC01E657F04029
:10064000859194910895880F991FFC01E65FFE4FF4
:100650008591949108950F931F93CF93DF93EC01AD
:10066000811521E39207A0F5C11580E3D80708F0B2
:10067000D7C0C83ED105D8F4C03ED10508F003C2AA
:10068000C83AD10578F4C53AD10508F06AC0C1303E
:10069000D10509F463C008F4F3C1C430D10508F0F2
:1006A000F2C1EEC1CB3BD10508F466C0E9C1C1156A
:1006B00090E2D90708F0AFC0C11521E0D20708F0D9
:1006C000E2C1C03FD10508F4DBC18E0110651BC239
:1006D000C03880E5D80700F5C03790E5D90708F0A5
:1006E000A3C0C11520E5D20709F4ACC050F4CE0177
:1006F000905480319F4008F0C3C1DF708E01106AB2
:1007000002C2C13080E5D80709F4AAC0C43190E51F
:10071000D90708F4ABC0B4C1C33820E5D20709F447
:100720008EC050F4C13890E5D90709F482C008F0B2
:1007300083C000E011EDE7C1C03181E5D80708F4BE
:100740009FC1C11597E5D90708F432C1CE01905772
:100750008115904108F094C1DF708FC101E010E075
:10076000D2C1C53AD10509F490C1C63AD10509F004
:100770008FC102E810E4C7C1C83AD10509F48BC1A2
:10078000C93AD10509F48AC1CA3AD10509F489C127
:10079000CB3AD10509F488C1CC3AD10509F487C117
:1007A000CD3AD10509F486C1C03BD10509F485C114
:1007B000CE3AD10509F484C1CF3AD10509F483C1F9
:1007C000C13BD10509F482C1C23BD10509F481C105
:1007D000C33BD10509F480C1C43BD10509F47FC1F5
:1007E000C53BD10509F47EC1C63BD10509F47DC1E5
:1007F000C73BD10509F47CC1C83BD10509F47BC1D5
:10080000C93BD10509F47AC1CA3BD10509F479C1C4
:1008100000E014E478C1CE019F700E94230374C1EC
:10082000DD278E01106C6FC1CF70DD278E01146D36
:100830006AC100E010ED67C100E012ED64C100E0A4
:1008400013ED61C10E9412128FEF94E32CE08150EE
:1008500090402040E1F700C000000E94691953C198
:100860008091A20181608093A2014DC10E94131B5F
:10087000811102C00E94F41A0E94301B90E09093F4
:10088000B7018093B601C23080E5D80721F480918A
:10089000B601816086C0C43090E5D90721F480910B
:1008A000B60182607EC0C63020E5D20721F4809177
:1008B000B601846076C0C83080E5D80719F480910D
:1008C000B60127C0CA3090E5D90721F48091B6015E
:1008D000806167C0CC3020E5D20721F48091B60159
:1008E00080625FC0CE3080E5D80721F48091B601E8
:1008F000806457C0C03190E5D90721F48091B601DA
:1009000080684FC0C23120E5D20729F48091B6013A
:100910008460886046C0C33080E5D80721F48091A8
:10092000B6018E7F3EC0C53090E5D90721F4809195
:10093000B6018D7F36C0C73020E5D20721F4809103
:10094000B6018B7F2EC0C93080E5D80719F480919D
:10095000B60126C0CB3090E5D90721F48091B601CD
:100960008F7E1FC0CD3020E5D20721F48091B601E3
:100970008F7D17C0CF3080E5D80721F48091B60174
:100980008F7B0FC0C13190E5D90721F48091B6016A
:100990008F7707C0C331D04531F48091B6018B7F8A
:1009A000877F8093B6018091B6010E94341BABC053
:1009B0008D2F99278F70992781309105D9F49E0149
:1009C0002370332702C0880F991F2A95E2F79C688D
:1009D0008E0144E0000F111F4A95E1F700271370C4
:1009E000802B912B53E0CC0FDD1F5A95E1F7C07699
:1009F000DD272FC08230910531F4DC2FCC278E010A
:100A0000016F106A80C08330910569F4CE01837054
:100A1000992701E010E002C0000F111F8A95E2F74C
:100A2000C8019C680FC084309105B9F4CE01837071
:100A3000992701E010E002C0000F111F8A95E2F72C
:100A4000C8019A6823E0CC0FDD1F2A95E1F7C07E2C
:100A5000D7708C010C2B1D2B56C08530910531F4BD
:100A6000DC2FCC278E01046F106A4DC0069709F069
:100A70004AC0CF71DD27DC2FCC278E01106243C026
:100A800000E010E040C08E013EC001E810E43BC031
:100A900003E810E438C002EE14E435C009EE14E4B3
:100AA00032C00AEE14E42FC005EB14E42CC006EBB0
:100AB00014E429C007EB14E426C00CEC14E423C0B2
:100AC0000DEC14E420C003E815E41DC00AE815E4A9
:100AD0001AC002E915E417C004E915E414C001E2E4
:100AE00016E411C003E216E40EC004E216E40BC0E3
:100AF00005E216E408C006E216E405C007E216E4C3
:100B000002C00AE216E4C801DF91CF911F910F9154
:100B10000895E72FF0E096E0899FE00DF11D112484
:100B2000EE0FFF1FEE0FFF1FE60FF11DEE0FFF1F71
:100B3000E65EFE4F85919491803E9105E0F4803C05
:100B4000910558F58133910509F46FC048F4893255
:100B5000910509F463C08A32910509F46DC072C031
:100B600089339105E9F082389105D1F085339105FB
:100B700009F44DC067C0833E910581F138F4803E91
:100B80009105B9F0823E9105D9F05CC0863E910591
:100B900061F1873E9105A1F155C00E941B030895A4
:100BA0002091B60120FD02C021FF4CC080EE90E0F4
:100BB00049C08091B60180FFF9CF89E390E042C03F
:100BC0008091B60182FF0EC08091B60184FF03C000
:100BD00080E090E037C083EE90E034C08091B601B1
:100BE00082FFF2CF82EE90E02DC08091B60183FFAC
:100BF0000BC08091B60184FDEBCF87EE90E022C060
:100C00008091B60183FFF5CF86EE90E01BC0809106
:100C1000B60185FF07C089E290E014C08091B6015B
:100C200085FFF9CF85E390E00DC08091B60186FF86
:100C300007C08AE290E006C08091B60186FFF9CF36
:100C400081E390E00E942B0308950C949E01E82F0D
:100C5000F0E0E15FFE4F8081E82FEF70F0E08295D9
:100C60008F7021E030E0A90102C0440F551F8A9522
:100C7000E2F740A308950F931F93CF93DF9385B7B7
:100C8000806885BF85B7806885BFC3E0D0E001E09C
:100C900010E0FE01E15FFE4F8081E82FEF70F0E091
:100CA00021A182958F70A80102C0440F551F8A951B
:100CB000E2F7CA01822B81A38C2F0E94270621977D
:100CC00040F785E090E061E070E0FC01ED5EFE4FF2
:100CD0002081E22FEF70F0E042A122952F70DB011E
:100CE00002C0AA0FBB1F2A95E2F79D01242B22A365
:100CF000019758F7DF91CF911F910F910C94030347
:100D0000EF92FF920F931F93CF93DF930AE211E0CC
:100D1000C3E0EE24E394F12CD5E08C2F0E9427064B
:100D200085E090E040E0FC01ED5EFE4F5081E52F54
:100D3000EF70F0E020A130E052955F7002C0359571
:100D400027955A95E2F720FD07C09701082E01C0AC
:100D5000220F0A94EAF7422B019728F7F8018291B3
:100D60008F01841719F04083D09300018C2F0E94CB
:100D70002706C15090F68091000187FD1CC081506C
:100D8000809300018F3F39F08FE99FE00197F1F7E1
:100D900000C0000010C08091290180932D01809136
:100DA000280180932C018091270180932B01809151
:100DB000260180932A010E94050381E0DF91CF91F3
:100DC0001F910F91FF90EF90089591E001C0990F4E
:100DD0008A95EAF723E030E080E061E070E0F90115
:100DE000E65DFE4F4081492339F0AB01022E01C080
:100DF000440F0A94EAF7842B2150310980F70895B3
:100E00000895CF93DF93C5E0D0E08C2F0E94E506D4
:100E100090E00E948618D80FC150B8F78D2FDF914F
:100E2000CF91089580913E0108950895CF93DF9367
:100E300000D01F92CDB7DEB72091AD01243021F54F
:100E400023E029839B838A8381E08093E9008FEFED
:100E50009091E800815095FD06C095ED9A95F1F7C7
:100E600000008111F5CF8091E80085FF0DC040E0C2
:100E700050E063E070E0CE0101960E944809809145
:100E8000E8008E778093E8000F900F900F90DF912D
:100E9000CF910895CF93DF9300D01F92CDB7DEB7E7
:100EA0002091AD01243021F522E029839B838A83A0
:100EB00081E08093E9008FEF9091E800815095FDEB
:100EC00006C095ED9A95F1F700008111F5CF80915C
:100ED000E80085FF0DC040E050E063E070E0CE0127
:100EE00001960E9448098091E8008E778093E8007F
:100EF0000F900F900F90DF91CF910895CF93DF93D4
:100F00002091AD01243009F048C0EC0180910B0123
:100F10008823E1F080910C018823C1F082E0809366
:100F2000E9008FEF9091E800815095FD06C095E1B2
:100F30009A95F1F700008111F5CF8091E80085FFC7
:100F40002CC040E050E060E170E017C081E0809389
:100F5000E9008FEF9091E800815095FD06C095ED76
:100F60009A95F1F700008111F5CF8091E80085FF97
:100F700014C040E050E068E070E0CE010E944809F3
:100F80008091E8008E778093E80080E1FE01AEE278
:100F9000B1E001900D928A95E1F7DF91CF9108952C
:100FA0008091AC01811109C00E94DD0A0E943A0BB8
:100FB0008091E20084608093E20008951092AC0179
:100FC0000895089508950C94D11842E061EC81E0F1
:100FD0000E94570A42E161EC82E00C94570A80912A
:100FE000AF01833009F453C030F4813071F08230A6
:100FF00009F48CC008958A3009F478C08B3009F464
:101000005EC0893009F09AC020C08091AE01813A5B
:1010100009F094C08091E800877F8093E800809178
:10102000B2019091B301892B21F460E18EE291E04D
:1010300003C060E080E090E070E00E94930980913E
:10104000E8008B778093E80008958091AE018132AB
:1010500009F074C08091B2019091B301029708F039
:101060006DC08091E800877F8093E8008091E80060
:1010700082FD05C08091AD018111F8CF5FC08091E4
:10108000F10080933E018091E8008B7753C08091FE
:10109000AE01813A09F052C08091B2019091B30142
:1010A000892B09F04BC08091E800877F8093E8008E
:1010B0008091E80080FFFCCF80910B0136C08091C9
:1010C000AE018132D9F58091B2019091B301892BA3
:1010D000A9F58091E800877F8093E8000E948C0A40
:1010E0008091B00180930B010C9412128091AE019B
:1010F000813221F58091E800877F8093E8000E948B
:101100008C0A8091B10180933F0108958091AE01D6
:10111000813AA1F48091E800877F8093E800809174
:10112000E80080FFFCCF80913F018093F100809127
:10113000E8008E778093E8000C948C0A089584B7B9
:10114000877F84BF88E10FB6F89480936000109287
:1011500060000FBE90E080E80FB6F89480936100C5
:10116000909361000FBE0E94240E0E94DD0A0E942F
:101170003A0B8091E20084608093E20078940E94B0
:10118000C00D0E94260E81E091E00E94DB0D80914F
:10119000AD01853069F40E9492188091AB018823DB
:1011A000B1F30E94C018882391F30E943209EFCF57
:1011B0000E94320EECCF292F332723303105C9F09E
:1011C00064F42130310581F02230310509F042C04C
:1011D0008BE390E02AED31E041C021323105F1F09E
:1011E0002232310549F136C082E190E025E132E05A
:1011F00035C099278130910541F08230910541F049
:10120000892B41F5E6EDF1E005C0E6ECF1E002C026
:10121000EAEAF1E0849190E09F0120C0662339F072
:101220006130C1F489E090E025E032E017C089E048
:1012300090E02CEE31E012C0662339F0613051F4B9
:1012400089E390E027E232E009C08FE390E020E6F6
:1012500032E004C080E090E020E030E0FA01318329
:101260002083089580E189BD82E189BD09B400FE33
:10127000FDCF8091D8008F7D8093D8008091E000D1
:1012800082608093E0008091E00081FDFCCF0895B2
:10129000CF92DF92EF92FF920F931F93CF93DF9342
:1012A000EC018B016A010E94AB0A811133C0C114A9
:1012B000D10439F0F60180819181081B190BC80F08
:1012C000D91FE12CF12C0115110519F18091E800CD
:1012D00085FD16C08091E8008E778093E800C114E8
:1012E000D10449F0F60180819181E80EF91EF18266
:1012F000E08285E00FC00E94AB0A882321F30AC078
:1013000089918093F10001501109FFEFEF1AFF0A54
:10131000DACF80E0DF91CF911F910F91FF90EF9096
:10132000DF90CF9008952091B4013091B501261738
:10133000370748F06115710539F42091E8002E77E0
:101340002093E80001C0B90140E061157105A9F1E1
:101350002091AD01222309F443C0253009F442C095
:101360002091E80023FD40C02091E80022FD32C01A
:101370002091E80020FFE9CF4091F3002091F20096
:1013800030E0342BFC01CF016115710559F0283094
:10139000310540F481918093F100615071092F5F14
:1013A0003F4FF1CF41E02830310509F040E0209176
:1013B000E8002E772093E800C8CF4111C9CF0AC0BA
:1013C0008091AD01882361F0853061F08091E80063
:1013D00083FD0AC08091E80082FFF2CF80E008958B
:1013E00082E0089583E0089581E008952091B4019A
:1013F0003091B5012617370748F06115710539F4AA
:101400002091E8002E772093E80001C0B901FC018B
:1014100020E06115710591F18091AD01882309F4F7
:1014200040C0853009F43FC08091E80083FD3DC095
:101430008091E80082FD2FC08091E80080FFE9CF15
:101440002091F3008091F20090E0922B61157105DC
:1014500059F08830910540F424912093F1003196A1
:10146000615071090196F2CF21E0089709F020E060
:101470008091E8008E778093E800CBCF2111CCCF0C
:101480000AC08091AD01882361F0853061F08091C0
:10149000E80083FD0AC08091E80082FFF2CF80E07F
:1014A000089582E0089583E0089581E00895982FDB
:1014B000973058F59093E900981739F07091EC0047
:1014C0002091ED005091F00003C0242F762F50E0C2
:1014D00021FF19C03091EB003E7F3093EB0030913B
:1014E000ED003D7F3093ED003091EB0031603093A3
:1014F000EB007093EC002093ED005093F0002091EE
:10150000EE0027FF07C09F5FD3CF8F708093E90065
:1015100081E0089580E008958091AE0187FF11C0B9
:101520008091E80082FD05C08091AD018111F8CF66
:1015300011C08091E8008B770BC08091AD018823AA
:1015400049F08091E80080FFF8CF8091E8008E7725
:101550008093E80008952091E4003091E50095E63D
:101560004091EC00842F817040FF22C08091E80000
:1015700080FD1CC08091AD01882391F0853091F0F1
:101580008091EB0085FD10C04091E4005091E50092
:101590004217530729F39A01915011F784E00895F7
:1015A00082E0089583E0089581E0089580E0089541
:1015B0004091E80042FFDECF08950E944B0B0E944D
:1015C000530BE0EEF0E0808181608083E8EDF0E095
:1015D00080818F77808319BCA7EDB0E08C918E7FDE
:1015E0008C9380818F7E80831092AC0108950F933D
:1015F0001F93CF93DF930E944B0B0E94530BC8EDB8
:10160000D0E088818F77888388818068888388810B
:101610008F7D888319BC1092AD011092A9011092A0
:10162000AB011092AA0100EE10E0F80180818B7FDF
:10163000808388818160888342E060E080E00E944E
:10164000570AE1EEF0E080818E7F8083E2EEF0E0E9
:10165000808181608083808188608083F8018081BF
:101660008E7F8083888180618883DF91CF911F91F5
:101670000F910895E8EDF0E080818F7E8083E7EDA3
:10168000F0E080818160808384E082BF81E080938C
:10169000AC010C94F70AE8EDF0E080818E7F808346
:1016A0001092E20008951092DA001092E10008957D
:1016B0001F920F920FB60F9211242F933F934F93C7
:1016C0005F936F937F938F939F93AF93BF93EF93AA
:1016D000FF938091E10082FF0BC08091E20082FFC6
:1016E00007C08091E1008B7F8093E1000E94BF0DD5
:1016F0008091DA0080FF1FC08091D80080FF1BC05E
:101700008091DA008E7F8093DA008091D90080FF8B
:101710000DC080E189BD82E189BD09B400FEFDCF25
:1017200081E08093AD010E94D00705C019BC1092E2
:10173000AD010E94DE078091E10080FF19C0809119
:10174000E20080FF15C08091E2008E7F8093E2006E
:101750008091E20080618093E2008091D8008062F5
:101760008093D80019BC85E08093AD010E94E20708
:101770008091E10084FF30C08091E20084FF2CC0A2
:1017800080E189BD82E189BD09B400FEFDCF809171
:10179000D8008F7D8093D8008091E1008F7E809368
:1017A000E1008091E2008F7E8093E2008091E20070
:1017B00081608093E2008091A901882311F084E088
:1017C00007C08091E30087FD02C081E001C083E093
:1017D0008093AD010E94E3078091E10083FF29C05F
:1017E0008091E20083FF25C08091E100877F809394
:1017F000E10082E08093AD011092A9018091E100A7
:101800008E7F8093E1008091E2008E7F8093E200E2
:101810008091E20080618093E20042E060E080E03D
:101820000E94570A8091F00088608093F0000E9427
:10183000E107FF91EF91BF91AF919F918F917F91C0
:101840006F915F914F913F912F910F900FBE0F902D
:101850001F9018951F920F920FB60F9211242F937D
:101860003F934F935F936F937F938F939F93AF9328
:10187000BF93CF93DF93EF93FF93C091E900CF70B5
:101880008091EC00D82FD17080FDD0E81092E90053
:101890008091F000877F8093F00078940E946E0C16
:1018A0001092E9008091F00088608093F000CD2BC9
:1018B000CF70C093E900FF91EF91DF91CF91BF917D
:1018C000AF919F918F917F916F915F914F913F91D8
:1018D0002F910F900FBE0F901F9018951F93CF93CD
:1018E000DF93CDB7DEB7AA970FB6F894DEBF0FBE71
:1018F000CDBFEEEAF1E088E08E0F9091F100919378
:101900008E13FBCF0E94EF078091E80083FF1FC179
:101910008091AE019091AF01492F50E04A305105BE
:1019200008F015C1FA01EA5AFF4F0C94DE1C80380A
:1019300081F0823809F00BC18091B2018F708093E1
:10194000E9008091EB0085FB882780F91092E9007F
:1019500006C08091AA019091AB0191118260909193
:10196000E800977F9093E8008093F1001092F100D7
:10197000C8C0282F2D7F09F0EAC0882319F08230D3
:1019800061F0E5C08091B001813009F0E0C0933092
:1019900009F080E08093AB012BC08091B0018111F0
:1019A00027C08091B2018F7009F4D1C08093E90003
:1019B0002091EB0020FF1CC0933021F48091EB00BC
:1019C000806214C09091EB0090619093EB0021E055
:1019D00030E0A90102C0440F551F8A95E2F74093F9
:1019E000EA001092EA008091EB0088608093EB009F
:1019F0001092E9008091E800877F86C08111A7C01E
:101A00001091B0011F778091E3008078812B809343
:101A1000E3008091E800877F8093E8000E948C0AB1
:101A20008091E80080FFFCCF8091E3008068809384
:101A3000E300111102C082E001C083E08093AD0198
:101A400086C08058823008F082C08091B0019091A9
:101A5000B1018C3D53E0950779F583E08A838AE2F2
:101A600089834FB7F894DE01139620E03EE051E2FF
:101A7000E32FF0E050935700E49120FF03C0E2957C
:101A8000EF703F5FEF708E2F90E0EA3010F0C79656
:101A900001C0C0968D939D932F5F243149F74FBFAE
:101AA0008091E800877F8093E8006AE270E0CE01D1
:101AB00001960E94930914C0AE014F5F5F4F609181
:101AC000B2010E94DB08BC01009709F440C090916C
:101AD000E800977F9093E80089819A810E94F60937
:101AE0008091E8008B778093E80031C0803879F5E9
:101AF0008091E800877F8093E8008091A90180931E
:101B0000F1008091E8008E778093E8000E948C0AB3
:101B10001EC081111CC09091B0019230C0F4809120
:101B2000E800877F8093E8009093A9010E948C0AC7
:101B30008091A901811106C08091E30087FD02C058
:101B400081E001C084E08093AD010E94E5078091AF
:101B5000E80083FF0AC08091E800877F8093E80057
:101B60008091EB0080628093EB00AA960FB6F89408
:101B7000DEBF0FBECDBFDF91CF911F9108950895B5
:101B8000CF938091AD018823A1F0C091E900CF707F
:101B90009091EC00892F817090FD80E8C82B109205
:101BA000E9008091E80083FD0E946E0CCF70C09325
:101BB000E900CF91089590934501809344010895E1
:101BC000E0914401F0914501309721F00190F081BE
:101BD000E02D099480E00895E0914401F0914501E1
:101BE000309721F00280F381E02D0994089520912F
:101BF0004201309143018217930771F090934301A2
:101C000080934201E0914401F0914501309721F029
:101C10000680F781E02D09940895209140013091CC
:101C200041018217930771F0909341018093400125
:101C3000E0914401F0914501309721F00084F18555
:101C4000E02D0994089508950C94230E0E9405191F
:101C50000E943B060E94C7190E94471C81E08093A6
:101C60000C010895CF92DF92EF92FF920F931F9392
:101C7000CF93DF9300D000D000D0CDB7DEB70E9465
:101C8000800685E0E82EF12C0E2D8E2D0E94E506B3
:101C90009701295B3E4F6901F90110811827A9F4CA
:101CA000F1E0EF1AF10880F78FEF89838A831B82B6
:101CB0000E940E198160782F9D838C8349815A81FF
:101CC0006B818D810E94C00E32C09091A20191FF64
:101CD00004C08E830E9400078E8113FD09C012FD8F
:101CE0000AC011FD0BC010FFDBCF90E011E008C06F
:101CF00093E018E005C092E014E002C091E012E029
:101D000099830A83812391E009F490E09B830E94E8
:101D10000E198160782F9D838C8349815A816B8154
:101D20008D810E94C00EF6018081182710831091CA
:101D300046010E94E00D1817A1F00E94E00D80936B
:101D4000460126960FB6F894DEBF0FBECDBFDF91D9
:101D5000CF911F910F91FF90EF90DF90CF900C9457
:101D6000250626960FB6F894DEBF0FBECDBFDF91D5
:101D7000CF911F910F91FF90EF90DF90CF9008953A
:101D8000CF93DF93CDB7DEB72B970FB6F894DEBFB6
:101D90000FBECDBF4F83588769877A878B87DE0157
:101DA000119686E0FD0111928A95E9F785E0FE0122
:101DB000379601900D928A95E1F749815A816B819E
:101DC0007C818D819E810E94B0142B960FB6F89471
:101DD000DEBF0FBECDBFDF91CF910895CF93882393
:101DE00009F499C0C82F8CEF8C0F813A48F48C2FDE
:101DF0000E94051C81118FC08C2F0E948A170CC075
:101E000080E28C0F883058F4C77081E001C0880FE1
:101E1000CA95EAF70E941018CF910C9457188BE5D9
:101E20008C0F833078F4C53A29F0C63A31F083E854
:101E300090E005C081E890E002C082E890E0CF9198
:101E40000C94F70D88E58C0F833108F064C0C83A14
:101E500039F1C93A41F1CA3A49F1CB3A51F1CC3A98
:101E600059F1CD3A61F1C03B69F1CE3A71F1CF3A07
:101E700079F1C13B81F1C23B89F1C33B91F1C43B94
:101E800099F1C53BA1F1C63BA9F1C73BB1F1C83BF4
:101E9000B9F1C93BC1F1CA3BC9F180E090E038C05B
:101EA00082EE90E035C089EE90E032C08AEE90E09C
:101EB0002FC085EB90E02CC086EB90E029C087EB2B
:101EC00090E026C08CEC90E023C08DEC90E020C028
:101ED00083E891E01DC08AE891E01AC082E991E0B0
:101EE00017C084E991E014C081E292E011C083E25E
:101EF00092E00EC084E292E00BC085E292E008C05E
:101F000086E292E005C087E292E002C08AE292E0B7
:101F1000CF910C940D0ECF910895882329F19CEF59
:101F2000980F913A18F40E94CC170DC090E2980FC8
:101F3000983058F4877091E001C0990F8A95EAF7BC
:101F4000892F0E9416180C9457189BE5980F933010
:101F500020F480E090E00C94F70D885A833120F44F
:101F600080E090E00C940D0E0895882321F00E94EB
:101F700010180C9457180895882321F00E94161801
:101F80000C94571808957F928F929F92AF92BF92B0
:101F9000CF92DF92EF92FF920F931F93CF93DF9335
:101FA0001F92CDB7DEB77C01C62E772EFC010581CE
:101FB00002950F70128111110E942D180E94831733
:101FC000882379F0112369F080E28C0D883048F085
:101FD00082E00E946C170E94831791E0D82ED926C8
:101FE00001C0D12CE72DE295EF70F0E0E05AFF4FF1
:101FF0000C94DE1C872D807F072D0F70882311F035
:102000000295007F112389F0002309F46EC180E25C
:102010008C0D883020F4802F0E94101803C0802F70
:102020000E9420180E94571860C18C2D0E948D0FAD
:10203000002309F498C180E28C0D883020F4802FB1
:102040000E94161803C0802F0E9426180E9457185D
:102050008AC1872D807F972D9F70803211F4892F40
:1020600003C0892F8295807FCC2021F0F1E0CF162C
:10207000A1F01DC0112339F0002319F1013009F539
:102080000E94401870C1002319F0013009F46BC19F
:1020900089830E9443188981E5C0112321F006300D
:1020A00008F061C10EC0053008F05DC1DBC011232E
:1020B00059F0002331F0F701958190FF16C19F7010
:1020C00095830E94B50F4FC1002309F4CBC013C103
:1020D000872D837009F052C0111145C18C2D829556
:1020E00086958770880F880F9C2D9F70892E912C64
:1020F000A12CB12C082E04C0880C991CAA1CBB1C56
:102100000A94D2F7C4FE14C00FE010E020E030E0E3
:10211000B901A80104C0440F551F661F771F8A9597
:10212000D2F7CB01BA01609570958095909503C068
:1021300060E070E0CB01272D26952695237030E0D6
:102140002230310569F02330310589F06829792979
:102150008A299B292130310571F00E94F81503C1AD
:10216000682979298A299B290E941416FCC00E949B
:10217000F815C501B4010E94DC15F5C0112319F052
:10218000872D817001C08695882309F4ECC08C2DC1
:10219000829586958770880F880F9C2D9F70892E59
:1021A000912CA12CB12C082E04C0880C991CAA1CBF
:1021B000BB1C0A94D2F7C4FE14C00FE010E020E06C
:1021C00030E0B901A80104C0440F551F661F771FF6
:1021D0008A95D2F7CB01BA0160957095809590955C
:1021E00003C060E070E0CB01272D26952695237073
:1021F000422F50E04230510569F04330510589F0DB
:10220000682979298A299B294130510571F00E945A
:10221000D216A9C0682979298A299B290E94EE161D
:10222000A2C00E94D216C501B4010E94B6169BC07E
:102230008C2D90E0FC01E05EF109E531F10508F03C
:1022400050C0E059FF4F0C94DE1C0C2D0F70872DF1
:102250008F71112321F00E944F16802F32CF0E94E0
:102260007016802F0E94BC0F7EC0112341F00530F4
:1022700008F079C0872D8F710E94951674C00630C2
:1022800008F071C0F7CF112339F0872D8F710E94AC
:102290004F1669C01123C9F3872D8F710E947016E4
:1022A00062C0112329F0872D8F710E943A165BC0FE
:1022B0000E94301658C0112351F0172D1F71812F25
:1022C0000E944F1663E0812F0E9463174CC081E08B
:1022D0000E946C17023008F446C082E00E946C171E
:1022E00042C0112331F0002381F28C2D0E94EE0EAA
:1022F0003AC0002389F28C2D0E948D0F34C0472DE7
:102300004F706C2DC7010E94E2010E9454152BC032
:10231000111129C0472D4F7050E042305105B9F0DE
:102320004CF44115510581F041305105E1F40E9412
:102330006F1C19C04330510569F04430510599F4C0
:102340008C2D0E94C11C0FC00E94581C0CC00E9402
:102350008B1C09C00E949E1C06C0472D4F706C2D1F
:10236000C7010E94E101DD20F9F00E945F1780FDA6
:102370001BC0F70112820E9459170E944F16C70115
:102380000E94E3110E9459170F90DF91CF911F9186
:102390000F91FF90EF90DF90CF90BF90AF909F9004
:1023A0008F907F900C9470160F90DF91CF911F91BA
:1023B0000F91FF90EF90DF90CF90BF90AF909F90E4
:1023C0008F907F9008950F931F93CF93DF93EC012D
:1023D000888199812B813C81232BB9F09F3F11F497
:1023E0008F3F99F0CE010E945B02882371F06881D3
:1023F00079818A810E9455178C010E940A170E94D8
:10240000D115B801CE010E94C30FDF91CF911F916A
:102410000F9108950E942D180E943D180E940218E5
:102420000C9457180E941D180C940A120E944A1707
:10243000292F22952F7030E02C3031054CF42A30B2
:1024400031056CF42250310922303105A8F407C05F
:102450002C30310569F02F30310551F00DC0803F2F
:1024600069F018F4803E40F409C0843F29F406C0A6
:1024700093FB882780F9089580E0089581E008950E
:10248000CF93DF9300D000D01F92CDB7DEB70F906F
:102490000F900F900F900F90DF91CF910895CF93F1
:1024A000DF9300D000D000D0CDB7DEB726960FB6B0
:1024B000F894DEBF0FBECDBFDF91CF9108951F937B
:1024C000CF93DF93C0914D0116E080914E01C81764
:1024D00099F0D0E01C9FF0011D9FF00D1124E15BED
:1024E000FE4F4081518162817381848195810E9478
:1024F0004F122196C770E9CFDF91CF911F910895B8
:1025000040917F0150918001609181017091820121
:1025100080918301909184010C944F1280918401E9
:1025200082958F7009F054C080918101882309F44D
:102530004FC080914D01A0914E0160917F0170913B
:1025400080014091820150918301B6E08A1709F41D
:102550003FC090E041155105C1F17F3F11F46F3F3D
:10256000A1F1B89FF001B99FF00D1124E15BFE4F7E
:10257000218172132AC02081621327C02281211178
:1025800024C0238134812417350710F421503109E8
:10259000241B350B283C3105C0F4209184012F7099
:1025A00020612093840126E0289FF001299FF00DEF
:1025B0001124EC5AFE4F80818F70806180838FE7F9
:1025C00091E00E94E3110C945F1201968770BECFD8
:1025D0000895CF92DF92EF92FF920F931F93CF93C4
:1025E000DF93CDB7DEB762970FB6F894DEBF0FBEAC
:1025F000CDBF8C0185E0F801DE011D9601900D92A2
:102600008A95E1F7D8014C9111965C911197129639
:102610006C9112971396CD90DC90149730917F01B6
:10262000709180018091820190918301009709F45B
:102630006BC17F3F19F43F3F09F466C1E09081010F
:10264000EE2009F4C0C020918401C816D90628F0F4
:10265000F601E81BF90BCF0104C0809590958C0D15
:102660009D1DFF24F394883C910578F0F12C207F88
:1026700009F0C6C07C2DD98AC88A89890E94401277
:102680008FE791E00E94E311B1C0822F807F09F0B3
:1026900046C0751314C0341312C0611110C02F70DE
:1026A0002061209384010E9480128FE791E00E94B4
:1026B000E31180918401D80115968C932EC0CD280A
:1026C00019F15F3F11F44F3FF9F0F62E61111CC074
:1026D00080914D0120914E0136E0821709F45AC0D5
:1026E00090E0389FF001399FF00D1124E15BFE4F1F
:1026F0007181571306C07081471303C07281711135
:1027000003C001968770E9CFF62E662309F418C13D
:1027100080918401816080938401F12C11C1751333
:1027200008C0341306C0611104C080918401D8012F
:10273000C3C04D875E878D859E856A8B0E94161269
:102740006A898823E1F16623D1F120918401822FE7
:1027500082958F7090E0029774F080917F01909144
:10276000800198878F831986DB86CA862C87CE01E5
:1027700007960E94E31186E0F801AFE7B1E001900F
:102780000D928A95E1F70E948E120E948012FF241A
:10279000F394D6C04D875E878D859E850E944A172B
:1027A000292F22952F7030E0223031050CF0BCC06B
:1027B0009F7009F0B6C0805E883008F4C1C0C801BF
:1027C0000E94E311E4CFC816D90608F453C0F601FD
:1027D000E81BF90BCF01883C910508F450C0F12C9F
:1027E0007C2DD98AC88A89890E944012EFE7F1E0DE
:1027F00086E0DF011D928A95E9F70E948012A0C051
:10280000751314C0341312C0611110C0809184017B
:10281000F8018583C8010E94E31186E0EFE7F1E04B
:10282000DF011D928A95E9F7FE2C8AC04D875E87ED
:102830008D859E856A8B0E9416126A89882309F409
:10284000BECF662309F4BBCF20918401822F8295ED
:102850008F7090E002970CF48ECF80917F01909161
:1028600080019A8389831B82DD82CC822E83CE01F4
:1028700001967FCF809590958C0D9D1DACCFF62E47
:10288000662309F49CCF75132EC034132CC02091FD
:10289000840120FD1FC0822F82958F70D9F0D8014E
:1028A00015962C9315978F3049F08F5F982F92953E
:1028B000907F822F8F70892B15968C93C8010E9470
:1028C000E31186E0F801AFE7B1E001900D928A953F
:1028D000E1F793CF86E0F801AFE7B1E001900D9208
:1028E0008A95E1F72DC04D875E878D859E850E9474
:1028F0001612811140CF8091840181608093840100
:10290000C8010E94E3111CC0662309F458CF4D870B
:102910005E878D859E850E941612882309F44FCF0D
:102920002ACF811148CF0CC0243031050CF047CF9D
:102930009F7009F440CFF8019581907F09F03BCF5B
:102940008F2D62960FB6F894DEBF0FBECDBFDF911C
:10295000CF911F910F91FF90EF90DF90CF9008954E
:102960001F93CF93DF93CDB7DEB72C970FB6F894B4
:10297000DEBF0FBECDBF4F83588769877A878B87AD
:102980009C87CE0107960E94E912882369F08F8107
:1029900098852A853B85232BF1F19F3F09F063C081
:1029A0008F3F09F060C037C086E0FE013796DE0138
:1029B000119601900D928A95E1F76F817885EA85ED
:1029C000FB85309741F17F3F11F46F3F21F120915A
:1029D0004E0130E0C90101968770992740914D0161
:1029E00050E08417950709F447C069837A83FD8313
:1029F000EC8396E0929FD001939FB00D1124A15BD0
:102A0000BE4FFE01319601900D929A95E1F78093A9
:102A10004E010E945F1216E080914D0190914E018F
:102A20008917C1F1189FC0011124815B9E4F0E943C
:102A3000E912882379F1E0914D011E9FF0011124E4
:102A4000E15BFE4F40815181628173818481958178
:102A50000E944F1280914D0190E001968770992756
:102A600080934D01D9CF4F81588569857A858B85B3
:102A70009C850E944F12CFCF0E94121210924E01DD
:102A800010924D01EFE7F1E086E0DF011D928A959B
:102A9000E9F7C1CF2C960FB6F894DEBF0FBECDBFBD
:102AA000DF91CF911F910895EF92FF920F931F93A3
:102AB000CF93DF938C01009709F46CC0F12CEE24C6
:102AC000E394E8012196F8018491843740F484303E
:102AD00008F051C0813081F0823019F15BC0853738
:102AE00009F444C0A8F19CE7980F903708F052C051
:102AF0008F770E948D0F41C00E5F1F4FFE01C49162
:102B000080E28C0F883048F4C7708E2D01C0880F8A
:102B1000CA95EAF70E94301814C08C2F0E94EE0E5E
:102B20002DC00E5F1F4FFE01C49180E28C0F8830D4
:102B300058F4C7708E2D01C0880FCA95EAF70E941D
:102B400036180E9457181AC08C2F0E948D0F16C07D
:102B50000E5F1F4FFE01C491CC2381F08FE99FE0EF
:102B60000197F1F700C00000C150F6CF0E5F1F4F74
:102B7000FE01F49003C00E94EE0E8E018F2D88237B
:102B800009F49FCFEFE9FFE03197F1F700C00000B3
:102B90008150F5CFDF91CF911F910F91FF90EF9072
:102BA000089508956093890170938A0180938B0141
:102BB00090938C010C940A120F931F93009189013A
:102BC00010918A0120918B0130918C01DC01CB01A5
:102BD000802B912BA22BB32B8093890190938A0198
:102BE000A0938B01B0938C011F910F910C940A124A
:102BF0000F931F930091890110918A0120918B01FD
:102C000030918C01DC01CB0180239123A223B323DB
:102C10008093890190938A01A0938B01B0938C01DA
:102C20001F910F910C940A120F931F930091890129
:102C300010918A0120918B0130918C01DC01CB0134
:102C400080279127A227B3278093890190938A0137
:102C5000A0938B01B0938C011F910F910C940A12D9
:102C600010928501109286011092870110928801BE
:102C70000C940A1241E050E060E070E004C0440FA0
:102C8000551F661F771F8A95D2F740938501509391
:102C9000860160938701709388010C940A1241E0C9
:102CA00050E060E070E004C0440F551F661F771FBE
:102CB0008A95D2F78091850190918601A091870134
:102CC000B0918801482B592B6A2B7B2B40938501AF
:102CD0005093860160938701709388010C940A12C7
:102CE00041E050E060E070E004C0440F551F661FF3
:102CF000771F8A95D2F74095509560957095809191
:102D0000850190918601A0918701B09188014823A7
:102D100059236A237B234093850150938601609356
:102D20008701709388010C940A1241E050E060E042
:102D300070E004C0440F551F661F771F8A95D2F7B5
:102D40008091850190918601A0918701B0918801C1
:102D5000482759276A277B2740938501509386018E
:102D600060938701709388010C940A120F931F934C
:102D70000091850110918601209187013091880191
:102D8000DC01CB01802B912BA22BB32B80938501EF
:102D900090938601A0938701B09388011F910F91B2
:102DA0000C940A120F931F930091850110918601D4
:102DB0002091870130918801DC01CB018023912390
:102DC000A223B3238093850190938601A09387016A
:102DD000B09388011F910F910C940A120F931F93C7
:102DE0000091850110918601209187013091880121
:102DF000DC01CB0180279127A227B327809385018F
:102E000090938601A0938701B09388011F910F9141
:102E10000C940A120895CF92DF92EF92FF920F93D3
:102E20001F93CF93DF938C01C0908901D0908A01CA
:102E3000E0908B01F0908C0180918501909186014A
:102E4000A0918701B0918801C82AD92AEA2AFB2AD1
:102E5000CFE1D0E0D701C6010C2E04C0B695A795EE
:102E6000979587950A94D2F780FF06C0B8018C2FFA
:102E70000E948905019721F4219760F780E001C045
:102E80008C2FDF91CF911F910F91FF90EF90DF90EA
:102E9000CF900895CF93DF93EC010E940B17BE01F2
:102EA0000E948905DF91CF910895CB010E944A17B6
:102EB000089580918D0185958595859508958091DA
:102EC0008D018770089598E0899F90011124262B29
:102ED00020938D010C944F1620918D0180958223B3
:102EE00080938D01982F977069F430E0482F552713
:102EF00047FD50952417350729F0859585958595CB
:102F00000C947016089590918D01977081E009F4EA
:102F100080E0089590910B01992321F090910C018C
:102F2000911109C020910D0130910E01F9013296E5
:102F30009FEF40E01FC0982F9695969596959F30ED
:102F400050F5E0910D01F0910E01E90FF11D877030
:102F500021E030E0A90102C0440F551F8A95E2F735
:102F6000CA019181892B818308959F3F39F04F5F7A
:102F70004E3041F051915813F8CF0DC05111F7CF99
:102F8000942FF5CF9F3F39F0F901E90FF11D97FD1F
:102F9000FA9582830895089590910B01992321F069
:102FA00090910C01911109C020910D0130910E01F9
:102FB000F9013296205F3F4F1FC0982F9695969546
:102FC00096959F30F0F4E0910D01F0910E01E90F1C
:102FD000F11D877021E030E0A90102C0440F551FA8
:102FE0008A95E2F7CA0180959181892381830895AA
:102FF0003196E217F30729F090819813F9CF1082E8
:10300000F7CF089581E090E0E0910D01F0910E017D
:10301000E80FF91F1082019680319105A9F70895F4
:103020009091A101892B8093A101089580959091A1
:10303000A10189238093A10108951092A10108950F
:103040009091A001892B8093A00108958095909183
:10305000A00189238093A00108951092A0010895F2
:1030600090919F01892B80939F0108958095909165
:103070009F01892380939F01089510929F010895D5
:1030800080938E01089510928E01089580910D0114
:1030900090910E01FC0131969C01205F3F4F80E032
:1030A000919191118F5FE217F307D1F70895E091A5
:1030B0000D01F0910E018091A1018083E0910D013D
:1030C000F0910E0190818091A001892B8083E09185
:1030D0000D01F0910E01908180919F01892B8083D9
:1030E00080918E01882361F0E0910D01F0910E0135
:1030F0009081892B80830E944618811110928E0145
:1031000080910D0190910E010C94EC0D20E0009740
:1031100039F0AC0141505109842395232F5FF7CF3B
:10312000822F08958091AD01843039F11092A3016E
:1031300020E488E190E00FB6F894A89580936000B1
:103140000FBE2093600080E00E94B40180E00E94E6
:10315000250683B7817F846083BF83B7816083BF87
:103160007894889583B78E7F83BF88E10FB6F894F3
:1031700080936000109260000FBE08950895089536
:1031800080E00E94B4010E94BE180E9480060E9446
:10319000BF180E94010791E0811101C090E0892FC2
:1031A00008950E94121280E00E94B4010E94471C00
:1031B0000E94E00D0C9425061F920F920FB60F92FD
:1031C00011248F939F93AF93BF938091A30181119B
:1031D00013C08091A4019091A501A091A601B09186
:1031E000A7014196A11DB11D8093A4019093A50153
:1031F000A093A601B093A701BF91AF919F918F912A
:103200000F900FBE0F901F90189582E084BD93E041
:1032100095BD9AEF97BD80936E0008952FB7F894EF
:103220008091A4019091A501A091A601B091A70160
:103230002FBF0895CF92DF92EF92FF920F931F93CB
:103240002FB7F8944091A4015091A5016091A60177
:103250007091A7012FBF6A017B01EE24FF248C012E
:1032600020E030E0C016D106E206F30610F441502B
:1032700051099A01281B390BC9011F910F91FF9029
:10328000EF90DF90CF9008951F920F920FB60F929C
:1032900011248F939F93AF93BF938091A40190913A
:1032A000A501A091A601B091A7010196A11DB11D94
:1032B0008093A4019093A501A093A601B093A701C8
:1032C000BF91AF919F918F910F900FBE0F901F9064
:1032D00018950E94DD0AF8942FEF87EA91E62150B5
:1032E00080409040E1F700C0000087E090EBDC01F7
:1032F0008093B8019093B901A093BA01B093BB0138
:103300009CE088E10FB6F894A895809360000FBE0A
:1033100090936000FFCFEF92FF920F931F93CF9394
:10332000DF93D82FC5E08C2F0E94E50603E010E064
:10333000E82EF12CC701002E02C0959587950A94BE
:10334000E2F780FF09C0602F7C2F80E00E94070316
:10335000D81302C081E006C00150110958F7C150CE
:1033600010F780E0DF91CF911F910F91FF90EF90C8
:103370000895CF93C82F8CE20E948B19882321F0E7
:103380008C2FCF910C948B1980E0CF910895CF931F
:103390000E94131B811102C00E94F41AC5E6C1509D
:1033A00049F00E9480068FE39CE90197F1F700C085
:1033B0000000F5CF89E20E94B919811113C18AE298
:1033C0000E94B91981110E94F41A85E00E94B9196E
:1033D00081110E9469190E941E1B8093A20187E03F
:1033E0000E94B9198823A9F18BE10E94B919882399
:1033F00051F08091A20181FB222720F991E09227D0
:1034000090FB81F90EC08EE00E94B919882361F00B
:103410008091A20182FB222720F991E0922790FB64
:1034200082F98093A20115C080E10E94B9199091A0
:10343000A201882341F093FB222720F981E0822713
:1034400080FB93F904C0892F809580FB90F99093BD
:10345000A2018091A2010E94221B0E94301B809336
:10346000B60180EE0E94B919882341F08091B6011F
:10347000982F909590FB80F98093B60189E30E9484
:10348000B919882359F08091B60181FB222720F9D0
:1034900091E0922790FB81F98093B60182EE0E9421
:1034A000B919882359F08091B60182FB222720F9AF
:1034B00091E0922790FB82F98093B60186EE0E94FC
:1034C000B919882359F08091B60183FB222720F98E
:1034D00091E0922790FB83F98093B60183EE0E94DE
:1034E000B919882359F08091B60184FB222720F96D
:1034F00091E0922790FB84F98093B60185E30E94C6
:10350000B919882359F08091B60185FB222720F94B
:1035100091E0922790FB85F98093B60181E30E94A8
:10352000B919882359F08091B60186FB222720F92A
:1035300091E0922790FB86F98093B60181E10E9489
:10354000B919882359F08091B60187FB222720F909
:1035500091E0922790FB87F98093B6018091B601A4
:103560000E94341B8091B60187FB882780F98093E5
:103570000C0187E20E94B919C82F8EE10E94B91987
:103580008111C2608FE10E94B9198111C46080E28B
:103590000E94B9198111C86081E20E94B919811194
:1035A000C06182E20E94B9198111C06283E20E9467
:1035B000B9198111C06484E20E94B919882311F0FD
:1035C000C06802C0CC2329F08C2F0E942B1B6C2FCB
:1035D00003C00E94271B682F70E080E090E0CF912D
:1035E0000C94D215CF9108956DEE7EEF80E090E0BF
:1035F0000E94041D60E082E090E00E94F21C60E006
:1036000083E090E00E94F21C60E084E090E00E9481
:10361000F21C60E085E090E00E94F21C60E086E031
:1036200090E00C94F21C80E090E00E94EC1C21E001
:103630008D3E9E4F09F020E0822F089582E090E0B9
:103640000C94E41C682F82E090E00C94F21C83E060
:1036500090E00C94E41C682F83E090E00C94F21C42
:1036600084E090E00C94E41C682F84E090E00C94DB
:10367000F21C86E090E00C94E41C682F86E090E059
:103680000C94F21C0F931F938B3109F475C0A0F5B5
:103690008E3009F484C0C0F4873009F45BC068F44C
:1036A000863009F0AAC08091A201817F8E7F80932D
:1036B000A20181E08093A801A1C0883009F496C0DE
:1036C0008B3009F493C099C0813109F472C068F459
:1036D000803109F092C08091A20183FB222720F95A
:1036E00091E0922790FB83F950C0863109F47EC0A7
:1036F000893109F47BC081C0853309F479C068F44D
:10370000873209F475C028F48E3108F476C08D51E3
:103710005AC0893209F46CC070C0833438F48A33DB
:1037200008F050C0883309F461C067C0833409F4DD
:103730005FC0883409F061C00E9412120FEF13EDD0
:1037400020E3015010402040E1F700C000000E943B
:1037500069194CC09091A201892F8095817080FBDE
:1037600090F929F0966098609093A20147C0997FE4
:10377000977F9093A2013AC08091A20181FB2227FA
:1037800020F991E0922790FB81F98093A20199237F
:1037900069F18091A20181608093A20127C080918C
:1037A000A20182FB222720F991E0922790FB82F967
:1037B000ECCF0E94121290910C0181E08927809336
:1037C0000C0114C0895341E050E060E070E08A01D0
:1037D0009B0104C0000F111F221F331F8A95D2F7CF
:1037E000C901B8010E94D2150E94121281E006C0E0
:1037F00061E070E080E090E0F5CF80E01F910F91F4
:10380000089580E0089580E00895CF93C82F8091B7
:10381000A801882319F0813049F031C0E0910D01F1
:10382000F0910E018081823261F507C0E0910D01B7
:10383000F0910E018081823261F48C2F0E94011C74
:10384000811104C08C2F0E94421B17C081E090E0C0
:1038500014C08C2F0E94031C81110EC0C43149F08A
:1038600018F4CB3049F00FC0C93219F0C83321F039
:103870000AC01092A80107C081E0817006C01092B2
:10388000A80180E002C080E0F8CFCF9108950E94A7
:10389000131B811102C00E94F41A0E94391B8093ED
:1038A000B70180FF02C0869501C080E00C94B4018E
:1038B0008091B701982F9695292F30E0233031055C
:1038C0004CF49F5F990F8170892B81608093B701C1
:1038D0000E943D1B8091B70186950C94B4018091A4
:1038E000B701982F969591F09158990F8170892B77
:1038F0008093B7018E7F91E009F490E08091B70149
:1039000090FB80F98093B7010E943D1B8091B70125
:1039100086950C94B4018091B701982F909590FBF7
:1039200080F98093B7010E943D1B8091B70180FF11
:1039300002C0869501C080E00C94B4019091B7015B
:10394000892F86958F5F8F779170843028F4880F48
:10395000892B8093B70102C09093B7018091B70182
:103960008E7F91E009F490E08091B70190FB80F99F
:103970008093B7010E943D1B8091B70186950C94FE
:10398000B4012091B701922F96958927982F990F0E
:10399000822F8170892B8093B7018E7F91E009F48B
:1039A00090E08091B70190FB80F98093B7010E946D
:1039B0003D1B8091B70186950C94B401EE0FFF1F5B
:1039C0000590F491E02D0994F999FECF92BD81BD47
:1039D000F89A992780B50895A8E1B0E042E050E058
:1039E0000C940C1D262FF999FECF92BD81BDF89A3B
:1039F000019700B4021639F01FBA20BD0FB6F89433
:103A0000FA9AF99A0FBE08950196272F0E94F31C87
:103A10000C94F21CDC01CB01FC01F999FECF06C02D
:103A2000F2BDE1BDF89A319600B40D92415050407C
:083A3000B8F70895F894FFCFE8
:103A3800FF12077E0715074A07160701018F0103C2
:0A3A48001323330F1F4F5F6F7F0041
:00000001FF

View file

@ -0,0 +1,158 @@
/*
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 0x4096
#define DEVICE_VER 0x0001
#define MANUFACTURER Nobody
#define PRODUCT Arrow Pad 24
#define DESCRIPTION 24-Key QMK Assistant
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 4
/*
* 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 { F0, F1, F4, F5, F6, F7 }
#define MATRIX_COL_PINS { B0, B1, B2, B3 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* 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 */
#define BACKLIGHT_LEVELS 3
/* 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

View file

@ -0,0 +1,163 @@
// 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.
#include "arrow_pad.h"
#include "led.h"
// This is the 21-key keypad to 2x11 element matrix mapping
#define KEYMAP( \
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
KM___7, KM___8, KM___9, KM_EQU, \
KM___4, KM___5, KM___6, KM_PLS, \
KM___1, KM___2, KM___3, ___ENT, \
KM___0, _____0, KM_DOT, KM_ENT \
) { \
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
{ KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
{ KM___7, KM___8, KM___9, KM_EQU }, \
{ KM___4, KM___5, KM___6, KM_PLS }, \
{ KM___1, KM___2, KM___3, KC_NO }, \
{ KM___0, KC_NO, KM_DOT, KM_ENT } \
}
#define LAYER_BASE 0
#define LAYER_EDIT 1
#define LAYER_FUNCTION 2
#define MACRO_COPY_CUT 0
#define MACRO_SHIFT_CONTROL 1
#define MACRO_CONTROL_ALT 2
#define M_COPY KC_FN5
#define M_SHFCT KC_FN6
#define M_CTALT KC_FN7
#define SC_UNDO LCTL(KC_Z)
#define SC_REDO LCTL(KC_Y)
#define SC_CUT LCTL(KC_X)
#define SC_COPY LCTL(KC_C)
#define SC_PSTE LCTL(KC_V)
#define SC_SELA LCTL(KC_A)
#define SC_SAVE LCTL(KC_S)
#define SC_OPEN LCTL(KC_O)
#define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4)
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = KEYMAP( \
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PEQL, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, XXXXXXX, \
KC_P0, KC_PCMM, KC_PDOT, KC_PENT ),
[LAYER_EDIT] = KEYMAP( \
KC_ESC, KC_TAB, KC_SPC, _______, \
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
[LAYER_FUNCTION] = KEYMAP( \
KC_FN2, KC_FN3, KC_FN4, _______, \
KC_FN1, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, _______, \
_______, _______, _______, XXXXXXX, \
RESET, _______, _______, _______ ),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
[2] = ACTION_BACKLIGHT_TOGGLE(),
[3] = ACTION_BACKLIGHT_INCREASE(),
[4] = ACTION_BACKLIGHT_DECREASE(),
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch (id) {
case MACRO_COPY_CUT:
if (record->event.pressed) {
register_code(KC_LCTL);
if (record->tap.count == 1) {
register_code(KC_C);
unregister_code(KC_C);
}
else if (record->tap.count == 2) {
register_code(KC_X);
unregister_code(KC_X);
}
unregister_code(KC_LCTL);
}
break;
case MACRO_SHIFT_CONTROL:
if (record->event.pressed) {
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count == 3) register_code(KC_PENT);;
}
else {
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
unregister_code(KC_PENT);
}
break;
case MACRO_CONTROL_ALT:
if (record->event.pressed) {
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
}
else {
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
}
break;
}
return MACRO_NONE;
}
void led_set_user(uint8_t usb_led)
{
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output high
DDRD |= (1<<6);
PORTD |= (1<<6);
} else {
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// output low
DDRC |= (1<<7);
PORTC |= ~(1<<7);
} else {
// Hi-Z
DDRC &= ~(1<<7);
PORTC &= ~(1<<7);
}
}

73
keyboards/atomic/Makefile Normal file
View file

@ -0,0 +1,73 @@
# 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 ?= yes # 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 ?= 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

View file

@ -0,0 +1,25 @@
Atomic keyboard firmware
======================
DIY/Assembled ortholinear 60% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com).
## Quantum MK Firmware
For the full Quantum feature list, see [the parent README.md](/README.md).
## Building
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.
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`.
### 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 `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

325
keyboards/atomic/atomic.c Normal file
View file

@ -0,0 +1,325 @@
#include "atomic.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave this function blank - it can be defined in a keymap file
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak))
bool process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file
return true;
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {
// leave this function blank - it can be defined in a keymap file
}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
#endif
// Turn status LED on
DDRE |= (1<<6);
PORTE |= (1<<6);
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_action_user(record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}
#ifdef BACKLIGHT_ENABLE
#define CHANNEL OCR1C
#define BREATHING_NO_HALT 0
#define BREATHING_HALT_OFF 1
#define BREATHING_HALT_ON 2
static uint8_t breath_intensity;
static uint8_t breath_speed;
static uint16_t breathing_index;
static uint8_t breathing_halt;
void backlight_init_ports()
{
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
// Use full 16-bit resolution.
ICR1 = 0xFFFF;
// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
// Pin PB7 = OCR1C (Timer 1, Channel C)
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
// (i.e. start high, go low when counter matches.)
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init();
breathing_defaults();
}
void backlight_set(uint8_t level)
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
if ( level == 0 )
{
// Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1));
// Set the brightness to 0
CHANNEL = 0x0;
}
else if ( level >= BACKLIGHT_LEVELS )
{
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness to max
CHANNEL = 0xFFFF;
}
else
{
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
}
breathing_intensity_default();
}
void breathing_enable(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint (brightest point)
breathing_index = 0x20 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_pulse(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_HALT_ON;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_disable(void)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
backlight_set(get_backlight_level());
}
void breathing_self_disable(void)
{
if (get_backlight_level() == 0)
{
breathing_halt = BREATHING_HALT_OFF;
}
else
{
breathing_halt = BREATHING_HALT_ON;
}
//backlight_set(get_backlight_level());
}
void breathing_toggle(void)
{
if (!is_breathing())
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
}
// Toggle breathing interrupt
TIMSK1 ^= _BV(OCIE1A);
// Restore backlight level
if (!is_breathing())
{
backlight_set(get_backlight_level());
}
}
bool is_breathing(void)
{
return (TIMSK1 && _BV(OCIE1A));
}
void breathing_intensity_default(void)
{
//breath_intensity = (uint8_t)((uint16_t)100 * (uint16_t)get_backlight_level() / (uint16_t)BACKLIGHT_LEVELS);
breath_intensity = ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2));
}
void breathing_intensity_set(uint8_t value)
{
breath_intensity = value;
}
void breathing_speed_default(void)
{
breath_speed = 4;
}
void breathing_speed_set(uint8_t value)
{
bool is_breathing_now = is_breathing();
uint8_t old_breath_speed = breath_speed;
if (is_breathing_now)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
breath_speed = value;
if (is_breathing_now)
{
// Adjust index to account for new speed
breathing_index = (( (uint8_t)( (breathing_index) >> old_breath_speed ) ) & 0x3F) << breath_speed;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
}
void breathing_speed_inc(uint8_t value)
{
if ((uint16_t)(breath_speed - value) > 10 )
{
breathing_speed_set(0);
}
else
{
breathing_speed_set(breath_speed - value);
}
}
void breathing_speed_dec(uint8_t value)
{
if ((uint16_t)(breath_speed + value) > 10 )
{
breathing_speed_set(10);
}
else
{
breathing_speed_set(breath_speed + value);
}
}
void breathing_defaults(void)
{
breathing_intensity_default();
breathing_speed_default();
breathing_halt = BREATHING_NO_HALT;
}
/* Breathing Sleep LED brighness(PWM On period) table
* (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
*
* http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63
* (0..63).each {|x| p ((sin(x/64.0*PI)**8)*255).to_i }
*/
static const uint8_t breathing_table[64] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 10,
15, 23, 32, 44, 58, 74, 93, 113, 135, 157, 179, 199, 218, 233, 245, 252,
255, 252, 245, 233, 218, 199, 179, 157, 135, 113, 93, 74, 58, 44, 32, 23,
15, 10, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
ISR(TIMER1_COMPA_vect)
{
// CHANNEL = (pgm_read_byte(&breathing_table[ ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F ] )) * breath_intensity;
uint8_t local_index = ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F;
if (((breathing_halt == BREATHING_HALT_ON) && (local_index == 0x20)) || ((breathing_halt == BREATHING_HALT_OFF) && (local_index == 0x3F)))
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
CHANNEL = (uint16_t)(((uint16_t)pgm_read_byte(&breathing_table[local_index]) * 257)) >> breath_intensity;
}
#endif

49
keyboards/atomic/atomic.h Normal file
View file

@ -0,0 +1,49 @@
#ifndef ATOMIC_H
#define ATOMIC_H
#include "quantum.h"
#include <stddef.h>
#include <avr/io.h>
#include <avr/interrupt.h>
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KEYMAP_SEMI_STANDARD( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \
K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led);
void backlight_init_ports(void);
void breathing_enable(void);
void breathing_pulse(void);
void breathing_disable(void);
void breathing_self_disable(void);
void breathing_toggle(void);
bool is_breathing(void);
void breathing_defaults(void);
void breathing_intensity_default(void);
void breathing_speed_default(void);
void breathing_speed_set(uint8_t value);
void breathing_speed_inc(uint8_t value);
void breathing_speed_dec(uint8_t value);
#endif

158
keyboards/atomic/config.h Normal file
View file

@ -0,0 +1,158 @@
/*
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 Ortholinear Keyboards
#define PRODUCT The Atomic Keyboard
#define DESCRIPTION A compact ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/*
* 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, D5, B5, B6, C6 }
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* 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 */
#define BACKLIGHT_LEVELS 3
/* 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 B
//#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

View file

@ -0,0 +1,36 @@
#include "atomic.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { /* Colemak */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO },
{ KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP },
{ KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
[1] = { /* function */
{ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO },
{ 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_SLEP, 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_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY },
{ KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT },
}
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_MOMENTARY(1),
[2] = ACTION_LAYER_MOMENTARY(1),
};
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:
return MACRODOWN(TYPE(KC_T), END);
break;
}
return MACRO_NONE;
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,234 @@
#include "atomic.h"
// Fillers to make layering more clear
#define _______ KC_TRNS
#define ___T___ KC_TRNS
#define XXXXXXX KC_NO
// Layer shorthand
#define _QW 0
#define _CM 1
#define _DV 2
#define _LW 3
#define _RS 4
#define _FN 5
/* ROW 1 OPTIONS
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
* .- 2u ------------.
* | KEY . XXXXXX |
* '-----------------'
*/
/* ROW 2 OPTIONS
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
* .- 2u ------------. .- 2u ------------.
* | KEY . XXXXXX | | KEY . XXXXXX |
* '-----------------' '-----------------'
*/
/* ROW 3 OPTIONS
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
* .- 2u ------------. .- 2u ------------.
* | KEY . XXXXXX | | X |
* '-----------------' '-----------------'
* .- 2u ------------.
* | X |
* '-----------------'
*/
/* ROW 4 OPTIONS
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
* .- 2u ------------.
* | KEY . XXXXXX |
* '-----------------'
* .- 2u ------------. .- 2u ------------.
* | KEY . XXXXXX | | KEY . XXXXXX |
* '-----------------' '-----------------'
* .- 2u ------------.
* | KEY . XXXXXX |
* '-----------------'
*/
/* ROW 5 OPTIONS
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
* .- 1.25u --+ 1.25u ------- 1.25u +--- 1.25u --- 2u -------------- 1.25u ---- 1.25u ------ 1.25u +---- 1.25u .
* | X | X | X | X | X | X | X | X | X |
* '-----------------------------------------------------------------------------------------------------------'
* .- 2u ------------.
* | X |
* '-----------------'
* .--------------------- 6.25u ----------------------------.
* | X |
* '--------------------------------------------------------'
* .----------------------- 6.25u ---------------------------- 1.25u ---- 1.25u ---- 1.25u ------ 1.25u +-- 1.25u --.
* | X | X | X | X | X | X |
* '----------------------------------------------------------------------------------------------------------------'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_QW] = { /* QWERTY */
{ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT },
},
/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_CM] = { /* COLEMAK */
{ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT },
},
/* DVORAK - MIT ENHANCED / GRID COMPATIBLE
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_DV] = { /* DVORAK */
{ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT },
},
/* LOWERED
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | XXXXXX . | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_LW] = { /* LOWERED */
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
{ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS },
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ },
{ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
/* RAISED
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | XXXXXX . | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_RS] = { /* RAISED */
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
{ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS },
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ },
{ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
/* FUNCTION
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | | QWERTY | COLEMK | DVORAK | | | | | | | XXXXXX . | MOUS U | WHEEL- |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FN] = { /* FUNCTION */
{ KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR },
{ KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U },
{ _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D },
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
},
};
const uint16_t PROGMEM fn_actions[] = {
};
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);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};

View file

@ -0,0 +1,183 @@
#include "atomic.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { /* Dvorak */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌───────────────────── 6.25u ────────────────────────────┐
// │ X │
// └────────────────────────────────────────────────────────┘
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐
// │ X │ X │ X │ X │ X │ X │
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘
},
[1] = { /* Qwerty + F keys */
{ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_INS, KC_DEL },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
{ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_NO, KC_PGUP },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌───────────────────── 6.25u ────────────────────────────┐
// │ X │
// └────────────────────────────────────────────────────────┘
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐
// │ X │ X │ X │ X │ X │ X │
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘
},
[2] = { /* Numpad + qwerty shortcut keys */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
// │ X │ │ X │
// └─────────────────┘ └─────────────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
{ KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
// ┌───────────────────── 6.25u ────────────────────────────┐
// │ X │
// └────────────────────────────────────────────────────────┘
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐
// │ X │ X │ X │ X │ X │ X │
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘
},
};
const uint16_t PROGMEM fn_actions[] = {
};
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:
return MACRODOWN(TYPE(KC_T), END);
break;
}
return MACRO_NONE;
};

View file

@ -0,0 +1,15 @@
BOOTMAGIC_ENABLE = yes # 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 = yes # 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 = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # 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. 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,166 @@
/*
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 0x0419
#define DEVICE_VER 0x0001
#define MANUFACTURER Ortholinear Keyboards
#define PRODUCT The Atomic Keyboard
#define DESCRIPTION A compact ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/*
* 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, D5, B5, B6, B3 }
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* 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 */
#define BACKLIGHT_LEVELS 3
/* 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
// Enable Keyboard Locking via magic key
#define KEYBOARD_LOCK_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 B
//#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
//#define VIBRATO_ENABLE
//#define VIBRATO_STRENGTH_ENABLE
#endif

View file

@ -0,0 +1,578 @@
#include "atomic.h"
#include "action_layer.h"
#include "eeconfig.h"
#include "led.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#include "song_list.h"
#endif
#define LAYER_QWERTY 0
#define LAYER_COLEMAK 1
#define LAYER_DVORAK 2
#define LAYER_UPPER 3
#define LAYER_LOWER 4
#define LAYER_FUNCTION 5
#define LAYER_MOUSE 6
#define LAYER_ADJUST 7
#define MACRO_QWERTY 0
#define MACRO_COLEMAK 1
#define MACRO_DVORAK 2
#define MACRO_UPPER 3
#define MACRO_LOWER 4
#define MACRO_FUNCTION 5
#define MACRO_MOUSE 6
#define MACRO_TIMBRE_1 7
#define MACRO_TIMBRE_2 8
#define MACRO_TIMBRE_3 9
#define MACRO_TIMBRE_4 10
#define MACRO_TEMPO_U 11
#define MACRO_TEMPO_D 12
#define MACRO_TONE_DEFAULT 13
#define MACRO_MUSIC_TOGGLE 14
#define MACRO_AUDIO_TOGGLE 16
#define MACRO_INC_VOICE 18
#define MACRO_DEC_VOICE 19
#define MACRO_BACKLIGHT 20
#define MACRO_BREATH_TOGGLE 21
#define MACRO_BREATH_SPEED_INC 23
#define MACRO_BREATH_SPEED_DEC 24
#define MACRO_BREATH_DEFAULT 25
#define M_QWRTY M(MACRO_QWERTY)
#define M_COLMK M(MACRO_COLEMAK)
#define M_DVORK M(MACRO_DVORAK)
#define M_UPPER M(MACRO_UPPER)
#define M_LOWER M(MACRO_LOWER)
#define M_FUNCT M(MACRO_FUNCTION)
#define M_MOUSE M(MACRO_MOUSE)
#define TIMBR_1 M(MACRO_TIMBRE_1)
#define TIMBR_2 M(MACRO_TIMBRE_2)
#define TIMBR_3 M(MACRO_TIMBRE_3)
#define TIMBR_4 M(MACRO_TIMBRE_4)
#define TMPO_UP M(MACRO_TEMPO_U)
#define TMPO_DN M(MACRO_TEMPO_D)
#define TMPO_DF M(MACRO_TONE_DEFAULT)
#define M_BACKL M(MACRO_BACKLIGHT)
#define M_BRTOG M(MACRO_BREATH_TOGGLE)
#define M_BSPDU M(MACRO_BREATH_SPEED_INC)
#define M_BSPDD M(MACRO_BREATH_SPEED_DEC)
#define M_BDFLT M(MACRO_BREATH_DEFAULT)
#define VC_UP M(MACRO_INC_VOICE)
#define VC_DOWN M(MACRO_DEC_VOICE)
#define SC_UNDO LCTL(KC_Z)
#define SC_REDO LCTL(KC_Y)
#define SC_CUT LCTL(KC_X)
#define SC_COPY LCTL(KC_C)
#define SC_PSTE LCTL(KC_V)
#define SC_SELA LCTL(KC_A)
#define SC_SAVE LCTL(KC_S)
#define SC_OPEN LCTL(KC_O)
#define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4)
#define OS_SHFT KC_FN0
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define ________________ _______, _______
#define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_QWERTY] = { // QWERTY
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* COLEMAK
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_COLEMAK] = { // COLEMAK
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* DVORAK
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_DVORAK] = { // DVORAK
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
/* UPPER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | 0 | | RALT | . | ENTER | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_UPPER] = { // UPPER
{ KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS },
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS },
{ KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME },
{ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ },
},
/* LOWER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | ^ | * | + | - | ; | : | _ | ' | " | ` | | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | | | & | ! | ~ | / | \ | = | < | > | ? | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_LOWER] = { // LOWER
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ },
{ _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS },
{ _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SCLN, KC_COLN, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME },
{ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SLSH, KC_BSLS, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ },
},
[LAYER_FUNCTION] = { // FUNCTION
{ KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ },
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_PAUS },
{ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_PSCR },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_VOLU, KC_MUTE },
{ _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT },
},
#ifdef MOUSEKEY_ENABLE
[LAYER_MOUSE] = { // MOUSE
{ _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U },
{ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D },
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
},
#endif
[LAYER_ADJUST] = { // ADJUST
{ _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ },
{ _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
{ _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ },
},
/*
[LAYER_EMPTY] = { // LAYER
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ },
},
*/
};
#ifdef AUDIO_ENABLE
float tone_my_startup[][2] = SONG(ODE_TO_JOY);
float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY);
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE);
float tone_music_on[][2] = SONG(DOE_A_DEER);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
float tone_caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
float tone_numlk_on[][2] = SONG(NUM_LOCK_ON_SOUND);
float tone_numlk_off[][2] = SONG(NUM_LOCK_OFF_SOUND);
float tone_scroll_on[][2] = SONG(SCROLL_LOCK_ON_SOUND);
float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
#endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_MODS_ONESHOT(MOD_LSFT),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id)
{
case MACRO_BREATH_TOGGLE:
if (record->event.pressed)
{
breathing_toggle();
}
break;
case MACRO_BREATH_SPEED_INC:
if (record->event.pressed)
{
breathing_speed_inc(1);
}
break;
case MACRO_BREATH_SPEED_DEC:
if (record->event.pressed)
{
breathing_speed_dec(1);
}
break;
case MACRO_BREATH_DEFAULT:
if (record->event.pressed)
{
breathing_defaults();
}
break;
case MACRO_QWERTY:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_QWERTY);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, STACCATO);
#endif /* AUDIO_ENABLE */
}
break;
case MACRO_COLEMAK:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_COLEMAK);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, STACCATO);
#endif /* AUDIO_ENABLE */
}
break;
case MACRO_DVORAK:
if (record->event.pressed)
{
persistant_default_layer_set(1UL<<LAYER_DVORAK);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, STACCATO);
#endif /* AUDIO_ENABLE */
}
break;
case MACRO_UPPER:
if (record->event.pressed)
{
layer_on(LAYER_UPPER);
breathing_speed_set(2);
breathing_pulse();
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
else
{
layer_off(LAYER_UPPER);
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
break;
case MACRO_LOWER:
if (record->event.pressed)
{
layer_on(LAYER_LOWER);
breathing_speed_set(2);
breathing_pulse();
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
else
{
layer_off(LAYER_LOWER);
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
break;
case MACRO_FUNCTION:
if (record->event.pressed)
{
breathing_speed_set(3);
breathing_enable();
layer_on(LAYER_FUNCTION);
}
else
{
breathing_speed_set(1);
breathing_self_disable();
layer_off(LAYER_FUNCTION);
}
break;
#ifdef MOUSEKEY_ENABLE
case MACRO_MOUSE:
if (record->event.pressed)
{
layer_invert(LAYER_MOUSE);
}
break;
#endif /* MOUSEKEY_ENABLE */
#ifdef AUDIO_ENABLE
case MACRO_TIMBRE_1:
if (record->event.pressed) set_timbre(TIMBRE_12);
break;
case MACRO_TIMBRE_2:
if (record->event.pressed) set_timbre(TIMBRE_25);
break;
case MACRO_TIMBRE_3:
if (record->event.pressed) set_timbre(TIMBRE_50);
break;
case MACRO_TIMBRE_4:
if (record->event.pressed) set_timbre(TIMBRE_75);
break;
case MACRO_TEMPO_U:
if (record->event.pressed) increase_tempo(10);
break;
case MACRO_TEMPO_D:
if (record->event.pressed) decrease_tempo(10);
break;
case MACRO_TONE_DEFAULT:
if (record->event.pressed)
{
set_timbre(TIMBRE_DEFAULT);
set_tempo(TEMPO_DEFAULT);
}
break;
/*
case MACRO_AUDIO_TOGGLE:
if (record->event.pressed)
{
if (is_audio_on())
{
audio_off();
}
else
{
audio_on();
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
}
}
break;
case MACRO_MUSIC_TOGGLE:
if (record->event.pressed)
{
if (IS_LAYER_ON(LAYER_MUSIC))
{
layer_off(LAYER_MUSIC);
stop_all_notes();
}
else
{
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
layer_on(LAYER_MUSIC);
}
}
break;
case MACRO_INC_VOICE:
if (record->event.pressed)
{
#ifdef AUDIO_ENABLE
voice_iterate();
PLAY_NOTE_ARRAY(music_scale, false, STACCATO);
#endif
}
break;
case MACRO_DEC_VOICE:
if (record->event.pressed)
{
#ifdef AUDIO_ENABLE
voice_deiterate();
PLAY_NOTE_ARRAY(music_scale, false, STACCATO);
#endif
}
break;
*/
#endif /* AUDIO_ENABLE */
#ifdef BACKLIGHT_ENABLE
case MACRO_BACKLIGHT:
if (record->event.pressed)
{
backlight_step();
}
#endif
default:
break;
}
return MACRO_NONE;
};
#ifdef AUDIO_ENABLE
void matrix_init_user(void)
{
set_voice(default_voice);
startup_user();
println("Matrix Init");
}
void led_set_user(uint8_t usb_led)
{
static uint8_t old_usb_led = 0;
_delay_ms(10); // gets rid of tick
if (!is_playing_notes())
{
if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
{
// If CAPS LK LED is turning on...
PLAY_NOTE_ARRAY(tone_caps_on, false, LEGATO);
}
else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK)))
{
// If CAPS LK LED is turning off...
PLAY_NOTE_ARRAY(tone_caps_off, false, LEGATO);
}
else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK)))
{
// If NUM LK LED is turning on...
PLAY_NOTE_ARRAY(tone_numlk_on, false, LEGATO);
}
else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK)))
{
// If NUM LED is turning off...
PLAY_NOTE_ARRAY(tone_numlk_off, false, LEGATO);
}
else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
{
// If SCROLL LK LED is turning on...
PLAY_NOTE_ARRAY(tone_scroll_on, false, LEGATO);
}
else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
{
// If SCROLL LED is turning off...
PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO);
}
}
old_usb_led = usb_led;
}
void startup_user()
{
_delay_ms(10); // gets rid of tick
PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO);
}
void shutdown_user()
{
PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO);
_delay_ms(2000);
stop_all_notes();
}
void audio_on_user(void)
{
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
}
void music_on_user(void)
{
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, STACCATO);
}
#endif /* AUDIO_ENABLE */

87
keyboards/atreus/Makefile Normal file
View file

@ -0,0 +1,87 @@
ifdef TEENSY2
OPT_DEFS += -DATREUS_TEENSY2
ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
OPT_DEFS += -DATREUS_ASTAR
ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
# 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
# comment out to disable the options.
#
#BOOTMAGIC_ENABLE = yes # 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 ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
# MIDI_ENABLE ?= YES # MIDI controls
UNICODE_ENABLE ?= YES # Unicode
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../Makefile
endif
USB ?= /dev/cu.usbmodem1411
upload: build
$(ATRUES_UPLOAD_COMMAND)

186
keyboards/atreus/README.md Normal file
View file

@ -0,0 +1,186 @@
atreus keyboard firmware
======================
## Quantum MK Firmware
You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you.
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = yes # MIDI controls
# UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not //
BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
## Atreus specific information
These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, one powered by an A-Star. This repository currently assumes that you have an A-Star powered Atreus. If you are using a Teensy2, specify that by adding `TEENSY2=yes` to your `make` commands.
If you are coming from the [atreus-firmware](https://github.com/technomancy/atreus-firmware), we've also brought forward the `make upload` command for you to use.
## Quick aliases to common actions
Your keymap can include shortcuts to common operations (called "function actions" in tmk).
### Switching and toggling layers
`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
### Fun with modifier keys
* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
* `RSFT(kc)` - applies right Shift to *kc*
* `LCTL(kc)` - applies left Control to *kc*
* `RCTL(kc)` - applies right Control to *kc*
* `LALT(kc)` - applies left Alt to *kc*
* `RALT(kc)` - applies right Alt to *kc*
* `LGUI(kc)` - applies left GUI (command/win) to *kc*
* `RGUI(kc)` - applies right GUI (command/win) to *kc*
You can also chain these, like this:
LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`.
KC_TILD ~
KC_EXLM !
KC_AT @
KC_HASH #
KC_DLR $
KC_PERC %
KC_CIRC ^
KC_AMPR &
KC_ASTR *
KC_LPRN (
KC_RPRN )
KC_UNDS _
KC_PLUS +
KC_LCBR {
KC_RCBR }
KC_PIPE |
KC_COLN :
`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available):
* MOD_LCTL
* MOD_LSFT
* MOD_LALT
* MOD_LGUI
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped.
We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
* `CTL_T(kc)` - is LCTL when held and *kc* when tapped
* `SFT_T(kc)` - is LSFT when held and *kc* when tapped
* `ALT_T(kc)` - is LALT when held and *kc* when tapped
* `GUI_T(kc)` - is LGUI when held and *kc* when tapped
* `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
### Temporarily setting the default layer
`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
### Remember: These are just aliases
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
## Macro shortcuts: Send a whole string when pressing just one key
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).
```c
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
{
switch(id) {
case 0: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes
}
break;
}
return MACRO_NONE;
};
```
A macro can include the following commands:
* I() change interval of stroke in milliseconds.
* D() press key.
* U() release key.
* T() type key(press and release).
* W() wait (milliseconds).
* END end mark.
So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends.
Note: Using macros to have your keyboard send passwords for you is a bad idea.
### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc)
Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
#include "keymap_<layout>.h"
Where <layout> is "colemak" or "dvorak". After including this line, you will get access to:
* `CM_*` for all of the Colemak-equivalent characters
* `DV_*` for all of the Dvorak-equivalent characters
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`.
## Additional language support
In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support).
## Unicode support
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
## Other firmware shortcut keycodes
* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`)
* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things
* `BL_ON` - turns the backlight on
* `BL_OFF` - turns the backlight off
* `BL_<n>` - sets the backlight to level *n*
* `BL_INC` - increments the backlight level by one
* `BL_DEC` - decrements the backlight level by one
* `BL_TOGG` - toggles the backlight
* `BL_STEP` - steps through the backlight levels
Enable the backlight from the Makefile.
## MIDI functionalty
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
## Bluetooth functionality
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
## Building
Download or clone the whole firmware and navigate to the keyboards/planck 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.
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`.
### 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 file 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 `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

29
keyboards/atreus/atreus.c Normal file
View file

@ -0,0 +1,29 @@
#include "atreus.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave these blank
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave these blank
};
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
if (matrix_init_user) {
(*matrix_init_user)();
}
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
if (matrix_scan_user) {
(*matrix_scan_user)();
}
};

28
keyboards/atreus/atreus.h Normal file
View file

@ -0,0 +1,28 @@
#ifndef ATREUS_H
#define ATREUS_H
#include "matrix.h"
#include "keymap.h"
#include "backlight.h"
#include <stddef.h>
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \
) \
{ \
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
{ k2a, k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

88
keyboards/atreus/config.h Normal file
View file

@ -0,0 +1,88 @@
/*
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 Technomancy
#define PRODUCT Atreus
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 11
// Change this to how you wired your keyboard
// COLS: Left to right, ROWS: Top to bottom
#if defined(ATREUS_ASTAR)
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
# define UNUSED_PINS
#elif defined(ATREUS_TEENSY2)
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
# define UNUSED_PINS
#endif
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
/* 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
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,51 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "atreus.h"
// 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 _QW 0
#define _RS 1
#define _LW 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = { /* Qwerty */
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
},
[_RS] = { /* [> RAISE <] */
{KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
{KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
{KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS},
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
},
[_LW] = { /* [> LOWER <] */
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET}
}};
const uint16_t PROGMEM fn_actions[] = {
};
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;
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,66 @@
// This is the personal keymap of Chris Gerber (@gerbercj). I haven't worked out the kinks
// with the Colemak and Dvorak support yet, but everything else works nicely.
#include "atreus.h"
// 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 _QW 0
#define _CM 1
#define _DV 2
#define _L1 3
#define _L2 4
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = { /* Qwerty */
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P },
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT }
},
[_CM] = { /* Colemak */
{KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
{KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O },
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH},
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT }
},
[_DV] = { /* Dvorak */
{KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L },
{KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S },
{KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z },
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_ENT }
},
[_L1] = { /* LAYER 1 */
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_VOLU, KC_7, KC_8, KC_9, KC_LBRC},
{KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_VOLD, KC_4, KC_5, KC_6, KC_RBRC},
{KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_MINS, KC_LALT, KC_MUTE, KC_1, KC_2, KC_3, KC_BSLS},
{TG(_L2), KC_APP, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL }
},
[_L2] = { /* LAYER 2 */
{KC_TRNS, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, KC_NO, DF(_QW), KC_F7, KC_F8, KC_F9, KC_F10 },
{KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_NO, DF(_CM), KC_F6, KC_F5, KC_F6, KC_F11 },
{KC_BTN4, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, KC_LALT, DF(_DV), KC_F1, KC_F2, KC_F3, KC_F12 },
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET }
}
};
const uint16_t PROGMEM fn_actions[] = {
};
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;
};

View file

@ -0,0 +1,72 @@
# 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=512
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # 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 ?= yes # Breathing sleep LED during USB suspend
# NKRO_ENABLE ?= yes # USB 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
# UNICODE_ENABLE ?= YES # Unicode
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../Makefile
endif

View file

@ -0,0 +1,24 @@
Bantam44 keyboard firmware
======================
## Quantum MK Firmware
For the full Quantum feature list, see [the parent README.md](/README.md).
## Building
Download or clone the whole firmware and navigate to the keyboards/Bantam44 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.
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`.
### 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 file 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 `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.

View file

@ -0,0 +1,25 @@
#include "bantam44.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave these blank
}
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave these blank
}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}

View file

@ -0,0 +1,29 @@
#ifndef BANTAM44_H
#define BANTAM44_H
#include "matrix.h"
#include "keymap.h"
#include "backlight.h"
#include <stddef.h>
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
K30, K31, K32, K33, K34, K35, K36, K37, K38 \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
{ K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 }, \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

View file

@ -0,0 +1,82 @@
/*
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 Bantam Keyboards
#define PRODUCT Bantam44
#define DESCRIPTION A custom keyboard
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12
// Planck PCB default pin-out
// Change this to how you wired your keyboard
// COLS: Left to right, ROWS: Top to bottom
#define MATRIX_ROW_PINS { F0, D6, D4, D5 }
#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* 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
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
#include "bantam44.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { /* Base */
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_ENT },
{KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT },
{KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(1), KC_NO, KC_SPC, KC_NO, MO(2), KC_SCLN, KC_QUOT, KC_SLSH }
},
[1] = { /* LOWER */
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT },
{KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_ENT },
{KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT },
{KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_END, KC_PGDN, KC_EXLM }
},
[2] = { /* RAISE */
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
{KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, KC_ENT },
{KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT },
{KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }
}
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function
{
return MACRO_NONE;
};

View file

@ -0,0 +1,72 @@
# # project specific files
SRC = led.c
# MCU name
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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # 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
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../Makefile
endif

View file

@ -0,0 +1,19 @@
#include "clueboard1.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave these blank
}
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave these blank
}
void matrix_init_kb(void) {
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}

View file

@ -0,0 +1,52 @@
#ifndef CLUEBOARD1_H
#define CLUEBOARD1_H
#include "matrix.h"
#include "keymap.h"
#include <stddef.h>
/* Clueboard matrix layout
* ,-----------------------------------------------------------. ,---.
* | 00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| | 0F|
* |-----------------------------------------------------------| |---|
* | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| 1D| | 1F|
* |-----------------------------------------------------------| `---'
* | 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 2A| 2B| 2C| 2D|
* |------------------------------------------------------------.
* | 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 3A| 3B| 3C| 3D|3E|
* |------------------------------------------------------------------.
* | 40| 41| 42| 43| 45| 46| 49| 4A| 4B| 4C| 4D| 4E| 4F|
* `------------------------------------------------------------------'
* ,-----------------------------------------------------------. ,---.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins|
* |-----------------------------------------------------------| |---|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
* |-----------------------------------------------------------| `---'
* |Caps | A| S| D| F| G| H| J| k| L| ;| '| # | Ent|
* |--------------------------------------------------------------.
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /| \|Shift| Up|
* |------------------------------------------------------------------.
* |Ctrl|Alt|Gui |MHen| Space| Space|Henk|Gui |Ctrl| Fn|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
k40, k41, k42, k43, k45, k46, k49, k4A, k4B, k4C, k4D, k4E, k4F \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO, k1F }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
{ k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E, k4F } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

View file

@ -0,0 +1,95 @@
/*
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 0xC1ED
#define PRODUCT_ID 0x2301
#define DEVICE_VER 0x0003
#define MANUFACTURER Clueboard
#define PRODUCT Clueboard
#define DESCRIPTION QMK keyboard firmware for Clueboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
// ROWS: Top to bottom, COLS: Left to right
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1
*/
#define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 }
/* Row pin configuration
* row: 0 1 2 3 4
* pin: D1 D0 D2 D5 D3
*/
#define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 }
#define UNUSED_PINS
/* 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)) \
)
/* Underlight configuration
*/
#define ws2812_PORTREG PORTB
#define ws2812_DDRREG DDRB
#define ws2812_pin 2
#define RGBLED_NUM 14 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,184 @@
#include "clueboard1.h"
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// 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 _BL 0
#define _FL 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,--------------------------------------------------------------------------. ,----.
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP|
* |--------------------------------------------------------------------------| |----|
* | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN|
* |--------------------------------------------------------------------------| `----'
* |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
* |-----------------------------------------------------------------------------.
* |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP|
* |------------------------------------------------------------------------|----|----.
* | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
* `----------------------------------------------------------------------------------'
*/
[_BL] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
* ,--------------------------------------------------------------------------. ,----.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
* |--------------------------------------------------------------------------| |----|
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | |PGUP|
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL|HOME|PGDN| END|
* `----------------------------------------------------------------------------------'
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),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_PGUP, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
/* Keymap _RS: Reset layer
* ,--------------------------------------------------------------------------. ,----.
* | | | | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------| |----|
* | | | | |RESET| | | | | | | | | | | |
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL| | | |
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
#ifdef RGBLIGHT_ENABLE
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, F(1), F(7), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)),
#else
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,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),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, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS),
#endif
};
enum function_id {
SHIFT_ESC,
#ifdef RGBLIGHT_ENABLE
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
RGBLED_DECREASE_HUE,
RGBLED_INCREASE_SAT,
RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL
#endif
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
#ifdef RGBLIGHT_ENABLE
[1] = ACTION_FUNCTION(RGBLED_TOGGLE),
[2] = ACTION_FUNCTION(RGBLED_STEP_MODE),
[3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
[4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
[5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
[6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
[7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
#endif
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
//led operations
#ifdef RGBLIGHT_ENABLE
case RGBLED_TOGGLE:
if (record->event.pressed) {
rgblight_toggle();
}
break;
case RGBLED_INCREASE_HUE:
if (record->event.pressed) {
rgblight_increase_hue();
}
break;
case RGBLED_DECREASE_HUE:
if (record->event.pressed) {
rgblight_decrease_hue();
}
break;
case RGBLED_INCREASE_SAT:
if (record->event.pressed) {
rgblight_increase_sat();
}
break;
case RGBLED_DECREASE_SAT:
if (record->event.pressed) {
rgblight_decrease_sat();
}
break;
case RGBLED_INCREASE_VAL:
if (record->event.pressed) {
rgblight_increase_val();
}
break;
case RGBLED_DECREASE_VAL:
if (record->event.pressed) {
rgblight_decrease_val();
}
break;
case RGBLED_STEP_MODE:
if (record->event.pressed) {
rgblight_step();
}
break;
#endif
}
}

View file

@ -0,0 +1,32 @@
/*
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/>.
*/
#include <avr/io.h>
#include "stdint.h"
#include "led.h"
void led_set_kb(uint8_t usb_led) {
DDRF |= (1<<0);
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTF |= (1<<0);
} else {
// Turn capslock off
PORTF &= ~(1<<0);
}
}

View file

@ -0,0 +1,77 @@
SRC = led.c
# 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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # 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
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
#ifdef BACKLIGHT_ENABLE
SRC := backlight.c $(SRC)
#endif
ifndef QUANTUM_DIR
include ../../Makefile
endif

View file

@ -0,0 +1,41 @@
#include <avr/io.h>
#include "backlight.h"
#include "print.h"
/* Clueboard 2.0 LED locations:
*
* Capslock: B4, pull high to turn on
* LCtrl: Shared with Capslock, DO NOT INSTALL LED'S IN BOTH
* Page Up: B7, pull high to turn on
* Escape: D6, pull high to turn on
* Arrows: D4, pull high to turn on
*/
void init_backlight_pin(void) {
print("init_backlight_pin()\n");
// Set our LED pins as output
DDRD |= (1<<6); // Esc
DDRB |= (1<<7); // Page Up
DDRD |= (1<<4); // Arrows
// Set our LED pins low
PORTD &= ~(1<<6); // Esc
PORTB &= ~(1<<7); // Page Up
PORTD &= ~(1<<4); // Arrows
}
void backlight_set(uint8_t level) {
if ( level == 0 ) {
// Turn off light
PORTD |= (1<<6); // Esc
PORTB |= (1<<7); // Page Up
PORTD |= (1<<4); // Arrows
} else {
// Turn on light
PORTD &= ~(1<<6); // Esc
PORTB &= ~(1<<7); // Page Up
PORTD &= ~(1<<4); // Arrows
}
}

View file

@ -0,0 +1,40 @@
#include "clueboard2.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
__attribute__ ((weak))
void matrix_init_user(void) {
// leave these blank
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave these blank
};
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
if (matrix_init_user) {
(*matrix_init_user)();
}
led_init_ports();
#ifdef BACKLIGHT_ENABLE
init_backlight_pin();
#endif
// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
if (matrix_scan_user) {
(*matrix_scan_user)();
}
};

View file

@ -0,0 +1,57 @@
#ifndef CLUEBOARD2_H
#define CLUEBOARD2_H
#include "matrix.h"
#include "keymap.h"
#include <stddef.h>
/* Clueboard matrix layout
* ,-----------------------------------------------------------. ,---.
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 55| 56| | 57|
* |-----------------------------------------------------------| |---|
* | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
* |-----------------------------------------------------------| `---'
* | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 74| 75|
* |------------------------------------------------------------.
* | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86|
* |------------------------------------------------------------------.
* | 40| 41| 42| 43| 45| 46| 90| 91| 92| 93| 94| 95| 96|
* `------------------------------------------------------------------'
* ,-----------------------------------------------------------. ,---.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins|
* |-----------------------------------------------------------| |---|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
* |-----------------------------------------------------------| `---'
* |Caps | A| S| D| F| G| H| J| k| L| ;| '| # | Ent|
* |--------------------------------------------------------------.
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /| \|Shift| Up|
* |------------------------------------------------------------------.
* |Ctrl|Alt|Gui |MHen| Space| Space|Henk|Gui |Ctrl| Fn|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \
k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k84, k85, k86, \
k40, k41, k42, k43, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
{ k30, k31, k32, k33, k34, k35, k36, k37 }, \
{ k40, k41, k42, k43, KC_NO, k45, k46, KC_NO }, \
{ k50, k51, k52, k53, k54, k55, k56, k57 }, \
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
{ k70, k71, k72, k73, k74, k75, KC_NO, KC_NO }, \
{ k80, k81, k82, k83, k84, k85, k86, KC_NO }, \
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

View file

@ -0,0 +1,99 @@
/*
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 0xC1ED
#define PRODUCT_ID 0x2320
#define DEVICE_VER 0x0001
#define MANUFACTURER Clueboard
#define PRODUCT Clueboard with RGB Underlighting
#define DESCRIPTION QMK keyboard firmware for Clueboard
/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_COLS 8
// ROWS: Top to bottom, COLS: Left to right
/* Row pin configuration
* row: 0 1 2 3 4 5 6 7 8 9
* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
*/
#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7
* pin: F0 F1 F4 F5 F6 F7 E6 B1
*/
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
#define UNUSED_PINS
/* 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)) \
)
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 1
/* Underlight configuration
*/
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
#define ws2812_pin 7
#define RGBLED_NUM 14 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,183 @@
#include "clueboard2.h"
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// 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 _BL 0
#define _FL 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,--------------------------------------------------------------------------. ,----.
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP|
* |--------------------------------------------------------------------------| |----|
* | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN|
* |--------------------------------------------------------------------------| `----'
* |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
* |-----------------------------------------------------------------------------.
* |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP|
* |------------------------------------------------------------------------|----|----.
* | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
* `----------------------------------------------------------------------------------'
*/
[_BL] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
* ,--------------------------------------------------------------------------. ,----.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
* |--------------------------------------------------------------------------| |----|
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | |PGUP|
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL|HOME|PGDN| END|
* `----------------------------------------------------------------------------------'
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),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_PGUP, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
/* Keymap _RS: Reset layer
* ,--------------------------------------------------------------------------. ,----.
* | | | | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------| |----|
* | | | | |RESET| | | | | | | | | | | |
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL| | | |
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
#ifdef RGBLIGHT_ENABLE
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, F(1), F(7), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)),
#else
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,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),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, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS),
#endif
};
enum function_id {
SHIFT_ESC,
#ifdef RGBLIGHT_ENABLE
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
RGBLED_DECREASE_HUE,
RGBLED_INCREASE_SAT,
RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL
#endif
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
#ifdef RGBLIGHT_ENABLE
[1] = ACTION_FUNCTION(RGBLED_TOGGLE),
[2] = ACTION_FUNCTION(RGBLED_STEP_MODE),
[3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
[4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
[5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
[6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
[7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
#endif
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
//led operations
#ifdef RGBLIGHT_ENABLE
case RGBLED_TOGGLE:
if (record->event.pressed) {
rgblight_toggle();
}
break;
case RGBLED_INCREASE_HUE:
if (record->event.pressed) {
rgblight_increase_hue();
}
break;
case RGBLED_DECREASE_HUE:
if (record->event.pressed) {
rgblight_decrease_hue();
}
break;
case RGBLED_INCREASE_SAT:
if (record->event.pressed) {
rgblight_increase_sat();
}
break;
case RGBLED_DECREASE_SAT:
if (record->event.pressed) {
rgblight_decrease_sat();
}
break;
case RGBLED_INCREASE_VAL:
if (record->event.pressed) {
rgblight_increase_val();
}
break;
case RGBLED_DECREASE_VAL:
if (record->event.pressed) {
rgblight_decrease_val();
}
break;
case RGBLED_STEP_MODE:
if (record->event.pressed) {
rgblight_step();
}
break;
#endif
}
}

View file

@ -0,0 +1,11 @@
# 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
#
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,147 @@
#include "clueboard2.h"
#ifdef ENABLE_RGBLIGHT
#include "rgblight.h"
#endif
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// 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 _BL 0
#define _FL 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,--------------------------------------------------------------------------. ,----.
* | Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| ~| BS| |PgUp|
* |--------------------------------------------------------------------------| |----|
* | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgDn|
* |--------------------------------------------------------------------------| `----'
* |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
* |-----------------------------------------------------------------------------.
* |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| Up|
* |------------------------------------------------------------------------|----|----.
* | Ctrl| Alt| Gui| MHen| Space| Space| Hen| Gui| Alt| Ctrl|Left|Down|Rght|
* `----------------------------------------------------------------------------------'
*/
[_BL] = KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \
KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
* ,--------------------------------------------------------------------------. ,----.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
* |--------------------------------------------------------------------------| |----|
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | |PGUP|
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL|HOME|PGDN| END|
* `----------------------------------------------------------------------------------'
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_PGUP, \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END),
/* Keymap _RS: Reset/Underlight layer
* ,--------------------------------------------------------------------------. ,----.
* | | | | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------| |----|
* | | | | |RESET| | | | | | | | | | | |
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL| | | |
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
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, F(0), F(6), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(7), \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(4), \
KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(1), F(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(3), F(5), F(2)),
};
enum function_id {
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
RGBLED_DECREASE_HUE,
RGBLED_INCREASE_SAT,
RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(RGBLED_TOGGLE),
[1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
[2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
[3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
[4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
[5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
[6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
case RGBLED_TOGGLE:
//led operations
if (record->event.pressed) {
rgblight_toggle();
}
break;
case RGBLED_INCREASE_HUE:
if (record->event.pressed) {
rgblight_increase_hue();
}
break;
case RGBLED_DECREASE_HUE:
if (record->event.pressed) {
rgblight_decrease_hue();
}
break;
case RGBLED_INCREASE_SAT:
if (record->event.pressed) {
rgblight_increase_sat();
}
break;
case RGBLED_DECREASE_SAT:
if (record->event.pressed) {
rgblight_decrease_sat();
}
break;
case RGBLED_INCREASE_VAL:
if (record->event.pressed) {
rgblight_increase_val();
}
break;
case RGBLED_DECREASE_VAL:
if (record->event.pressed) {
rgblight_decrease_val();
}
break;
case RGBLED_STEP_MODE:
if (record->event.pressed) {
rgblight_step();
}
break;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,108 @@
#include "clueboard2.h"
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// 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 _BL 0
#define _FL 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,--------------------------------------------------------------------------. ,----.
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP|
* |--------------------------------------------------------------------------| |----|
* | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN|
* |--------------------------------------------------------------------------| `----'
* |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
* |-----------------------------------------------------------------------------.
* |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP|
* |------------------------------------------------------------------------|----|----.
* | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
* `----------------------------------------------------------------------------------'
*/
[_BL] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
* ,--------------------------------------------------------------------------. ,----.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
* |--------------------------------------------------------------------------| |----|
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | |PGUP|
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL|HOME|PGDN| END|
* `----------------------------------------------------------------------------------'
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_DEL, BL_STEP, \
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \
KC_TRNS,KC_TRNS,MO(_RS),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_PGUP, \
KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL), KC_TRNS,KC_TRNS, MO(_FL),KC_TRNS,KC_TRNS,MO(_FL),KC_HOME,KC_PGDN,KC_END),
/* Keymap _RS: Reset layer
* ,--------------------------------------------------------------------------. ,----.
* | | | | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------| |----|
* | | | | |RESET| | | | | | | | | | | |
* |--------------------------------------------------------------------------| `----'
* | | | _RS| | | | | | | | | | | |
* |-----------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |------------------------------------------------------------------------|----|----.
* | | | | | | | | | | _FL| | | |
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
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,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \
KC_TRNS,KC_TRNS,MO(_RS),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,MO(_FL),KC_TRNS, KC_TRNS, KC_TRNS),
};
enum function_id {
SHIFT_ESC,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}

View file

@ -0,0 +1,36 @@
/*
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/>.
*/
#include <avr/io.h>
#include "stdint.h"
#include "led.h"
void led_init_ports() {
// * Set our LED pins as output
DDRB |= (1<<4);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTB |= (1<<4);
} else {
// Turn capslock off
PORTB &= ~(1<<4);
}
}

View file

@ -0,0 +1,74 @@
# # project specific files
SRC = backlight.c
# 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
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # 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
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= yes # Enable numpad's backlight functionality
RGBLIGHT_ENABLE ?= yes
# MIDI_ENABLE ?= YES # MIDI controls
# UNICODE_ENABLE ?= YES # Unicode
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../Makefile
endif

View file

@ -0,0 +1,54 @@
#include <avr/io.h>
#include "backlight.h"
#include "led.h"
#include "print.h"
int pwm_level;
void led_set_kb(uint8_t usb_led)
{
print("led_set\n");
}
void init_backlight_pin(void)
{
// Set C7 to output
DDRC |= (1<<7);
// Initialize the timer
TC4H = 0x03;
OCR4C = 0xFF;
TCCR4A = 0b10000010;
TCCR4B = 0b00000001;
}
void backlight_set(uint8_t level)
{
// Determine the PWM level
switch (level)
{
case 0:
// 33%
pwm_level = 0x54;
break;
case 1:
// 66%
pwm_level = 0xA8;
break;
case 2:
// 100%
pwm_level = 0xFF;
break;
case 3:
// 0%
pwm_level = 0x00;
break;
default:
xprintf("Unknown level: %d\n", level);
}
// Write the PWM level to the timer
TC4H = pwm_level >> 8;
OCR4A = 0xFF & pwm_level;
}

View file

@ -0,0 +1,35 @@
#include "cluepad.h"
__attribute__ ((weak))
void matrix_init_user(void) {
// leave these blank
};
__attribute__ ((weak))
void matrix_scan_user(void) {
// leave these blank
};
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
if (matrix_init_user) {
(*matrix_init_user)();
}
#ifdef BACKLIGHT_ENABLE
init_backlight_pin();
#endif
// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
if (matrix_scan_user) {
(*matrix_scan_user)();
}
};

View file

@ -0,0 +1,41 @@
#ifndef CLUEPAD_H
#define CLUEPAD_H
#include "matrix.h"
#include "keymap.h"
#include <stddef.h>
/* Cluepad matrix layout
* .-------------------.
* |NLCK| /| *| -|
* |-------------------|
* | 7| 8| 9| |
* |--------------| |
* | 4| 5| 6| +|
* |-------------------|
* | 1| 2| 3| |
* |--------------| |
* | 0| .| Ent|
* '-------------------'
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, \
k30, k31, k32, k33, \
k40, k42 \
) { \
{ k00, k01, k02, k03, }, \
{ k10, k11, k12, k13, }, \
{ k20, k21, k22, KC_NO, }, \
{ k30, k31, k32, k33, }, \
{ k40, KC_NO, k42, KC_NO } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

101
keyboards/cluepad/config.h Normal file
View file

@ -0,0 +1,101 @@
/*
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 0xC1ED
#define PRODUCT_ID 0x2312
#define DEVICE_VER 0x0001
#define MANUFACTURER Clueboard
#define PRODUCT Cluepad with RGB Underlighting
#define DESCRIPTION QMK keyboard firmware for Cluepad
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 4
// ROWS: Top to bottom, COLS: Left to right
/* Row pin configuration
* row: 0 1 2 3 4
* pin:
*/
#define MATRIX_ROW_PINS { B0, D3, D5, D4, D6 }
/* Column pin configuration
* col: 0 1 2 3
* pin: F4 E6 B1 D2
*/
#define MATRIX_COL_PINS { F4, E6, B1, D2 }
#define UNUSED_PINS
/* 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
/* Number of backlighting levels */
#define BACKLIGHT_LEVELS 3
/* 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)) \
)
/* Underlight configuration
*/
#define ws2812_PORTREG PORTF
#define ws2812_DDRREG DDRF
#define ws2812_pin 6
#define RGBLED_NUM 4 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* Debug forcibly enabled */
#define ALWAYS_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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,122 @@
#include "cluepad.h"
#include "backlight.h"
#include "rgblight.h"
// 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 _BL 0
#define _FL 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* .-------------------.
* |NL F| /| *| -|
* |-------------------|
* | 7| 8| 9| |
* |--------------| |
* | 4| 5| 6| +|
* |-------------------|
* | 1| 2| 3| |
* |--------------| |
* | 0| .| Ent|
* '-------------------'
*/
[_BL] = KEYMAP(
LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_PDOT),
/* Keymap _FL: Function Layer
* .-------------------.
* |NL F| | | Fn0|
* |-------------------|
* | | Fn4| | |
* |--------------| |
* | Fn3|BL_S| Fn2| Fn6|
* |-------------------|
* | | Fn5| | |
* |--------------| |
* | Fn1| | Fn7|
* '-------------------'
*/
[_FL] = KEYMAP(
LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, F(0), \
KC_TRNS, F(4), KC_TRNS, F(6), \
F(3), BL_STEP, F(2), \
KC_TRNS, F(5), KC_TRNS, F(7), \
F(1), KC_TRNS)
};
enum function_id {
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
RGBLED_DECREASE_HUE,
RGBLED_INCREASE_SAT,
RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(RGBLED_TOGGLE),
[1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
[2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
[3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
[4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
[5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
[6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
case RGBLED_TOGGLE:
if (record->event.pressed) {
rgblight_toggle();
}
break;
case RGBLED_INCREASE_HUE:
if (record->event.pressed) {
rgblight_increase_hue();
}
break;
case RGBLED_DECREASE_HUE:
if (record->event.pressed) {
rgblight_decrease_hue();
}
break;
case RGBLED_INCREASE_SAT:
if (record->event.pressed) {
rgblight_increase_sat();
}
break;
case RGBLED_DECREASE_SAT:
if (record->event.pressed) {
rgblight_decrease_sat();
}
break;
case RGBLED_INCREASE_VAL:
if (record->event.pressed) {
rgblight_increase_val();
}
break;
case RGBLED_DECREASE_VAL:
if (record->event.pressed) {
rgblight_decrease_val();
}
break;
case RGBLED_STEP_MODE:
if (record->event.pressed) {
rgblight_step();
}
break;
}
}

View file

@ -0,0 +1,19 @@
#!/bin/bash
#a tool to fix broken keymaps as a result of pull request #190
#changing the declaration of matrix_scan_user() and matrix_init_user()
#
#This script will save a copy of the specified keymap as keymap.c.bak
#and then create a new keymap.c with the definion corrected.
#this script must be run from the ergodox_ez directory
if [ $# -ne 1 ]; then
echo $0: usage: ./190hotfix keymap_name
exit 1
fi
echo Saving backup as ./keymaps/$1/keymap.c.bak ...
mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak
echo Modifying ./keymaps/$1/keymap.c ...
cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c
echo Complete!

View file

@ -0,0 +1,86 @@
#----------------------------------------------------------------------------
# On command line:
#
# make = Make software.
#
# make clean = Clean out built project files.
#
# That's pretty much all you need. To compile, always go make clean,
# followed by make.
#
# For advanced users only:
# make teensy = Download the hex file to the device, using teensy_loader_cli.
# (must have teensy_loader_cli installed).
#
#----------------------------------------------------------------------------
# # project specific files
SRC = twimaster.c \
matrix.c
# MCU name
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=512
# Build Options
# comment out to disable the options.
#
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 ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ifndef QUANTUM_DIR
include ../../Makefile
endif

View file

@ -0,0 +1,90 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@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 0x1307
#define DEVICE_VER 0x0001
#define MANUFACTURER ErgoDox EZ
#define PRODUCT ErgoDox EZ
#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
/* key matrix size */
#define MATRIX_ROWS 14
#define MATRIX_COLS 6
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define TAPPING_TOGGLE 1
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
#define ROWS (int []){ D0, D5, B5, B6 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 2
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
)
/*
* 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
//#define DEBUG_MATRIX_SCAN_RATE
#endif

View file

@ -0,0 +1,100 @@
#include "ergodox_ez.h"
#include "i2cmaster.h"
bool i2c_initialized = 0;
uint8_t mcp23018_status = 0x20;
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
void matrix_init_kb(void) {
// keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
TCCR1A = 0b10101001; // set and configure fast PWM
TCCR1B = 0b00001001; // set and configure fast PWM
// (tied to Vcc for hardware convenience)
DDRB &= ~(1<<4); // set B(4) as input
PORTB &= ~(1<<4); // set B(4) internal pull-up disabled
// unused pins - C7, D4, D5, D7, E6
// set as input with internal pull-ip enabled
DDRC &= ~(1<<7);
DDRD &= ~(1<<7 | 1<<5 | 1<<4);
DDRE &= ~(1<<6);
PORTC |= (1<<7);
PORTD |= (1<<7 | 1<<5 | 1<<4);
PORTE |= (1<<6);
ergodox_blink_all_leds();
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}
void ergodox_blink_all_leds(void)
{
ergodox_led_all_off();
ergodox_led_all_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
_delay_ms(50);
ergodox_right_led_2_on();
_delay_ms(50);
ergodox_right_led_3_on();
_delay_ms(50);
ergodox_right_led_1_off();
_delay_ms(50);
ergodox_right_led_2_off();
_delay_ms(50);
ergodox_right_led_3_off();
//ergodox_led_all_on();
//_delay_ms(333);
ergodox_led_all_off();
}
uint8_t init_mcp23018(void) {
mcp23018_status = 0x20;
// I2C subsystem
if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
i2c_initialized++;
_delay_ms(1000);
}
// set pin direction
// - unused : input : 1
// - input : input : 1
// - driving : output : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
i2c_stop();
// set pull-up
// - unused : on : 1
// - input : on : 1
// - driving : off : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
out:
i2c_stop();
return mcp23018_status;
}

View file

@ -0,0 +1,127 @@
#ifndef ERGODOX_EZ_H
#define ERGODOX_EZ_H
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "i2cmaster.h"
#include <util/delay.h>
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define CPU_16MHz 0x00
// I2C aliases and register addresses (see "mcp23018.md")
#define I2C_ADDR 0b0100000
#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
#define IODIRA 0x00 // i/o direction register
#define IODIRB 0x01
#define GPPUA 0x0C // GPIO pull-up resistor register
#define GPPUB 0x0D
#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
#define GPIOB 0x13
#define OLATA 0x14 // output latch register
#define OLATB 0x15
extern uint8_t mcp23018_status;
void init_ergodox(void);
void ergodox_blink_all_leds(void);
uint8_t init_mcp23018(void);
uint8_t ergodox_left_leds_update(void);
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); }
inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); }
inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
inline void ergodox_led_all_on(void)
{
ergodox_board_led_on();
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
}
inline void ergodox_led_all_off(void)
{
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
}
inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }
inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; }
inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; }
inline void ergodox_right_led_set(uint8_t led, uint8_t n) {
(led == 1) ? (OCR1A = n) :
(led == 2) ? (OCR1B = n) :
(OCR1C = n);
}
inline void ergodox_led_all_set(uint8_t n)
{
ergodox_right_led_1_set(n);
ergodox_right_led_2_set(n);
ergodox_right_led_3_set(n);
}
#define KEYMAP( \
\
/* left hand, spatial positions */ \
k00,k01,k02,k03,k04,k05,k06, \
k10,k11,k12,k13,k14,k15,k16, \
k20,k21,k22,k23,k24,k25, \
k30,k31,k32,k33,k34,k35,k36, \
k40,k41,k42,k43,k44, \
k55,k56, \
k54, \
k53,k52,k51, \
\
/* right hand, spatial positions */ \
k07,k08,k09,k0A,k0B,k0C,k0D, \
k17,k18,k19,k1A,k1B,k1C,k1D, \
k28,k29,k2A,k2B,k2C,k2D, \
k37,k38,k39,k3A,k3B,k3C,k3D, \
k49,k4A,k4B,k4C,k4D, \
k57,k58, \
k59, \
k5C,k5B,k5A ) \
\
/* matrix positions */ \
{ \
{ k00, k10, k20, k30, k40, KC_NO }, \
{ k01, k11, k21, k31, k41, k51 }, \
{ k02, k12, k22, k32, k42, k52 }, \
{ k03, k13, k23, k33, k43, k53 }, \
{ k04, k14, k24, k34, k44, k54 }, \
{ k05, k15, k25, k35, KC_NO, k55 }, \
{ k06, k16, KC_NO, k36, KC_NO, k56 }, \
\
{ k07, k17, KC_NO, k37,KC_NO, k57 }, \
{ k08, k18, k28, k38,KC_NO, k58 }, \
{ k09, k19, k29, k39, k49, k59 }, \
{ k0A, k1A, k2A, k3A, k4A, k5A }, \
{ k0B, k1B, k2B, k3B, k4B, k5B }, \
{ k0C, k1C, k2C, k3C, k4C, k5C }, \
{ k0D, k1D, k2D, k3D, k4D, KC_NO } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

View file

@ -0,0 +1,178 @@
#ifndef _I2CMASTER_H
#define _I2CMASTER_H 1
/*************************************************************************
* Title: C include file for the I2C master interface
* (i2cmaster.S or twimaster.c)
* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
* Target: any AVR device
* Usage: see Doxygen manual
**************************************************************************/
#ifdef DOXYGEN
/**
@defgroup pfleury_ic2master I2C Master library
@code #include <i2cmaster.h> @endcode
@brief I2C (TWI) Master Software Library
Basic routines for communicating with I2C slave devices. This single master
implementation is limited to one bus master on the I2C bus.
This I2c library is implemented as a compact assembler software implementation of the I2C protocol
which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
Since the API for these two implementations is exactly the same, an application can be linked either against the
software I2C implementation or the hardware I2C implementation.
Use 4.7k pull-up resistor on the SDA and SCL pin.
Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
i2cmaster.S to your target when using the software I2C implementation !
Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
@note
The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
to GNU assembler and AVR-GCC C call interface.
Replaced the incorrect quarter period delays found in AVR300 with
half period delays.
@author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
@par API Usage Example
The following code shows typical usage of this library, see example test_i2cmaster.c
@code
#include <i2cmaster.h>
#define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
int main(void)
{
unsigned char ret;
i2c_init(); // initialize I2C library
// write 0x75 to EEPROM address 5 (Byte Write)
i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
i2c_write(0x05); // write address = 5
i2c_write(0x75); // write value 0x75 to EEPROM
i2c_stop(); // set stop conditon = release bus
// read previously written value back from EEPROM address 5
i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
i2c_write(0x05); // write address = 5
i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
ret = i2c_readNak(); // read one byte from EEPROM
i2c_stop();
for(;;);
}
@endcode
*/
#endif /* DOXYGEN */
/**@{*/
#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
#endif
#include <avr/io.h>
/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_READ 1
/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_WRITE 0
/**
@brief initialize the I2C master interace. Need to be called only once
@param void
@return none
*/
extern void i2c_init(void);
/**
@brief Terminates the data transfer and releases the I2C bus
@param void
@return none
*/
extern void i2c_stop(void);
/**
@brief Issues a start condition and sends address and transfer direction
@param addr address and transfer direction of I2C device
@retval 0 device accessible
@retval 1 failed to access device
*/
extern unsigned char i2c_start(unsigned char addr);
/**
@brief Issues a repeated start condition and sends address and transfer direction
@param addr address and transfer direction of I2C device
@retval 0 device accessible
@retval 1 failed to access device
*/
extern unsigned char i2c_rep_start(unsigned char addr);
/**
@brief Issues a start condition and sends address and transfer direction
If device is busy, use ack polling to wait until device ready
@param addr address and transfer direction of I2C device
@return none
*/
extern void i2c_start_wait(unsigned char addr);
/**
@brief Send one byte to I2C device
@param data byte to be transfered
@retval 0 write successful
@retval 1 write failed
*/
extern unsigned char i2c_write(unsigned char data);
/**
@brief read one byte from the I2C device, request more data from device
@return byte read from I2C device
*/
extern unsigned char i2c_readAck(void);
/**
@brief read one byte from the I2C device, read is followed by a stop condition
@return byte read from I2C device
*/
extern unsigned char i2c_readNak(void);
/**
@brief read one byte from the I2C device
Implemented as a macro, which calls either i2c_readAck or i2c_readNak
@param ack 1 send ack, request more data from device<br>
0 send nak, read is followed by a stop condition
@return byte read from I2C device
*/
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
/**@}*/
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,385 @@
[
{
"name": "Beginner's Keymap for Ergodox-EZ",
"author": "Anand Babu Periasamy"
},
[
{
"x": 3.5
},
"#\n3\n\n\nF3",
{
"x": 10.5
},
")\n0\n\n\nF10"
],
[
{
"y": -0.875,
"x": 2.5
},
"@\n2\n\n\nF2",
{
"x": 1
},
"$\n4\n\n\nF4",
{
"x": 8.5
},
"(\n9\n\n\nF9",
{
"x": 1
},
"_\n-\n\n\nF11"
],
[
{
"y": -0.875,
"x": 5.5
},
"%\n5\n\n\nF5",
"^\n6\n\n\nF6",
{
"x": 4.5
},
"&\n7\n\n\nF7",
"*\n8\n\n\nF8"
],
[
{
"y": -0.875,
"w": 1.5
},
"~\n`\n\n\nEsc",
"!\n1\n\n\nF1",
{
"x": 14.5
},
"+\n=\n\n\nF12",
{
"a": 7,
"w": 1.5
},
"Backspace\n\n\n\nBackspace"
],
[
{
"y": -0.375,
"x": 3.5
},
"E\n\n\n\n<i class=\"fa fa-caret-up\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"I"
],
[
{
"y": -0.8799999999999999,
"x": 2.5
},
"W"
],
[
{
"y": -0.9950000000000001,
"x": 4.5,
"a": 4
},
"R",
{
"x": 8.5,
"a": 7
},
"U",
{
"x": 1
},
"O"
],
[
{
"y": -0.875,
"x": 5.5
},
"T",
{
"h": 1.5
},
"<i class=\"fa fa-chevron-circle-left\" aria-hidden=\"true\"></i>",
{
"x": 4.5,
"h": 1.5
},
"<i class=\"fa fa-chevron-circle-right\" aria-hidden=\"true\"></i>",
"Y"
],
[
{
"y": -0.875,
"a": 6,
"w": 1.5
},
"Tab",
{
"a": 7
},
"Q",
{
"x": 14.5
},
"P",
{
"a": 4,
"w": 1.5
},
"|\n\\"
],
[
{
"y": -0.375,
"x": 3.5,
"a": 7
},
"D\n\n\n\n<i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"K"
],
[
{
"y": -0.875,
"x": 2.5
},
"S\n\n\n\n<i class=\"fa fa-caret-left\" aria-hidden=\"true\"></i>",
{
"x": 1
},
"F\n\n\n\n<i class=\"fa fa-caret-right\" aria-hidden=\"true\"></i>",
{
"x": 8.5
},
"J",
{
"x": 1
},
"L"
],
[
{
"y": -0.875,
"x": 5.5
},
"G",
{
"x": 6.5
},
"H"
],
[
{
"y": -0.875,
"a": 4,
"fa": [
0,
0,
0,
2
],
"w": 1.5
},
"\n\n\nCtrl\n\n\nCaps",
{
"a": 7
},
"A",
{
"x": 14.5,
"a": 4
},
":\n;",
{
"a": 7,
"w": 1.5
},
"Enter"
],
[
{
"y": -0.625,
"x": 6.5,
"h": 1.5
},
"PgUp",
{
"x": 4.5,
"h": 1.5
},
"PgDn"
],
[
{
"y": -0.75,
"x": 3.5
},
"C",
{
"x": 10.5,
"a": 4
},
"<\n,"
],
[
{
"y": -0.875,
"x": 2.5,
"a": 7
},
"X",
{
"x": 1
},
"V",
{
"x": 8.5
},
"M",
{
"x": 1,
"a": 4
},
">\n."
],
[
{
"y": -0.875,
"x": 5.5,
"a": 7
},
"B",
{
"x": 6.5
},
"N"
],
[
{
"y": -0.875,
"w": 1.5
},
"Shift",
"Z",
{
"x": 14.5,
"a": 4
},
"?\n/",
{
"w": 1.5
},
"\"\n'"
],
[
{
"y": -0.375,
"x": 3.5,
"a": 7
},
"Alt\n\n\n\n<i class=\"fa fa-hand-o-left\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-down'></i>"
],
[
{
"y": -0.875,
"x": 2.5
},
"<i class='fa fa-linux'></i>",
{
"x": 1
},
"Alt\n\n\n\n<i class=\"fa fa-hand-o-right\" aria-hidden=\"true\"></i>",
{
"x": 8.5
},
"<i class=\"fa fa-long-arrow-left\" aria-hidden=\"true\"></i>",
{
"x": 1
},
"<i class=\"fa fa-long-arrow-up\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-up'></i>"
],
[
{
"y": -0.75,
"x": 0.5
},
"Ctrl\n\n\n\n<i class='fa fa-download'></i>",
"Esc",
{
"x": 14.5
},
"<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-off'></i>",
"Fn"
],
[
{
"r": 30,
"rx": 6.5,
"ry": 4.25,
"y": -1,
"x": 1
},
"<i class=\"fa fa-clone\" aria-hidden=\"true\"></i>",
"("
],
[
{
"h": 2
},
"Space",
{
"h": 2
},
"Del",
"["
],
[
{
"x": 2
},
"{"
],
[
{
"r": -30,
"rx": 13,
"y": -1,
"x": -3
},
")",
"<i class=\"fa fa-paste\" aria-hidden=\"true\"></i>"
],
[
{
"x": -3
},
"]",
{
"h": 2
},
"Enter",
{
"h": 2
},
"<i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i>"
],
[
{
"x": -3
},
"}"
]
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -0,0 +1,140 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define FN1 1 // media layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BSpace |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | Fwd | | Back | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |Caps/Ctl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
* |--------+------+------+------+------+------| PgUp | | PgDn |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | ' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Ctrl | Esc | LGui | Alt | Alt | | Left | Up | Dn | Right| Fn |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Copy | ( | | ) | Paste|
* ,------|------+------| |------+------+------.
* | | | [ | | ] | | |
* |Space | Del |------| |------| Enter|BSpace|
* | | | { | | } | | |
* `--------------------' `--------------------'
*/
// 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_WBAK,
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,
KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, KC_LALT,
LCTL(KC_C), KC_LCBR,
KC_LPRN,
KC_SPC, KC_DEL, KC_LBRC,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_WFWD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
KC_UP, KC_LEFT, KC_RIGHT,KC_DOWN, TG(FN1),
KC_RCBR, LCTL(KC_V),
KC_RPRN,
KC_RBRC, KC_ENT, KC_BSPC
),
/* Keymap 1: Fn Keys, media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | BSpace |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Teensy| | | Lclk | Rclk | | |VolUp |VolDn | Mute | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------+------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// FN1 Layer
[FN1] = KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
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_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
RESET, KC_TRNS, KC_TRNS,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC,
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
),
};
const uint16_t PROGMEM fn_actions[] = {
};
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;
};
// 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_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,21 @@
# Beginner's keymap for Ergodox-EZ
Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get comfortable with the Ergodox-EZ, you may fork this keymap and customize it for your own needs or find a suitable one from the community contributed keymaps.
![Beginner's Keymap](keyboard-layout.png)
#### Pros
* Easier to switch between regular keyboards and Ergodox-EZ.
* Easy on beginners. It has everything you need for your day to day usage.
#### Cons
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md)
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
#### Notes
* Ideally number key [6] should have started from the right-hand side of the keyboard. Doing so breaks the familiar QWERTY layout.
* Quote key ['] should have been placed between [:] and [Enter]. Due to lack of key space, it is placed below [Enter].
* Double [Alt] keys are placed adjacent to each other for convenience.
* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users.
* Additional bracket keys are placed in the center of the keyboard for programmer's convenience.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,185 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_german.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
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | K | . | O | , | Y | L1 | | L1 | V | G | C | L | ß | Z |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | H | A | E | I | U |------| |------| D | T | R | N | S | F |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |X/Ctrl| Q | Ä | Ü | Ö | | | | B | P | W | M | J | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Enter |------| |------| Tab |RShift|
* | | | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// 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, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB),
KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U,
KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO),
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_ENT ,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(SYMB), DE_V, DE_G, DE_C, DE_L, DE_SS, DE_Z,
DE_D, DE_T, DE_R, DE_N, LT(MDIA, DE_S), GUI_T(KC_F),
MEH_T(KC_NO),KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_LALT, CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_TAB, KC_RSFT
),
/* 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
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
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_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
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;
};
// 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_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,7 @@
# Basic implementation for k.o,y variant of the adnw layout
adnw is a layout optimised for usage with german and english language
k.o,y is a variant of this layout
http://www.adnw.de/index.php?n=Main.SeitlicheNachbaranschl%C3%A4ge
The os must use the de_DE layout

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,238 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define UNIC 3 // unicode entry layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1! | 2@ | 3# | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | -_ | += | BkSp |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | { | | } | Y | U | I | O | P | |\ |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | Win | A | S | D | F | G |------| |------| H | J | K | L | :; | '" |
* |--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------|
* | LShift |Z/Alt | X | C | V | B | | | | N | M | , | . | Alt | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | COPY | PASTE| Left | Right| | Down | Up |Hyper | `~ | RCtrl |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* Hyper = Ctrl+Super+Alt+Shift | ~L3 | F5 | | F2 | ~L2 |
* ,------|------|------| |------+------+------.
* | | | PgUp | | Ins | | |
* | Enter| BkSp |------| |------| ~L1 |Space |
* | | | PgDn | | Del | | |
* `--------------------' `--------------------'
*/
// 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, ALT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_HOME,
KC_LCTRL, LCTL(KC_C), LCTL(KC_V), KC_LEFT,KC_RGHT,
KC_FN3, KC_F5,
KC_PGUP,
KC_ENT,KC_BSPC,KC_PGDN,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL,
KC_F2, KC_FN2,
KC_INS,
KC_DELT,KC_FN1, KC_SPC
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |PrintScr|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | £ | | | | | | . | 0 | = |Alt+F4|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* THERE! | | | | | |
* ,------|------|------| |------+------+------.
* CAD = Ctrl + Alt + Delete | | | | | | | |
* | | |------| |------| | |
* | | | | | CAD | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
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,M(3),KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
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, LALT(KC_F4),
KC_TRNS, KC_TRNS,
KC_TRNS,
LCTL(LALT(KC_DEL)), KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | TEENSY | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
RESET, 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_BTN1, KC_BTN2,
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_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, 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_WBAK
),
/* Keymap 3: Unicode Entry
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Alt | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | + | + | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Alt | | | E | | | | | | | 7 | 8 | 9 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Alt | A | | D | F | |------| |------| | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Alt | | | C | | B | | | | | 1 | 2 | 3 | + | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Alt | Alt | Alt | | | | 0 | 0 | 0 | + | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* WINDOWS ONLY SETUP!! | ~L3 | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | Alt | Alt |------| |------| Alt | Alt |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[UNIC] = KEYMAP( // layer 3 : Unicode Entry
// left hand
KC_LALT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6,
KC_LALT, KC_TRNS, KC_TRNS, KC_E, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LALT, KC_A, KC_TRNS, KC_D, KC_F, KC_TRNS,
KC_LALT, KC_TRNS, KC_TRNS, KC_C, KC_TRNS, KC_B, KC_TRNS,
KC_LALT, KC_LALT, KC_LALT, KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_LALT,KC_LALT, KC_TRNS,
// right hand
KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS,KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TRNS,
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS,
KC_P0, KC_P0, KC_P0, KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS,KC_LALT, KC_LALT
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media)
[3] = ACTION_LAYER_TAP_TOGGLE(UNIC) // FN3 - Momentary Layer 3 (Unicode entry)
};
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);
}
case 3: // this would trigger when you hit a key mapped as M(3)
if (record->event.pressed) {
return MACRO( I(255), D(LALT), T(P1), T(P5), T(P6), U(LALT), END );
}
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) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,179 @@
Englishman in New York
===========================
:microphone: :tea:
About
------
After using the massdrop configurator to get the basics, I wanted to add a
little extra to my ergodox. Notably the Hyper hotkey, the press and hold,
and a way to have my beloved £ :pound: symbol available<sup>[1](#unicode)</sup>. Why not switch to a GB
layout? Well the computers I use are US keymap'd and I can't always change
that. Plus I've got used to 2/@ and 3/# and moving to the ergodox was hard
enough. :sweat_smile:
I started from the default and edited from there as I needed. It's somewhat
similar to a regular layout, particularly R1 and shift/controls. I ended up
with a few keys that were blank, so I'm testing out some shortcuts. Alt+F4 for
quitting things in Windows, is one example, but I felt it was better placed on
the 1st layer - in case of fat fingers.
Layout
-------
![Layout](rl-layout.jpg "Isn't it lovely")
### Base Layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| ESC | 1! | 2@ | 3# | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | -_ | += | BkSp |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| Tab | Q | W | E | R | T | { | | } | Y | U | I | O | P | |\ |
|--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
| Win | A | S | D | F | G |------| |------| H | J | K | L | :; | '" |
|--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------|
| LShift |Z/Alt | X | C | V | B | | | | N | M | , | . | Alt | RShift |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|LCtrl | COPY | PASTE| Left | Right| | Down | Up |Hyper | `~ | RCtrl |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
Hyper = Ctrl+Super+Alt+Shift | ~L3 | F5 | | F2 | ~L2 |
,------|------|------| |------+------+------.
| | | PgUp | | Ins | | |
| Enter| BkSp |------| |------| ~L1 |Space |
| | | PgDn | | Del | | |
`--------------------' `--------------------'
```
### Symbol Layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |PrintScr|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | £ | | | | | | . | 0 | = |Alt+F4|
`----------------------------------' `----------------------------------'
↑ ,-------------. ,-------------.
THERE! | | | | | |
,------|------|------| |------+------+------.
CAD = Ctrl + Alt + Delete | | | | | | | |
| | |------| |------| | |
| | | | | CAD | | |
`--------------------' `--------------------'
```
### Media Layer
Not touched this, not used either.
```
,--------------------------------------------------. ,--------------------------------------------------.
| TEENSY | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | MsUp | | | | | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | | | | | | | Prev | Next | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+------+------.
| | | | | | |Brwser|
| | |------| |------| |Back |
| | | | | | | |
`--------------------' `--------------------'
```
### Unicode Layer
Used to enter/test unicode input on Windows. All numbers are numpad keys.
```
,--------------------------------------------------. ,--------------------------------------------------.
| Alt | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | + | + | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| Alt | | | E | | | | | | | 7 | 8 | 9 | + | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| Alt | A | | D | F | |------| |------| | 4 | 5 | 6 | + | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| Alt | | | C | | B | | | | | 1 | 2 | 3 | + | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| Alt | Alt | Alt | | | | 0 | 0 | 0 | + | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
WINDOWS ONLY SETUP!! | ~L3 | | | | |
,------|------|------| |------+------+------.
| | | | | | | |
| Alt | Alt |------| |------| Alt | Alt |
| | | | | | | |
`--------------------' `--------------------'
```
Usage
------
~L1 / L2 / L3 will momentarily switch to a layer if held and another key is pressed.
If pressed and released will remain on layer until pressed again.
### Unicode
This layout is for Windows only. To enter a character Press and Hold Alt, type + and hex code then release Alt.
Changelog
-----------
### [0.2.1] - 2016-04-05
* Changed £ to alt code in Windows. Windows sucks at unicode.
### [0.2.0] - 2016-03-27
* Added unicode layer
* Moved Copy/Paste to left hand side
* Switched Enter and Space (again)
* Added L3 (unicode layer) toggle
* Removed Press and Hold for Alt on right hand size (/)
* Swapped Volume Up/Down to match arrows
* Tried fixing £ macro
* Removed * in the matrix function things (upstream change)
### [0.1.1] - 2016-03-23
* Changed £ input to a macro
### [0.1.0] - 2016-03-22
After actually using the keyboard, I've made some changes:
* Swapped Enter and Space
* Moved backspace to thumb keys (top right still remains)
* Added Ctrl+Alt+Delete
* Added Teensy Reset on 2nd layer
* Switched Up and Down
* Changed copy/paste to be Ctrl+c and Ctrl+v as KC_COPY/PASTE didn't work (in Windows)
* Moved ~L2 to replace +L1 after learning how the function works (notes above)
* Hopefully fixed GBP symbol (unicode enabled in MakeFile)
### [0.0.1] - 2016-03-21
First version
Issues
-------
Space for feedback and notes for future improvements
----
<sup><a name="unicode">1</a></sup>: For Windows only, and you have to edit the [registry](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input).

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

View file

@ -0,0 +1 @@
/compiled.hex

View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -0,0 +1,26 @@
BOOTMAGIC_ENABLE=no
COMMAND_ENABLE=no
SLEEP_LED_ENABLE=no
UNICODE_ENABLE=no
FORCE_NKRO ?= yes
ifeq (${FORCE_NKRO},yes)
OPT_DEFS += -DFORCE_NKRO
endif
KEYMAP_VERSION = $(shell \
if [ -d "${KEYMAP_PATH}/.git" ]; then \
cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \
else echo QMK; fi)
KEYMAP_BRANCH = $(shell \
if [ -d "${KEYMAP_PATH}/.git" ]; then \
cd "${KEYMAP_PATH}"; \
fi; \
git rev-parse --abbrev-ref HEAD 2>/dev/null)
OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\"
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

Some files were not shown because too many files have changed in this diff Show more