Merged from upstream
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,30 @@
|
|||||||
|
#include "amjpad.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
matrix_init_user();
|
||||||
|
led_init_ports();
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
matrix_scan_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
// * Set our LED pins as output
|
||||||
|
DDRD |= (1<<6);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||||
|
// Turn numlock on
|
||||||
|
PORTD &= ~(1<<6);
|
||||||
|
} else {
|
||||||
|
// Turn numlock off
|
||||||
|
PORTD |= (1<<6);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
#ifndef AMJPAD_H
|
||||||
|
#define ADMJPAD_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
/* AMJPAD matrix layout
|
||||||
|
* ,-------------------.
|
||||||
|
* | 00 | 01 | 02 | 03 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 10 | 11 | 12 | 13 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 20 | 21 | 22 | |
|
||||||
|
* |----|----|----| 23 |
|
||||||
|
* | 30 | 31 | 32 | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 40 | 41 | 42 | |
|
||||||
|
* |----|----|----| 43 |
|
||||||
|
* | 50 | 52 | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
// 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, k23, \
|
||||||
|
k30, k31, k32, \
|
||||||
|
k40, k41, k42, k43, \
|
||||||
|
k50, k52 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03}, \
|
||||||
|
{k10, k11, k12, k13}, \
|
||||||
|
{k20, k21, k22, k23}, \
|
||||||
|
{k30, k31, k32, XXX}, \
|
||||||
|
{k40, k41, k42, k43}, \
|
||||||
|
{k50, XXX, k52, XXX} \
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void);
|
||||||
|
void matrix_scan_user(void);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
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 0x0003
|
||||||
|
#define MANUFACTURER AMJ
|
||||||
|
#define PRODUCT PAD
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for AMJ PAD
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 6
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5, D0 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, E6, C7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
|
||||||
|
/* 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 4
|
||||||
|
|
||||||
|
/* Underlight configuration
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 8 // 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
|
@ -0,0 +1,101 @@
|
|||||||
|
#include "amjpad.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 _______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |Esc |TAB |BS | = |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | NL | / | * | - |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 7 | 8 | 9 | |
|
||||||
|
* |----|----|----| + |
|
||||||
|
* | 4 | 5 | 6 | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 1 | 2 | 3 | |
|
||||||
|
* |----|----|----| En |
|
||||||
|
* | 0 |./FN| |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_BL] = KEYMAP(
|
||||||
|
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
|
||||||
|
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, LT(_FL,KC_PDOT)),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |Esc |TAB |BS | = |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | NL | / | * | - |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 7 | 8 | 9 | |
|
||||||
|
* |----|----|----|RST |
|
||||||
|
* | 4 | 5 | 6 | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 1 | 2 | 3 | |
|
||||||
|
* |----|----|----| En |
|
||||||
|
* | 0 |./FN| |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = KEYMAP(
|
||||||
|
|
||||||
|
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
KC_P7, KC_P8, KC_P9, RESET, \
|
||||||
|
KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_P0, LT(_FL,KC_PDOT)),
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
|
||||||
|
# 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 ?= no # 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
|
@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
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 Arbitrary Definitions
|
||||||
|
#define PRODUCT Planckeus
|
||||||
|
#define DESCRIPTION q.m.k. keyboard firmware for Planckeus
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 11
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||||
|
#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 }
|
||||||
|
#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
|
@ -0,0 +1,45 @@
|
|||||||
|
#include "atreus.h"
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define SYMB 1
|
||||||
|
#define ETC 2
|
||||||
|
|
||||||
|
enum macro_id {
|
||||||
|
TEENSY,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[BASE] = KEYMAP(
|
||||||
|
KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN,
|
||||||
|
LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H,
|
||||||
|
SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH),
|
||||||
|
KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT)
|
||||||
|
),
|
||||||
|
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS,
|
||||||
|
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
|
||||||
|
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO,
|
||||||
|
KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[ETC] = KEYMAP(
|
||||||
|
RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME,
|
||||||
|
LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS,
|
||||||
|
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
switch(id) {
|
||||||
|
case TEENSY:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1 @@
|
|||||||
|
#include "atreus62.h"
|
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef ATREUS62_H
|
||||||
|
#define ATREUS62_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
// 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, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
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 0x6062
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Profet
|
||||||
|
#define PRODUCT Atreus62
|
||||||
|
#define DESCRIPTION q.m.k. keyboard firmware for Atreus62
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 13
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6 }
|
||||||
|
|
||||||
|
#define CATERINA_BOOTLOADER
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* 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
|
@ -0,0 +1,71 @@
|
|||||||
|
// 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 "atreus62.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 _DEFAULT 0
|
||||||
|
#define _NAV 1
|
||||||
|
#define _RESET 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_DEFAULT] = { /* qwerty */
|
||||||
|
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
|
||||||
|
{ KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC },
|
||||||
|
{ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
|
||||||
|
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC },
|
||||||
|
{ KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI }
|
||||||
|
},
|
||||||
|
|
||||||
|
[_NAV] = {
|
||||||
|
{ TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS },
|
||||||
|
{ TO(_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 },
|
||||||
|
{ 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] = {
|
||||||
|
{ TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
|
||||||
|
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
|
||||||
|
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
|
||||||
|
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
|
||||||
|
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
[_TRNS] = {
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
|
||||||
|
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,362 @@
|
|||||||
|
/*
|
||||||
|
pins_arduino.h - Pin definition functions for Arduino
|
||||||
|
Part of Arduino - http://www.arduino.cc/
|
||||||
|
|
||||||
|
Copyright (c) 2007 David A. Mellis
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General
|
||||||
|
Public License along with this library; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
|
Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
|
// Workaround for wrong definitions in "iom32u4.h".
|
||||||
|
// This should be fixed in the AVR toolchain.
|
||||||
|
#undef UHCON
|
||||||
|
#undef UHINT
|
||||||
|
#undef UHIEN
|
||||||
|
#undef UHADDR
|
||||||
|
#undef UHFNUM
|
||||||
|
#undef UHFNUML
|
||||||
|
#undef UHFNUMH
|
||||||
|
#undef UHFLEN
|
||||||
|
#undef UPINRQX
|
||||||
|
#undef UPINTX
|
||||||
|
#undef UPNUM
|
||||||
|
#undef UPRST
|
||||||
|
#undef UPCONX
|
||||||
|
#undef UPCFG0X
|
||||||
|
#undef UPCFG1X
|
||||||
|
#undef UPSTAX
|
||||||
|
#undef UPCFG2X
|
||||||
|
#undef UPIENX
|
||||||
|
#undef UPDATX
|
||||||
|
#undef TCCR2A
|
||||||
|
#undef WGM20
|
||||||
|
#undef WGM21
|
||||||
|
#undef COM2B0
|
||||||
|
#undef COM2B1
|
||||||
|
#undef COM2A0
|
||||||
|
#undef COM2A1
|
||||||
|
#undef TCCR2B
|
||||||
|
#undef CS20
|
||||||
|
#undef CS21
|
||||||
|
#undef CS22
|
||||||
|
#undef WGM22
|
||||||
|
#undef FOC2B
|
||||||
|
#undef FOC2A
|
||||||
|
#undef TCNT2
|
||||||
|
#undef TCNT2_0
|
||||||
|
#undef TCNT2_1
|
||||||
|
#undef TCNT2_2
|
||||||
|
#undef TCNT2_3
|
||||||
|
#undef TCNT2_4
|
||||||
|
#undef TCNT2_5
|
||||||
|
#undef TCNT2_6
|
||||||
|
#undef TCNT2_7
|
||||||
|
#undef OCR2A
|
||||||
|
#undef OCR2_0
|
||||||
|
#undef OCR2_1
|
||||||
|
#undef OCR2_2
|
||||||
|
#undef OCR2_3
|
||||||
|
#undef OCR2_4
|
||||||
|
#undef OCR2_5
|
||||||
|
#undef OCR2_6
|
||||||
|
#undef OCR2_7
|
||||||
|
#undef OCR2B
|
||||||
|
#undef OCR2_0
|
||||||
|
#undef OCR2_1
|
||||||
|
#undef OCR2_2
|
||||||
|
#undef OCR2_3
|
||||||
|
#undef OCR2_4
|
||||||
|
#undef OCR2_5
|
||||||
|
#undef OCR2_6
|
||||||
|
#undef OCR2_7
|
||||||
|
|
||||||
|
#define NUM_DIGITAL_PINS 30
|
||||||
|
#define NUM_ANALOG_INPUTS 12
|
||||||
|
|
||||||
|
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
|
||||||
|
#define TXLED0 PORTD |= (1<<5)
|
||||||
|
#define TXLED1 PORTD &= ~(1<<5)
|
||||||
|
#define RXLED0 PORTB |= (1<<0)
|
||||||
|
#define RXLED1 PORTB &= ~(1<<0)
|
||||||
|
|
||||||
|
static const uint8_t SDA = 2;
|
||||||
|
static const uint8_t SCL = 3;
|
||||||
|
#define LED_BUILTIN 13
|
||||||
|
|
||||||
|
// Map SPI port to 'new' pins D14..D17
|
||||||
|
static const uint8_t SS = 17;
|
||||||
|
static const uint8_t MOSI = 16;
|
||||||
|
static const uint8_t MISO = 14;
|
||||||
|
static const uint8_t SCK = 15;
|
||||||
|
|
||||||
|
// Mapping of analog pins as digital I/O
|
||||||
|
// A6-A11 share with digital pins
|
||||||
|
static const uint8_t ADC0 = 18;
|
||||||
|
static const uint8_t ADC1 = 19;
|
||||||
|
static const uint8_t ADC2 = 20;
|
||||||
|
static const uint8_t ADC3 = 21;
|
||||||
|
static const uint8_t ADC4 = 22;
|
||||||
|
static const uint8_t ADC5 = 23;
|
||||||
|
static const uint8_t ADC6 = 24; // D4
|
||||||
|
static const uint8_t ADC7 = 25; // D6
|
||||||
|
static const uint8_t ADC8 = 26; // D8
|
||||||
|
static const uint8_t ADC9 = 27; // D9
|
||||||
|
static const uint8_t ADC10 = 28; // D10
|
||||||
|
static const uint8_t ADC11 = 29; // D12
|
||||||
|
|
||||||
|
#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
|
||||||
|
#define digitalPinToPCICRbit(p) 0
|
||||||
|
#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
|
||||||
|
#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
|
||||||
|
|
||||||
|
// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
|
||||||
|
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
|
||||||
|
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
|
||||||
|
|
||||||
|
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
|
||||||
|
|
||||||
|
#ifdef ARDUINO_MAIN
|
||||||
|
|
||||||
|
// On the Arduino board, digital pins are also used
|
||||||
|
// for the analog output (software PWM). Analog input
|
||||||
|
// pins are a separate set.
|
||||||
|
|
||||||
|
// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
|
||||||
|
//
|
||||||
|
// D0 PD2 RXD1/INT2
|
||||||
|
// D1 PD3 TXD1/INT3
|
||||||
|
// D2 PD1 SDA SDA/INT1
|
||||||
|
// D3# PD0 PWM8/SCL OC0B/SCL/INT0
|
||||||
|
// D4 A6 PD4 ADC8
|
||||||
|
// D5# PC6 ??? OC3A/#OC4A
|
||||||
|
// D6# A7 PD7 FastPWM #OC4D/ADC10
|
||||||
|
// D7 PE6 INT6/AIN0
|
||||||
|
//
|
||||||
|
// D8 A8 PB4 ADC11/PCINT4
|
||||||
|
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
|
||||||
|
// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
|
||||||
|
// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
|
||||||
|
// D12 A11 PD6 T1/#OC4D/ADC9
|
||||||
|
// D13# PC7 PWM10 CLK0/OC4A
|
||||||
|
//
|
||||||
|
// A0 D18 PF7 ADC7
|
||||||
|
// A1 D19 PF6 ADC6
|
||||||
|
// A2 D20 PF5 ADC5
|
||||||
|
// A3 D21 PF4 ADC4
|
||||||
|
// A4 D22 PF1 ADC1
|
||||||
|
// A5 D23 PF0 ADC0
|
||||||
|
//
|
||||||
|
// New pins D14..D17 to map SPI port to digital pins
|
||||||
|
//
|
||||||
|
// MISO D14 PB3 MISO,PCINT3
|
||||||
|
// SCK D15 PB1 SCK,PCINT1
|
||||||
|
// MOSI D16 PB2 MOSI,PCINT2
|
||||||
|
// SS D17 PB0 RXLED,SS/PCINT0
|
||||||
|
//
|
||||||
|
// Connected LEDs on board for TX and RX
|
||||||
|
// TXLED D24 PD5 XCK1
|
||||||
|
// RXLED D17 PB0
|
||||||
|
// HWB PE2 HWB
|
||||||
|
|
||||||
|
// these arrays map port names (e.g. port B) to the
|
||||||
|
// appropriate addresses for various functions (e.g. reading
|
||||||
|
// and writing)
|
||||||
|
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
||||||
|
NOT_A_PORT,
|
||||||
|
NOT_A_PORT,
|
||||||
|
(uint16_t) &DDRB,
|
||||||
|
(uint16_t) &DDRC,
|
||||||
|
(uint16_t) &DDRD,
|
||||||
|
(uint16_t) &DDRE,
|
||||||
|
(uint16_t) &DDRF,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM port_to_output_PGM[] = {
|
||||||
|
NOT_A_PORT,
|
||||||
|
NOT_A_PORT,
|
||||||
|
(uint16_t) &PORTB,
|
||||||
|
(uint16_t) &PORTC,
|
||||||
|
(uint16_t) &PORTD,
|
||||||
|
(uint16_t) &PORTE,
|
||||||
|
(uint16_t) &PORTF,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM port_to_input_PGM[] = {
|
||||||
|
NOT_A_PORT,
|
||||||
|
NOT_A_PORT,
|
||||||
|
(uint16_t) &PINB,
|
||||||
|
(uint16_t) &PINC,
|
||||||
|
(uint16_t) &PIND,
|
||||||
|
(uint16_t) &PINE,
|
||||||
|
(uint16_t) &PINF,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||||
|
PD, // D0 - PD2
|
||||||
|
PD, // D1 - PD3
|
||||||
|
PD, // D2 - PD1
|
||||||
|
PD, // D3 - PD0
|
||||||
|
PD, // D4 - PD4
|
||||||
|
PC, // D5 - PC6
|
||||||
|
PD, // D6 - PD7
|
||||||
|
PE, // D7 - PE6
|
||||||
|
|
||||||
|
PB, // D8 - PB4
|
||||||
|
PB, // D9 - PB5
|
||||||
|
PB, // D10 - PB6
|
||||||
|
PB, // D11 - PB7
|
||||||
|
PD, // D12 - PD6
|
||||||
|
PC, // D13 - PC7
|
||||||
|
|
||||||
|
PB, // D14 - MISO - PB3
|
||||||
|
PB, // D15 - SCK - PB1
|
||||||
|
PB, // D16 - MOSI - PB2
|
||||||
|
PB, // D17 - SS - PB0
|
||||||
|
|
||||||
|
PF, // D18 - A0 - PF7
|
||||||
|
PF, // D19 - A1 - PF6
|
||||||
|
PF, // D20 - A2 - PF5
|
||||||
|
PF, // D21 - A3 - PF4
|
||||||
|
PF, // D22 - A4 - PF1
|
||||||
|
PF, // D23 - A5 - PF0
|
||||||
|
|
||||||
|
PD, // D24 - PD5
|
||||||
|
PD, // D25 / D6 - A7 - PD7
|
||||||
|
PB, // D26 / D8 - A8 - PB4
|
||||||
|
PB, // D27 / D9 - A9 - PB5
|
||||||
|
PB, // D28 / D10 - A10 - PB6
|
||||||
|
PD, // D29 / D12 - A11 - PD6
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
|
||||||
|
_BV(2), // D0 - PD2
|
||||||
|
_BV(3), // D1 - PD3
|
||||||
|
_BV(1), // D2 - PD1
|
||||||
|
_BV(0), // D3 - PD0
|
||||||
|
_BV(4), // D4 - PD4
|
||||||
|
_BV(6), // D5 - PC6
|
||||||
|
_BV(7), // D6 - PD7
|
||||||
|
_BV(6), // D7 - PE6
|
||||||
|
|
||||||
|
_BV(4), // D8 - PB4
|
||||||
|
_BV(5), // D9 - PB5
|
||||||
|
_BV(6), // D10 - PB6
|
||||||
|
_BV(7), // D11 - PB7
|
||||||
|
_BV(6), // D12 - PD6
|
||||||
|
_BV(7), // D13 - PC7
|
||||||
|
|
||||||
|
_BV(3), // D14 - MISO - PB3
|
||||||
|
_BV(1), // D15 - SCK - PB1
|
||||||
|
_BV(2), // D16 - MOSI - PB2
|
||||||
|
_BV(0), // D17 - SS - PB0
|
||||||
|
|
||||||
|
_BV(7), // D18 - A0 - PF7
|
||||||
|
_BV(6), // D19 - A1 - PF6
|
||||||
|
_BV(5), // D20 - A2 - PF5
|
||||||
|
_BV(4), // D21 - A3 - PF4
|
||||||
|
_BV(1), // D22 - A4 - PF1
|
||||||
|
_BV(0), // D23 - A5 - PF0
|
||||||
|
|
||||||
|
_BV(5), // D24 - PD5
|
||||||
|
_BV(7), // D25 / D6 - A7 - PD7
|
||||||
|
_BV(4), // D26 / D8 - A8 - PB4
|
||||||
|
_BV(5), // D27 / D9 - A9 - PB5
|
||||||
|
_BV(6), // D28 / D10 - A10 - PB6
|
||||||
|
_BV(6), // D29 / D12 - A11 - PD6
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
TIMER0B, /* 3 */
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
TIMER3A, /* 5 */
|
||||||
|
TIMER4D, /* 6 */
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
TIMER1A, /* 9 */
|
||||||
|
TIMER1B, /* 10 */
|
||||||
|
TIMER0A, /* 11 */
|
||||||
|
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
TIMER4A, /* 13 */
|
||||||
|
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
||||||
|
7, // A0 PF7 ADC7
|
||||||
|
6, // A1 PF6 ADC6
|
||||||
|
5, // A2 PF5 ADC5
|
||||||
|
4, // A3 PF4 ADC4
|
||||||
|
1, // A4 PF1 ADC1
|
||||||
|
0, // A5 PF0 ADC0
|
||||||
|
8, // A6 D4 PD4 ADC8
|
||||||
|
10, // A7 D6 PD7 ADC10
|
||||||
|
11, // A8 D8 PB4 ADC11
|
||||||
|
12, // A9 D9 PB5 ADC12
|
||||||
|
13, // A10 D10 PB6 ADC13
|
||||||
|
9 // A11 D12 PD6 ADC9
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ARDUINO_MAIN */
|
||||||
|
|
||||||
|
// These serial port names are intended to allow libraries and architecture-neutral
|
||||||
|
// sketches to automatically default to the correct port name for a particular type
|
||||||
|
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
||||||
|
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
||||||
|
//
|
||||||
|
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
||||||
|
// pins are NOT connected to anything by default.
|
||||||
|
#define SERIAL_PORT_MONITOR Serial
|
||||||
|
#define SERIAL_PORT_USBVIRTUAL Serial
|
||||||
|
#define SERIAL_PORT_HARDWARE Serial1
|
||||||
|
#define SERIAL_PORT_HARDWARE_OPEN Serial1
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
@ -0,0 +1,10 @@
|
|||||||
|
atreus62 keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
This firmware is for the atreus62 keyboard.
|
||||||
|
|
||||||
|
This version utilizes a Pro Micro for its controller and has a 62 key layout.
|
||||||
|
|
||||||
|
https://github.com/profet23/atreus62
|
||||||
|
|
||||||
|
TODO: More information
|
@ -0,0 +1,66 @@
|
|||||||
|
|
||||||
|
# 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 ?= yes # 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 ?= no # Enable keyboard backlight functionality
|
||||||
|
#MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= yes # Unicode
|
||||||
|
#BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1 @@
|
|||||||
|
#include "converter.h"
|
@ -0,0 +1 @@
|
|||||||
|
#include "quantum.h"
|
@ -0,0 +1,40 @@
|
|||||||
|
Keyboard converter for IBM terminal keyboard
|
||||||
|
============================================
|
||||||
|
|
||||||
|
This is a port of TMK's converter/terminal_usb to QMK.
|
||||||
|
|
||||||
|
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
|
||||||
|
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
|
||||||
|
|
||||||
|
Source code: https://github.com/tmk/tmk_keyboard
|
||||||
|
Article: http://geekhack.org/index.php?topic=27272.0
|
||||||
|
|
||||||
|
|
||||||
|
CONNECTION
|
||||||
|
----------
|
||||||
|
Keyboard ATMega32U4
|
||||||
|
----------------------
|
||||||
|
Data: PD2
|
||||||
|
Clock: PD5
|
||||||
|
|
||||||
|
And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
|
||||||
|
|
||||||
|
|
||||||
|
BUILD
|
||||||
|
-----
|
||||||
|
$ git clone https://github.com/tmk/tmk_keyboard.git
|
||||||
|
$ cd converter/terminal_usb
|
||||||
|
$ make
|
||||||
|
|
||||||
|
|
||||||
|
RESOURCE
|
||||||
|
--------
|
||||||
|
Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
|
||||||
|
102keys(1392595): http://geekhack.org/index.php?topic=10737.0
|
||||||
|
122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
|
||||||
|
KbdBabel: http://www.kbdbabel.org/
|
||||||
|
RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
|
||||||
|
DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
|
||||||
|
WinAVR: http://winavr.sourceforge.net/
|
||||||
|
|
||||||
|
EOF
|
@ -0,0 +1,138 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.net>
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6535
|
||||||
|
#define DEVICE_VER 0x0100
|
||||||
|
#define MANUFACTURER QMK
|
||||||
|
#define PRODUCT IBM Terminal Keyboard
|
||||||
|
#define DESCRIPTION USB converter for IBM Terminal Keyboard
|
||||||
|
|
||||||
|
|
||||||
|
/* matrix size */
|
||||||
|
#define MATRIX_ROWS 17 // keycode bit: 3-0
|
||||||
|
#define MATRIX_COLS 8 // keycode bit: 6-4
|
||||||
|
|
||||||
|
|
||||||
|
/* legacy keymap support */
|
||||||
|
#define USE_LEGACY_KEYMAP
|
||||||
|
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PS/2 USART configuration for ATMega32U4
|
||||||
|
*/
|
||||||
|
#ifdef PS2_USE_USART
|
||||||
|
/* XCK for clock line */
|
||||||
|
#define PS2_CLOCK_PORT PORTD
|
||||||
|
#define PS2_CLOCK_PIN PIND
|
||||||
|
#define PS2_CLOCK_DDR DDRD
|
||||||
|
#define PS2_CLOCK_BIT 5
|
||||||
|
/* RXD for data line */
|
||||||
|
#define PS2_DATA_PORT PORTD
|
||||||
|
#define PS2_DATA_PIN PIND
|
||||||
|
#define PS2_DATA_DDR DDRD
|
||||||
|
#define PS2_DATA_BIT 2
|
||||||
|
|
||||||
|
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
|
||||||
|
/* set DDR of CLOCK as input to be slave */
|
||||||
|
#define PS2_USART_INIT() do { \
|
||||||
|
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
|
||||||
|
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
|
||||||
|
UCSR1C = ((1 << UMSEL10) | \
|
||||||
|
(3 << UPM10) | \
|
||||||
|
(0 << USBS1) | \
|
||||||
|
(3 << UCSZ10) | \
|
||||||
|
(0 << UCPOL1)); \
|
||||||
|
UCSR1A = 0; \
|
||||||
|
UBRR1H = 0; \
|
||||||
|
UBRR1L = 0; \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_INT_ON() do { \
|
||||||
|
UCSR1B = ((1 << RXCIE1) | \
|
||||||
|
(1 << RXEN1)); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_POLL_ON() do { \
|
||||||
|
UCSR1B = (1 << RXEN1); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_OFF() do { \
|
||||||
|
UCSR1C = 0; \
|
||||||
|
UCSR1B &= ~((1 << RXEN1) | \
|
||||||
|
(1 << TXEN1)); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
|
||||||
|
#define PS2_USART_RX_DATA UDR1
|
||||||
|
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
||||||
|
#define PS2_USART_RX_VECT USART1_RX_vect
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PS/2 Interrupt configuration
|
||||||
|
*/
|
||||||
|
#ifdef PS2_USE_INT
|
||||||
|
/* uses INT1 for clock line(ATMega32U4) */
|
||||||
|
#define PS2_CLOCK_PORT PORTD
|
||||||
|
#define PS2_CLOCK_PIN PIND
|
||||||
|
#define PS2_CLOCK_DDR DDRD
|
||||||
|
#define PS2_CLOCK_BIT 1
|
||||||
|
|
||||||
|
#define PS2_DATA_PORT PORTD
|
||||||
|
#define PS2_DATA_PIN PIND
|
||||||
|
#define PS2_DATA_DDR DDRD
|
||||||
|
#define PS2_DATA_BIT 0
|
||||||
|
|
||||||
|
#define PS2_INT_INIT() do { \
|
||||||
|
EICRA |= ((1<<ISC11) | \
|
||||||
|
(0<<ISC10)); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_INT_ON() do { \
|
||||||
|
EIMSK |= (1<<INT1); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_INT_OFF() do { \
|
||||||
|
EIMSK &= ~(1<<INT1); \
|
||||||
|
} while (0)
|
||||||
|
#define PS2_INT_VECT INT1_vect
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PS/2 Busywait configuration
|
||||||
|
*/
|
||||||
|
#ifdef PS2_USE_BUSYWAIT
|
||||||
|
#define PS2_CLOCK_PORT PORTD
|
||||||
|
#define PS2_CLOCK_PIN PIND
|
||||||
|
#define PS2_CLOCK_DDR DDRD
|
||||||
|
#define PS2_CLOCK_BIT 1
|
||||||
|
|
||||||
|
#define PS2_DATA_PORT PORTD
|
||||||
|
#define PS2_DATA_PIN PIND
|
||||||
|
#define PS2_DATA_DDR DDRD
|
||||||
|
#define PS2_DATA_BIT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,6 @@
|
|||||||
|
#include "ibm_terminal.h"
|
||||||
|
|
||||||
|
// void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// matrix_init_user();
|
||||||
|
// }
|
@ -0,0 +1,82 @@
|
|||||||
|
#ifndef IBM_TERMINAL_H
|
||||||
|
#define IBM_TERMINAL_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
void matrix_init_user(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IBM Terminal keyboard 6110345(122keys)/1392595(102keys)
|
||||||
|
* http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M
|
||||||
|
* http://www.seasip.info/VintagePC/ibm_1391406.html
|
||||||
|
*
|
||||||
|
* Keymap array:
|
||||||
|
* 8 bytes
|
||||||
|
* +---------+
|
||||||
|
* 0| |
|
||||||
|
* :| | 0x00-0x87
|
||||||
|
* ;| |
|
||||||
|
* 17| |
|
||||||
|
* +---------+
|
||||||
|
*/
|
||||||
|
#define KEYMAP( \
|
||||||
|
K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \
|
||||||
|
K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \
|
||||||
|
\
|
||||||
|
K05,K06, K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66, K67,K6E,K6F, K76,K77,K7E,K84, \
|
||||||
|
K04,K0C, K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, K5C, K64,K65,K6D, K6C,K75,K7D,K7C, \
|
||||||
|
K03,K0B, K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K53,K5A, K63, K6B,K73,K74,K7B, \
|
||||||
|
K83,K0A, K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K51,K59, K61,K62,K6A, K69,K72,K7A,K79, \
|
||||||
|
K01,K09, K11, K19, K29, K39, K58, K60, K68,K70,K71,K78 \
|
||||||
|
) { \
|
||||||
|
{ KC_NO, K01, KC_NO, 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, K1E, K1F }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
|
||||||
|
{ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
|
||||||
|
{ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
|
||||||
|
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
|
||||||
|
{ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||||
|
{ K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
|
||||||
|
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||||
|
{ K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO,}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IBM Terminal keyboard 1399625, 101-key
|
||||||
|
*/
|
||||||
|
#define KEYMAP_101( \
|
||||||
|
K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \
|
||||||
|
\
|
||||||
|
K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \
|
||||||
|
K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C, K64,K65,K6D, K6C,K75,K7D, \
|
||||||
|
K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K7C, \
|
||||||
|
K12, K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, K63, K69,K72,K7A, \
|
||||||
|
K11, K19, K29, K39, K58, K61,K60,K6A, K70, K71,K79 \
|
||||||
|
) { \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K07 }, \
|
||||||
|
{ K08, KC_NO, KC_NO, KC_NO, KC_NO, K0D, K0E, K0F }, \
|
||||||
|
{ KC_NO, K11, K12, KC_NO, K14, K15, K16, K17 }, \
|
||||||
|
{ KC_NO, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||||
|
{ KC_NO, K21, K22, K23, K24, K25, K26, K27 }, \
|
||||||
|
{ KC_NO, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
|
||||||
|
{ KC_NO, K31, K32, K33, K34, K35, K36, K37 }, \
|
||||||
|
{ KC_NO, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
|
||||||
|
{ KC_NO, K41, K42, K43, K44, K45, K46, K47 }, \
|
||||||
|
{ KC_NO, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
{ KC_NO, KC_NO, K52, KC_NO, K54, K55, K56, K57 }, \
|
||||||
|
{ K58, K59, K5A, K5B, K5C, KC_NO, K5E, K5F }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||||
|
{ KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
|
||||||
|
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||||
|
{ KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO,}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,27 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
UNICODEMAP_ENABLE ?= yes
|
||||||
|
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.
|
||||||
|
PS2_USE_USART ?= yes
|
||||||
|
API_SYSEX_ENABLE ?= no
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../../Makefile
|
||||||
|
endif
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
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 <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "keycode.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "ibm_terminal.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// Layer 0
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
|
||||||
|
KC_PSCR,KC_ESC, 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_NO, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||||
|
KC_SLCK,KC_INT4, 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_NO, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_PAUS,KC_INT5, 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_BSLS,KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM,
|
||||||
|
KC_APP, KC_INT6, KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_LEFT,KC_INT2,KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_RGUI,KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_GRV, KC_DOWN, KC_NO, KC_P0, KC_PDOT,KC_NO
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 101-key keymaps
|
||||||
|
*/
|
||||||
|
/* 0: default
|
||||||
|
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||||
|
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
|
||||||
|
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||||
|
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
|
||||||
|
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
|
||||||
|
* |-----------------------------------------------------------| `-----------' |-----------| +|
|
||||||
|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
|
||||||
|
* |-----------------------------------------------------------| ,---. |---------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
|
||||||
|
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
|
||||||
|
* |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| |
|
||||||
|
* `----' `---------------------------------------' `----' `-----------' `---------------'
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
KEYMAP_101(
|
||||||
|
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_PSCR,KC_SLCK, KC_BRK,
|
||||||
|
|
||||||
|
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_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||||
|
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_END,KC_PGDN, KC_P7, KC_P8, KC_P9,
|
||||||
|
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_P4, KC_P5, KC_P6,KC_PPLS,
|
||||||
|
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_UP, KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT,KC_PENT
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
};
|
@ -0,0 +1,27 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
UNICODEMAP_ENABLE ?= yes
|
||||||
|
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.
|
||||||
|
PS2_USE_USART ?= yes
|
||||||
|
API_SYSEX_ENABLE ?= no
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../../Makefile
|
||||||
|
endif
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,312 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.net>
|
||||||
|
|
||||||
|
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 "keycode.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "ibm_terminal.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
// Fillers to make layering clearer
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
QWE, // qwerty
|
||||||
|
COL, // colemak
|
||||||
|
WOR, // workman
|
||||||
|
DVO, // dvorak
|
||||||
|
|
||||||
|
MOU, // mouse keys
|
||||||
|
EMO, // emoji
|
||||||
|
SYS, // system
|
||||||
|
};
|
||||||
|
|
||||||
|
enum keycodes {
|
||||||
|
// default layout switcher
|
||||||
|
LAY_QWE = SAFE_RANGE,
|
||||||
|
LAY_COL,
|
||||||
|
LAY_WOR,
|
||||||
|
LAY_DVO,
|
||||||
|
|
||||||
|
// layer switchers
|
||||||
|
LYR_SYS,
|
||||||
|
LYR_EMO,
|
||||||
|
|
||||||
|
// os switchers
|
||||||
|
OS_LIN,
|
||||||
|
OS_WIN,
|
||||||
|
OS_MAC,
|
||||||
|
};
|
||||||
|
|
||||||
|
// unicode map
|
||||||
|
|
||||||
|
enum unicode_name {
|
||||||
|
GRIN, // grinning face 😊
|
||||||
|
TJOY, // tears of joy 😂
|
||||||
|
SMILE, // grining face with smiling eyes 😁
|
||||||
|
HEART, // heart ❤
|
||||||
|
EYERT, // smiling face with heart shaped eyes 😍
|
||||||
|
CRY, // crying face 😭
|
||||||
|
SMEYE, // smiling face with smiling eyes 😊
|
||||||
|
UNAMU, // unamused 😒
|
||||||
|
KISS, // kiss 😘
|
||||||
|
HART2, // two hearts 💕
|
||||||
|
WEARY, // weary 😩
|
||||||
|
OKHND, // ok hand sign 👌
|
||||||
|
PENSV, // pensive 😔
|
||||||
|
SMIRK, // smirk 😏
|
||||||
|
RECYC, // recycle ♻
|
||||||
|
WINK, // wink 😉
|
||||||
|
THMUP, // thumb up 👍
|
||||||
|
THMDN, // thumb down 👎
|
||||||
|
PRAY, // pray 🙏
|
||||||
|
PHEW, // relieved 😌
|
||||||
|
MUSIC, // musical notes
|
||||||
|
FLUSH, // flushed 😳
|
||||||
|
CELEB, // celebration 🙌
|
||||||
|
CRY2, // crying face 😢
|
||||||
|
COOL, // smile with sunglasses 😎
|
||||||
|
NOEVS, // see no evil
|
||||||
|
NOEVH, // hear no evil
|
||||||
|
NOEVK, // speak no evil
|
||||||
|
POO, // pile of poo
|
||||||
|
EYES, // eyes
|
||||||
|
VIC, // victory hand
|
||||||
|
BHART, // broken heart
|
||||||
|
SLEEP, // sleeping face
|
||||||
|
SMIL2, // smiling face with open mouth & sweat
|
||||||
|
HUNRD, // 100
|
||||||
|
CONFU, // confused
|
||||||
|
TONGU, // face with tongue & winking eye
|
||||||
|
DISAP, // disappointed
|
||||||
|
YUMMY, // face savoring delicious food
|
||||||
|
CLAP, // hand clapping
|
||||||
|
FEAR, // face screaming in fear
|
||||||
|
HORNS, // smiling face with horns
|
||||||
|
HALO, // smiling face with halo
|
||||||
|
BYE, // waving hand
|
||||||
|
SUN, // sun
|
||||||
|
MOON, // moon
|
||||||
|
SKULL, // skull
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[GRIN] = 0x1F600,
|
||||||
|
[TJOY] = 0x1F602,
|
||||||
|
[SMILE] = 0x1F601,
|
||||||
|
[HEART] = 0x2764,
|
||||||
|
[EYERT] = 0x1f60d,
|
||||||
|
[CRY] = 0x1f62d,
|
||||||
|
[SMEYE] = 0x1F60A,
|
||||||
|
[UNAMU] = 0x1F612,
|
||||||
|
[KISS] = 0x1F618,
|
||||||
|
[HART2] = 0x1F495,
|
||||||
|
[WEARY] = 0x1F629,
|
||||||
|
[OKHND] = 0x1F44C,
|
||||||
|
[PENSV] = 0x1F614,
|
||||||
|
[SMIRK] = 0x1F60F,
|
||||||
|
[RECYC] = 0x267B,
|
||||||
|
[WINK] = 0x1F609,
|
||||||
|
[THMUP] = 0x1F44D,
|
||||||
|
[THMDN] = 0x1F44E,
|
||||||
|
[PRAY] = 0x1F64F,
|
||||||
|
[PHEW] = 0x1F60C,
|
||||||
|
[MUSIC] = 0x1F3B6,
|
||||||
|
[FLUSH] = 0x1F633,
|
||||||
|
[CELEB] = 0x1F64C,
|
||||||
|
[CRY2] = 0x1F622,
|
||||||
|
[COOL] = 0x1F60E,
|
||||||
|
[NOEVS] = 0x1F648,
|
||||||
|
[NOEVH] = 0x1F649,
|
||||||
|
[NOEVK] = 0x1F64A,
|
||||||
|
[POO] = 0x1F4A9,
|
||||||
|
[EYES] = 0x1F440,
|
||||||
|
[VIC] = 0x270C,
|
||||||
|
[BHART] = 0x1F494,
|
||||||
|
[SLEEP] = 0x1F634,
|
||||||
|
[SMIL2] = 0x1F605,
|
||||||
|
[HUNRD] = 0x1F4AF,
|
||||||
|
[CONFU] = 0x1F615,
|
||||||
|
[TONGU] = 0x1F61C,
|
||||||
|
[DISAP] = 0x1F61E,
|
||||||
|
[YUMMY] = 0x1F60B,
|
||||||
|
[CLAP] = 0x1F44F,
|
||||||
|
[FEAR] = 0x1F631,
|
||||||
|
[HORNS] = 0x1F608,
|
||||||
|
[HALO] = 0x1F607,
|
||||||
|
[BYE] = 0x1F44B,
|
||||||
|
[SUN] = 0x2600,
|
||||||
|
[MOON] = 0x1F314,
|
||||||
|
[SKULL] = 0x1F480,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* qwerty */
|
||||||
|
[QWE] = KEYMAP(
|
||||||
|
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
|
||||||
|
MO(EMO), MO(SYS), 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, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_MNXT, KC_VOLU, 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, XXXXXXX, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_MPLY, KC_MUTE, 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_BSLS, KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM,
|
||||||
|
KC_MPRV, KC_VOLD, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_LEFT, TG(MOU), KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_LGUI, KC_APP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* colemak */
|
||||||
|
[COL] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, 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_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* workman */
|
||||||
|
[WOR] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* dvorak */
|
||||||
|
[DVO] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, 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_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* system */
|
||||||
|
[SYS] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, LAY_QWE, OS_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, LAY_DVO, _______, _______, _______, _______, LAY_WOR, OS_LIN, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, LAY_COL, _______, _______, _______, OS_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* mouse keys */
|
||||||
|
[MOU] = KEYMAP(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, KC_BTN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, KC_BTN5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, _______, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* emoji */
|
||||||
|
[EMO] = KEYMAP(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY), X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN), X(HEART),X(BYE), X(KISS), X(CELEB),X(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,X(SLEEP),X(CLAP), X(CRY), X(VIC), X(BHART),X(SUN), X(SMEYE),X(WINK), X(MOON), X(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
[XXX] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
/* layout switcher */
|
||||||
|
case LAY_QWE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<QWE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LAY_COL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<COL);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LAY_WOR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<WOR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LAY_DVO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<DVO);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* os switcher */
|
||||||
|
case OS_LIN:
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case OS_WIN:
|
||||||
|
set_unicode_input_mode(UC_WINC);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case OS_MAC:
|
||||||
|
set_unicode_input_mode(UC_OSX);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user() {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 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 "stdint.h"
|
||||||
|
#include "ps2.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
|
||||||
|
void led_set(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
uint8_t ps2_led = 0;
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
ps2_led |= (1<<PS2_LED_NUM_LOCK);
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
|
||||||
|
ps2_host_set_led(ps2_led);
|
||||||
|
}
|
@ -0,0 +1,237 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 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 <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "ps2.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||||
|
#define print_matrix_header() print("\nr/c 01234567\n")
|
||||||
|
#define matrix_bitpop(i) bitpop(matrix[i])
|
||||||
|
#define ROW_SHIFTER ((uint8_t)1)
|
||||||
|
|
||||||
|
|
||||||
|
static void matrix_make(uint8_t code);
|
||||||
|
static void matrix_break(uint8_t code);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Matrix Array usage:
|
||||||
|
* 'Scan Code Set 3' is assigned into 17x8 cell matrix.
|
||||||
|
*
|
||||||
|
* 8bit wide
|
||||||
|
* +---------+
|
||||||
|
* 0| |
|
||||||
|
* :| | 0x00-0x87
|
||||||
|
* ;| |
|
||||||
|
* 17| |
|
||||||
|
* +---------+
|
||||||
|
*/
|
||||||
|
static uint8_t matrix[MATRIX_ROWS];
|
||||||
|
#define ROW(code) (code>>3)
|
||||||
|
#define COL(code) (code&0x07)
|
||||||
|
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
debug_enable = true;
|
||||||
|
//debug_matrix = true;
|
||||||
|
//debug_keyboard = true;
|
||||||
|
//debug_mouse = false;
|
||||||
|
|
||||||
|
ps2_host_init();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
// scan code reading states
|
||||||
|
static enum {
|
||||||
|
RESET,
|
||||||
|
RESET_RESPONSE,
|
||||||
|
KBD_ID0,
|
||||||
|
KBD_ID1,
|
||||||
|
CONFIG,
|
||||||
|
READY,
|
||||||
|
F0,
|
||||||
|
} state = RESET;
|
||||||
|
|
||||||
|
uint8_t code;
|
||||||
|
if ((code = ps2_host_recv())) {
|
||||||
|
debug("r"); debug_hex(code); debug(" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
case RESET:
|
||||||
|
debug("wFF ");
|
||||||
|
if (ps2_host_send(0xFF) == 0xFA) {
|
||||||
|
debug("[ack]\nRESET_RESPONSE: ");
|
||||||
|
state = RESET_RESPONSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RESET_RESPONSE:
|
||||||
|
if (code == 0xAA) {
|
||||||
|
debug("[ok]\nKBD_ID: ");
|
||||||
|
state = KBD_ID0;
|
||||||
|
} else if (code) {
|
||||||
|
debug("err\nRESET: ");
|
||||||
|
state = RESET;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// after reset receive keyboad ID(2 bytes)
|
||||||
|
case KBD_ID0:
|
||||||
|
if (code) {
|
||||||
|
state = KBD_ID1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KBD_ID1:
|
||||||
|
if (code) {
|
||||||
|
debug("\nCONFIG: ");
|
||||||
|
state = CONFIG;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONFIG:
|
||||||
|
debug("wF8 ");
|
||||||
|
if (ps2_host_send(0xF8) == 0xFA) {
|
||||||
|
debug("[ack]\nREADY\n");
|
||||||
|
state = READY;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case READY:
|
||||||
|
switch (code) {
|
||||||
|
case 0x00:
|
||||||
|
break;
|
||||||
|
case 0xF0:
|
||||||
|
state = F0;
|
||||||
|
debug(" ");
|
||||||
|
break;
|
||||||
|
default: // normal key make
|
||||||
|
if (code < 0x88) {
|
||||||
|
matrix_make(code);
|
||||||
|
} else {
|
||||||
|
debug("unexpected scan code at READY: "); debug_hex(code); debug("\n");
|
||||||
|
}
|
||||||
|
state = READY;
|
||||||
|
debug("\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case F0: // Break code
|
||||||
|
switch (code) {
|
||||||
|
case 0x00:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (code < 0x88) {
|
||||||
|
matrix_break(code);
|
||||||
|
} else {
|
||||||
|
debug("unexpected scan code at F0: "); debug_hex(code); debug("\n");
|
||||||
|
}
|
||||||
|
state = READY;
|
||||||
|
debug("\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
static void matrix_make(uint8_t code)
|
||||||
|
{
|
||||||
|
if (!matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] |= 1<<COL(code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
static void matrix_break(uint8_t code)
|
||||||
|
{
|
||||||
|
if (matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] &= ~(1<<COL(code));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix_get_row(row) & (1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
print("r/c 01234567\n");
|
||||||
|
#elif (MATRIX_COLS <= 16)
|
||||||
|
print("r/c 0123456789ABCDEF\n");
|
||||||
|
#elif (MATRIX_COLS <= 32)
|
||||||
|
print("r/c 0123456789ABCDEF0123456789ABCDEF\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
xprintf("%02X: %08b%s\n", row, bitrev(matrix_get_row(row)),
|
||||||
|
#elif (MATRIX_COLS <= 16)
|
||||||
|
xprintf("%02X: %016b%s\n", row, bitrev16(matrix_get_row(row)),
|
||||||
|
#elif (MATRIX_COLS <= 32)
|
||||||
|
xprintf("%02X: %032b%s\n", row, bitrev32(matrix_get_row(row)),
|
||||||
|
#endif
|
||||||
|
#ifdef MATRIX_HAS_GHOST
|
||||||
|
matrix_has_ghost_in_row(row) ? " <ghost" : ""
|
||||||
|
#else
|
||||||
|
""
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef MATRIX_HAS_GHOST
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool matrix_has_ghost_in_row(uint8_t row)
|
||||||
|
{
|
||||||
|
matrix_row_t matrix_row = matrix_get_row(row);
|
||||||
|
// No ghost exists when less than 2 keys are down on the row
|
||||||
|
if (((matrix_row - 1) & matrix_row) == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Ghost occurs when the row shares column line with other row
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
if (i != row && (matrix_get_row(i) & matrix_row))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,72 @@
|
|||||||
|
# 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
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
UNICODEMAP_ENABLE ?= yes
|
||||||
|
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.
|
||||||
|
PS2_USE_USART ?= yes
|
||||||
|
API_SYSEX_ENABLE ?= n
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
SRC = matrix.c led.c
|
@ -1,3 +1,8 @@
|
|||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
RGBLIGHT_ENABLE ?= yes
|
||||||
|
MIDI_ENABLE ?= no
|
||||||
|
|
||||||
ifndef MAKEFILE_INCLUDED
|
ifndef MAKEFILE_INCLUDED
|
||||||
include ../../../Makefile
|
include ../../../Makefile
|
||||||
endif
|
endif
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
|
|
||||||
|
|
||||||
sudo "${HL}" | grep --line-buffered LAYER: | \
|
|
||||||
(while read line; do
|
|
||||||
case $line in
|
|
||||||
LAYER:*)
|
|
||||||
layer="$(echo $(echo $line | cut -d: -f2-))"
|
|
||||||
notify-send -i mark-location-symbolic "Switched to layer: $layer"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done)
|
|
@ -0,0 +1,17 @@
|
|||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define FORCE_NKRO
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#undef IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,107 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define ETC 2 // etc
|
||||||
|
|
||||||
|
enum macro_id {
|
||||||
|
TEENSY,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[BASE] = KEYMAP(
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP,
|
||||||
|
CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN,
|
||||||
|
KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB),
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO,
|
||||||
|
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS,
|
||||||
|
KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT,
|
||||||
|
KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT),
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC)
|
||||||
|
),
|
||||||
|
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
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_BSLS,
|
||||||
|
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS,
|
||||||
|
KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO,
|
||||||
|
KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO,
|
||||||
|
KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS,
|
||||||
|
KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[ETC] = KEYMAP(
|
||||||
|
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS,
|
||||||
|
KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO,
|
||||||
|
KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO,
|
||||||
|
KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
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) {
|
||||||
|
switch(id) {
|
||||||
|
case TEENSY:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,9 @@
|
|||||||
|
# Having a file like this allows you to override Makefile definitions
|
||||||
|
# for your own particular keymap
|
||||||
|
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
SUBPROJECT_DEFAULT = ez
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,216 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
TD_U_LBRC = 0,
|
||||||
|
TD_I_RBRC,
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_U_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_LBRC),
|
||||||
|
[TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Macro Declarations
|
||||||
|
static uint16_t sunds_timer;
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | `~ | `~ | Bks |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P | Ctrl |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Cmd/"' | A | S | D | F | G |------| |------| H | J | K | L | ;: |Cmd/Entr|
|
||||||
|
* |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------|
|
||||||
|
* | Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | Shft |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | Alt | x | x | x | Left | |Right | Bks | x | x | Alt |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* |Teensy| VolUp| | Play | Del |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | VolDn| | Next | | |
|
||||||
|
* |Sp/~L1| L2 |------| |------| L2 |'"/~L1|
|
||||||
|
* | | | Mute | | Prev | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME,
|
||||||
|
CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP,
|
||||||
|
M(1), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN,
|
||||||
|
KC_LALT, KC_1, KC_1, KC_1, KC_LEFT,
|
||||||
|
RESET, KC_VOLU,
|
||||||
|
KC_VOLD,
|
||||||
|
LT(SYMB, KC_SPC), TG(MDIA), KC_MUTE,
|
||||||
|
// right hand
|
||||||
|
KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_GRV, KC_GRV, KC_BSPC,
|
||||||
|
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCTRL,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT),
|
||||||
|
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_RGHT, KC_BSPC, KC_1, KC_1, KC_RALT,
|
||||||
|
KC_MPLY, KC_DEL,
|
||||||
|
KC_MNXT,
|
||||||
|
KC_MPRV, TG(MDIA), LT(SYMB, KC_QUOT)
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | ^ | [ | ( | { | | | | = | 7 | 8 | 9 | 0 | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | & | $ | ] | ) | } |------| |------| + | 4 | 5 | 6 | * | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | \ | @ | # | % | | | | | | - | 1 | 2 | 3 | / | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | 0 | 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_CIRC, KC_LBRC, KC_LPRN, KC_LCBR, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_DLR, KC_RBRC, KC_RPRN, KC_RCBR,
|
||||||
|
KC_TRNS, KC_BSLS, KC_AT, KC_HASH, KC_PERC, KC_PIPE, 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_TRNS,
|
||||||
|
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||||
|
KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
|
||||||
|
KC_0, KC_0, KC_DOT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | WhDn | WhUp | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | R-Ck | L-Ck | |------| |------| MsLt | MsDn | MsUp | MsRt | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
M(0), 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_BTN2, KC_BTN1, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WH_U, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, 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_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) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
sunds_timer = timer_read();
|
||||||
|
register_code (KC_LGUI);
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed (sunds_timer) < TAPPING_TERM) {
|
||||||
|
unregister_code (KC_LGUI);
|
||||||
|
register_code (KC_LSFT);
|
||||||
|
register_code (KC_QUOT);
|
||||||
|
unregister_code (KC_QUOT);
|
||||||
|
unregister_code (KC_LSFT);
|
||||||
|
register_code (KC_LGUI);
|
||||||
|
}
|
||||||
|
unregister_code (KC_LGUI);
|
||||||
|
}
|
||||||
|
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_3_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
|
||||||
|
ergodox_right_led_1_on ();
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,273 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
#define NAVG 3 // navigation
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
RGB_SLD
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?)
|
||||||
|
// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'|
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | App | Home | | PgUp | Ins |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | End | | PgDn | | |
|
||||||
|
* | Space| TAB |------| |------| BSPC |Enter |
|
||||||
|
* | | | [ | | ] | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// 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
|
||||||
|
LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||||
|
LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT,
|
||||||
|
ALT_T(KC_APP), KC_HOME,
|
||||||
|
KC_END,
|
||||||
|
KC_SPC,KC_TAB,KC_LBRC,
|
||||||
|
// right hand
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL),
|
||||||
|
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS),
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT),
|
||||||
|
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||||
|
KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD),
|
||||||
|
KC_PGUP, KC_INS,
|
||||||
|
KC_PGDN,
|
||||||
|
KC_RBRC,KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| DEL | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// 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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
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, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_DEL, 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
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | VER | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | up | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | left | down | right| |------| |------| | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// NAVIGATION
|
||||||
|
[NAVG] = KEYMAP(
|
||||||
|
KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
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) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) { // For resetting EEPROM
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
// dynamically generate these.
|
||||||
|
case EPRM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGB_SLD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ergodox_right_led_1_on(); // TODO: Make a fourth layer
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
# ErgoDox EZ 1337 configuration
|
||||||
|
|
||||||
|
Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that
|
||||||
|
some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar
|
||||||
|
with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are
|
||||||
|
unfamiliar with tiling window managers) as much as possibly.
|
||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
- 02.01.2017 Added delete key on second layer
|
After Width: | Height: | Size: 252 KiB |
@ -0,0 +1,165 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
/******************************************************************************************
|
||||||
|
* DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/)
|
||||||
|
* Layer 1: auxiliary keys
|
||||||
|
* Layer 2: full qwerty layout
|
||||||
|
*****************************************************************************************/
|
||||||
|
|
||||||
|
// LAYERS
|
||||||
|
#define BASE 0 // dvorak layout (default)
|
||||||
|
#define AUX 1 // auxiliary keys
|
||||||
|
|
||||||
|
// MACROS
|
||||||
|
/* #define OBRACE 0 // key { or shift */
|
||||||
|
/* #define CBRACE 1 // key } or shift */
|
||||||
|
/* #define OBRACK 2 // key [ or left alt */
|
||||||
|
/* #define CBRACK 3 // key ] or left alt */
|
||||||
|
/* #define CAPS 4 // caps lock */
|
||||||
|
|
||||||
|
// LEDS
|
||||||
|
#define USB_LED_NUM_LOCK 0
|
||||||
|
#define USB_LED_CAPS_LOCK 1
|
||||||
|
#define USB_LED_SCROLL_LOCK 2
|
||||||
|
#define USB_LED_COMPOSE 3
|
||||||
|
#define USB_LED_KANA 4
|
||||||
|
|
||||||
|
// TIMERS
|
||||||
|
#define KEY_TAP_FAST 85
|
||||||
|
#define KEY_TAP_SLOW 95
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Base layer
|
||||||
|
* Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? |
|
||||||
|
* |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
|
||||||
|
* | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ |
|
||||||
|
* |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
|
||||||
|
* | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | ~L1 | | ~L1 | | | \ / || |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | HOME | END | | LEFT | RIGHT|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | BSPC | DEL | PGUP | | UP | SPACE |RETURN|
|
||||||
|
* | / | / |------| |------| / | / |
|
||||||
|
* | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
[BASE] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
|
KC_TILD, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRACKET,
|
||||||
|
KC_TAB, KC_A, KC_O, KC_E, SFT_T(KC_U), LT(AUX, KC_I),
|
||||||
|
SFT_T(KC_LBRC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX),
|
||||||
|
KC_HOME, KC_END,
|
||||||
|
KC_PGUP,
|
||||||
|
CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||||
|
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
|
||||||
|
LT(AUX, KC_D), SFT_T(KC_H), KC_T, KC_N, KC_S, KC_MINUS,
|
||||||
|
KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_RBRC),
|
||||||
|
MO(AUX), KC_NO, KC_NO, KC_BSLASH, KC_NO,
|
||||||
|
KC_LEFT, KC_RIGHT,
|
||||||
|
KC_UP,
|
||||||
|
KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC)
|
||||||
|
),
|
||||||
|
/* Keymap 1: Aux layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | VolUp | | | | | | SLEEP | PWR | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
|
||||||
|
* |--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------|
|
||||||
|
* | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | TRANS| TRANS| | TRANS| TRANS|
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | TRANS| | TRANS| | |
|
||||||
|
* |TRANS |TRANS |------| |------| TRANS| TRANS|
|
||||||
|
* | | | TRANS| | TRANS| | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[AUX] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP,
|
||||||
|
KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO,
|
||||||
|
KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS,
|
||||||
|
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||||
|
LCTL(KC_S), LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), KC_TRNS,
|
||||||
|
KC_TRNS , KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO,
|
||||||
|
KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO,
|
||||||
|
KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO,
|
||||||
|
KC_TRNS , KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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) {
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
# Ergodox Dvorak Layout with emacs binding in mind
|
||||||
|
* Control & Alt key on the thumbs (activated if pressed with another key).
|
||||||
|
* In the same way, "U" and "R" are the shift modifier if pressed with another key.
|
||||||
|
* "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key.
|
||||||
|
* Software layout set to english.
|
||||||
|
|
||||||
|
## Keymap Layers
|
||||||
|
- L0: dvorak with some customizations (see layout below)
|
||||||
|
- L1: auxiliary keys (includes function keys, numpad...)
|
||||||
|
|
||||||
|
|
||||||
|
### Keymap 0: Base layer
|
||||||
|
Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively
|
||||||
|
|
||||||
|
<pre><code>
|
||||||
|
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| ~ | ' | , | . | P | Y | [ | | ] | F | G | C | H | L | / |
|
||||||
|
|--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
|
||||||
|
| Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - |
|
||||||
|
|--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
|
||||||
|
| {/LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | ~L1 | | ~L1 | | | \ | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| HOME | END | | LEFT | RIGHT|
|
||||||
|
,------|------|------| |------+--------+------.
|
||||||
|
| BSPC | DEL | PGUP | | UP | SPACE |RETURN|
|
||||||
|
| / | / |------| |------| / | / |
|
||||||
|
| LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
|
||||||
|
`--------------------' `----------------------'
|
||||||
|
|
||||||
|
</pre></code>
|
||||||
|
|
||||||
|
### Keymap 1: Aux layer
|
||||||
|
|
||||||
|
<pre><code>
|
||||||
|
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| VolUp | | | | | | SLEEP | PWR | | | | | | |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
|
||||||
|
|--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------|
|
||||||
|
| TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
|CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| TRANS| TRANS| | TRANS| TRANS|
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | TRANS| | TRANS| | |
|
||||||
|
|TRANS |TRANS |------| |------| TRANS| TRANS|
|
||||||
|
| | | TRANS| | TRANS| | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
|
||||||
|
</pre></code>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Generation of .hex file
|
||||||
|
> In the "qmk_firmware/keyboards/ergodox" directory.
|
||||||
|
|
||||||
|
> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware".
|
||||||
|
|
||||||
|
> Flash with `teensy_loader` binary
|
@ -0,0 +1,14 @@
|
|||||||
|
Dvorak support, plover support, gaming support
|
||||||
|
|
||||||
|
I'm used to the Kinesis, so originally I was just going to patch up
|
||||||
|
the thumb keys to be more familiar. But the ergodox is really well
|
||||||
|
suited to NKRO support in Plover, so I added a layer for that, and
|
||||||
|
then I remembered that dvorak can be really annoying for video
|
||||||
|
games (try to reach WASD), so I added a layer for that.
|
||||||
|
|
||||||
|
The result is probably a bit idiosyncratic, but it works for me.
|
||||||
|
|
||||||
|
(I also don't have any press/hold distinction keys, because that
|
||||||
|
confuses my fuzzy little brain.)
|
||||||
|
|
||||||
|
Contributed by seebs (seebs@seebs.net)
|
@ -0,0 +1,230 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define PLVR 2 // media keys
|
||||||
|
#define QWRT 3 // qwerty layer for gaming
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | \ |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | ' | , | . | P | Y | L1 | | L2 | F | G | C | R | L | / |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | LGui | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
||||||
|
* |--------+------+------+------+------+------| Esc | | L3 |------+------+------+------+------+--------|
|
||||||
|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Lalt | Grv | | Left | Right| | Up | Down | [ | ] | RAlt |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,---------------.
|
||||||
|
* | LCtrl| Alt | | LGui | RCtrl |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* |Backsp|Delete|------| |------| Enter |Space |
|
||||||
|
* | ace| | 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_ESC,
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(SYMB),
|
||||||
|
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ESC,
|
||||||
|
KC_LALT, KC_GRV, KC_ESC, KC_LEFT,KC_RGHT,
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC,KC_DEL,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
TG(PLVR), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||||
|
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||||
|
TG(QWRT),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT,
|
||||||
|
KC_LGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | KP7 | KP8 | KP9 | KP* | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | KP4 | KP5 | KP6 | KP+ | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | KP1 | KP2 | KP3 | KP/ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | KP. | KP0 | KP= | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// 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_P7, KC_P8, KC_P9, KC_PAST, KC_F12,
|
||||||
|
KC_DOWN, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_PDOT, KC_P0, KC_PEQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | | L2 | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | q | w | e | r | t |------| |------| y | u | i | o | p | [ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | a | s | d | f | g | | | | h | j | k | l | ; | ' |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | c | v |------| |------| n | m |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[PLVR] = KEYMAP( // layout: layer 2: Steno for Plover
|
||||||
|
// left hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
|
||||||
|
KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||||
|
KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_FN4, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_C, KC_V, KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||||
|
TG(2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||||
|
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||||
|
KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_NO, KC_N, KC_M
|
||||||
|
),
|
||||||
|
/* Keymap 3: qwerty-ish
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | LGui | A | S | D | F | G |------| |------| H | J | K | L | ; | LGui |
|
||||||
|
* |--------+------+------+------+------+------| Spc | | L3 |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | Lalt | Grv | '" | Left | Right| | Up | Down | [ | ] | RAlt |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,---------------.
|
||||||
|
* | LCtrl| LAlt | | LGui | RCtrl |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* |Backsp|Delete|------| |------| Enter |Space |
|
||||||
|
* | ace| | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[QWRT] = KEYMAP( // layer 3: qwerty for gaming
|
||||||
|
// left hand
|
||||||
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPACE,
|
||||||
|
KC_LALT, KC_GRV, KC_QUOT, KC_LEFT,KC_RGHT,
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC,KC_DEL,KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
TG(QWRT), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT,
|
||||||
|
KC_LGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
case 3:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,8 @@
|
|||||||
|
BOOTMAGIC_ENABLE=no
|
||||||
|
COMMAND_ENABLE=no
|
||||||
|
SLEEP_LED_ENABLE=no
|
||||||
|
FORCE_NKRO ?= yes
|
||||||
|
DEBUG_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = yes
|
@ -0,0 +1,29 @@
|
|||||||
|
Dvorak Programmer Layout
|
||||||
|
========================
|
||||||
|
|
||||||
|
This is a dvorak-only layout. The overall philosophy is that the left hand contains a number of layer-switching shortcuts, and the right hand key codes vary based on the layer selected.
|
||||||
|
|
||||||
|
Layers
|
||||||
|
------
|
||||||
|
|
||||||
|
* BASE: this is where you type.
|
||||||
|
* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
|
||||||
|
* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
|
||||||
|
* KEY_SEL: same as above, but every movement shift-selects.
|
||||||
|
* NUMBER: keypad layer.
|
||||||
|
* SYMBOL: all the symbols.
|
||||||
|
* BRACKET: special brackets-only layer for programming
|
||||||
|
* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
|
||||||
|
* MOUSE: use mouse keys
|
||||||
|
|
||||||
|
Updates
|
||||||
|
-------
|
||||||
|
|
||||||
|
2016/12/10:
|
||||||
|
* toggle for brackets layer is now on left thumb cluster.
|
||||||
|
|
||||||
|
2016/11/05:
|
||||||
|
* removed brackets anywhere but in brackets layer
|
||||||
|
* added mouse layer back in
|
||||||
|
* put semicolon-newline and end-newline on symbol layer
|
||||||
|
* replaced all HYPR with MEH, added more shortcut keys
|
@ -0,0 +1,424 @@
|
|||||||
|
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "led.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "action_code.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SHELL_NAV 1
|
||||||
|
#define KEY_NAV 3 // key navigation layer
|
||||||
|
#define KEY_SEL 4 // key selection layer
|
||||||
|
#define NUMBER 5 // number layer
|
||||||
|
#define SYMBOL 6
|
||||||
|
#define BRACKETS 7
|
||||||
|
#define SHORTCUTS 8
|
||||||
|
#define MOUSE 9
|
||||||
|
|
||||||
|
// macros
|
||||||
|
#define MC_COPY_LINE 0
|
||||||
|
#define MC_CUT_LINE 1
|
||||||
|
#define MC_PASTE_LINE 2
|
||||||
|
#define MC_NEW_SEARCH_TAB 3
|
||||||
|
#define SCREEN_TAB_LEFT 4
|
||||||
|
#define SCREEN_TAB_RIGHT 5
|
||||||
|
#define SCREEN_NEW_TAB 6
|
||||||
|
#define SWITCH_NDS 7
|
||||||
|
#define SCREEN_COPY_MODE 8
|
||||||
|
#define SCREEN_PASTE 9
|
||||||
|
#define OPEN_CLOSE_PAREN 10
|
||||||
|
#define OPEN_CLOSE_BRACKET 11
|
||||||
|
#define OPEN_CLOSE_CURLY 12
|
||||||
|
#define OPEN_CLOSE_SINGLE_QUOTE 13
|
||||||
|
#define OPEN_CLOSE_DOUBLE_QUOTE 14
|
||||||
|
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
|
||||||
|
#define SEMICOLON_NEWLINE 16
|
||||||
|
#define END_NEWLINE 17
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer
|
||||||
|
[2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer
|
||||||
|
[3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot
|
||||||
|
[4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot
|
||||||
|
[5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
TD_SHIFT_CAPSLOCK = 0,
|
||||||
|
TD_BRK_LEFT = 1,
|
||||||
|
TD_BRK_RIGHT = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// base layer
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||||
|
LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
|
||||||
|
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
|
||||||
|
OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
|
||||||
|
// thumb cluster
|
||||||
|
MO(BRACKETS), RCTL(KC_S),
|
||||||
|
RCTL(KC_DEL),
|
||||||
|
KC_BSPC,RCTL(KC_BSPC),KC_DEL,
|
||||||
|
// right hand
|
||||||
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS,
|
||||||
|
KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||||
|
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||||
|
KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK),
|
||||||
|
// lower keys - browser tab control
|
||||||
|
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W),
|
||||||
|
// thumb cluster
|
||||||
|
KC_HOME,KC_END,
|
||||||
|
KC_UP,
|
||||||
|
KC_DOWN,KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
// shell navigation layer
|
||||||
|
[SHELL_NAV] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
LALT(KC_D),
|
||||||
|
KC_TRNS,RCTL(KC_W),KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
|
||||||
|
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||||
|
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||||
|
// bottom row
|
||||||
|
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
// key navigation layer
|
||||||
|
[KEY_NAV] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
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_PGDN, KC_HOME, KC_UP, KC_END, KC_PGUP, M(MC_COPY_LINE),
|
||||||
|
RCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, RCTL(KC_RIGHT), M(MC_CUT_LINE),
|
||||||
|
KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// key selection layer
|
||||||
|
[KEY_SEL] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
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,
|
||||||
|
RSFT(KC_PGUP), RSFT(KC_PGDN), RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), M(MC_COPY_LINE),
|
||||||
|
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), M(MC_CUT_LINE),
|
||||||
|
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// number layer
|
||||||
|
[NUMBER] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// bottom row
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
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_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||||
|
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
|
||||||
|
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_COLN, KC_TRNS,
|
||||||
|
// bottom row
|
||||||
|
KC_0, KC_DOT, KC_COMMA, KC_TRNS, KC_TRNS,
|
||||||
|
// thumb cluster
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[SYMBOL] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS,
|
||||||
|
KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS,
|
||||||
|
KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
M(SEMICOLON_NEWLINE), M(END_NEWLINE),
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[BRACKETS] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, M(OPEN_CLOSE_BRACKET),M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_CURLY),KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, 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
|
||||||
|
),
|
||||||
|
|
||||||
|
[SHORTCUTS] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_NO, MEH(KC_F1), MEH(KC_F2), MEH(KC_F3), MEH(KC_F4), MEH(KC_F5), MEH(KC_F6),
|
||||||
|
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,
|
||||||
|
MEH(KC_0),MEH(KC_1),
|
||||||
|
MEH(KC_2),
|
||||||
|
MEH(KC_3),MEH(KC_4),MEH(KC_5),
|
||||||
|
// right hand
|
||||||
|
MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS),
|
||||||
|
KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F),
|
||||||
|
MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L),
|
||||||
|
KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R),
|
||||||
|
MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
|
||||||
|
MEH(KC_6), MEH(KC_7),
|
||||||
|
MEH(KC_8),
|
||||||
|
MEH(KC_9), MEH(KC_Y), MEH(KC_Z)
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[MOUSE] = 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,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_BTN1, KC_BTN2
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case MC_COPY_LINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(C), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MC_CUT_LINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(X), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MC_PASTE_LINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(END), T(ENTER), D(LCTL), T(V), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MC_NEW_SEARCH_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(T), T(K), U(LCTL), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCREEN_TAB_LEFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCREEN_TAB_RIGHT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(A), U(LCTL), T(N), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCREEN_NEW_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCREEN_COPY_MODE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCREEN_PASTE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SWITCH_NDS:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OPEN_CLOSE_PAREN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OPEN_CLOSE_BRACKET:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(LBRC), T(RBRC), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OPEN_CLOSE_CURLY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OPEN_CLOSE_SINGLE_QUOTE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(QUOT), T(QUOT), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OPEN_CLOSE_DOUBLE_QUOTE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( D(LSFT), T(QUOT), T(QUOT), U(LSFT), T(LEFT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(UP), T(HOME), D(LALT), T(D), U(LALT), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SEMICOLON_NEWLINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(END), T(SCLN), T(ENTER), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case END_NEWLINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO( T(END), T(ENTER), END);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
} else {
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK),
|
||||||
|
[TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR),
|
||||||
|
[TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 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_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
case NUMBER:
|
||||||
|
case SYMBOL:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
case KEY_NAV:
|
||||||
|
case KEY_SEL:
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
case SHORTCUTS:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
|
@ -0,0 +1,183 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.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 | rclk | | lclk | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | = | Q | W | E | R |cmd/T |shift | |shift |cmd/Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------|
|
||||||
|
* | " | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' |
|
||||||
|
* |--------+------+------+------+------+------| ctrl | | ctrl |------+------+------+------+------+--------|
|
||||||
|
* | { | Z | X | C | V | B | [ | | ] | N | M | , | . | / | } |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | _ | ` | $ | Left | Right| | Up | Down | : | * | ! |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | < | | | | & | > |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | # | | @ | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | % | | ESC | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// 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_PLUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2,
|
||||||
|
KC_EQL, KC_Q, KC_W, KC_E, KC_R, GUI_T(KC_T), KC_LSPO,
|
||||||
|
KC_DQUO, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LCBR, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_LBRC),
|
||||||
|
KC_UNDS, KC_GRV, KC_DLR, KC_LEFT,KC_RGHT,
|
||||||
|
KC_LABK, KC_PIPE,
|
||||||
|
KC_HASH,
|
||||||
|
KC_SPC, KC_BSPC,KC_PERC,
|
||||||
|
// right hand
|
||||||
|
KC_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
KC_RSPC, GUI_T(KC_Y), KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
|
||||||
|
CTL_T(KC_RBRC), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RCBR,
|
||||||
|
KC_UP, KC_DOWN,KC_COLN,KC_ASTR, KC_EXLM,
|
||||||
|
KC_AMPR, KC_RABK,
|
||||||
|
KC_AT,
|
||||||
|
KC_ESC, KC_TAB, KC_ENT
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------.
|
||||||
|
* |Version | 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
|
||||||
|
M(0), 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) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
# Galson keymap
|
||||||
|
|
||||||
|
|
||||||
|
Sep 26, 2016.
|
||||||
|
|
||||||
|
This is an ergonomic layout for programming for those with typing-related injuries. Key features:
|
||||||
|
|
||||||
|
- As many symbol keys as possible are accessible without shifting. These should be accessed by moving the entire hand and pressing with a strong finger.
|
||||||
|
- Arrow keys and left and right mouse clicks for mouse-free navigation when combined with head mouse or eyetracker.
|
||||||
|
- Modifier keys are dual role and relocated to positions convenient for the index finger.
|
||||||
|
- Positions are more convenient when the keyboard is vertically mounted (as it should be!)
|
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 71 KiB |
@ -0,0 +1,54 @@
|
|||||||
|
This is a dual English-Japanese keymap that utilises a thumb-shift system for Japanese input. You can read more about this layout on my blog [here](https://ishigoya.com).
|
||||||
|
|
||||||
|
### Some Editing Necessary
|
||||||
|
The system I created this on is a Chromebook, and uses a Japanese keymap, so some of the key mappings may not be the same as those on your system. In particular, the Escape key on layer 0 is mapped to KC_LCTL.
|
||||||
|
|
||||||
|
### Layouts
|
||||||
|
------
|
||||||
|
#### English layer - layer 0
|
||||||
|
The English layout is a modified Workman layout, and is pictured below:
|
||||||
|
|
||||||
|
![English layout](img/keyboard-layout-enL.png)
|
||||||
|
|
||||||
|
Some of the punctuation keys have been moved to a separate number/symbol layer.
|
||||||
|
|
||||||
|
#### Number / Symbol layer - layer 6
|
||||||
|
|
||||||
|
The Number / Symbol layer is reachable through a ACTION_LAYER_MOMENTARY function. The blue LED is illuminated when this layer is active. It is accessible from the English or Japanese layers.
|
||||||
|
|
||||||
|
![Number layout](img/keyboard-layout-numL.png)
|
||||||
|
|
||||||
|
#### Japanese layers - layers 1-5
|
||||||
|
|
||||||
|
There are 5 layers involved in Japanese input. The TOJPLOUT macro is mapped to the En / 和 button, and switches default layer between layer 0 (English) and 1 (main Japanese layer). When layer 1 is the default layer, the red LED is on. It also outputs the ZKHK button to change the input method language.
|
||||||
|
|
||||||
|
On keypress, strings of romaji characters are output by the keyboard using macros, and these simulate the input of individual keys on a latin keyboard.
|
||||||
|
|
||||||
|
![Japanese layout](img/keyboard-layout-jpL.png)
|
||||||
|
|
||||||
|
Layer 1 is the JP layer. Keys on this layer correspond to singleton keys, or keys on the bottom row where a key is shared. For example, pressing the "ふ や" key outputs `ふ` (or "fu").
|
||||||
|
|
||||||
|
Layer 2 is the JPXON layer, and is active while holding the Fn key. This prints keys that are prefaced by "x" when writing in romaji. For example, pressing the "ふ や" key while holding the Fn key outputs `ゃ` (or "xya").
|
||||||
|
|
||||||
|
Layer 3 is the JPKAZARI layer, and is active while holding the 飾り key. This provides letters with dakuten. For example, pressing the "ふ や" key while holding the 飾り key outputs `ぶ` (or "bu").
|
||||||
|
|
||||||
|
Layer 4 is the JPTOPROW layer, and is active while holding the シフト key. Keys on this line correspond to top row keys on shared keys in the image. For example, pressing the "ふ や" key while holding the シフト key outputs `や` (or "ya").
|
||||||
|
|
||||||
|
Layer 5 is the JPTRKZ layer, and is active while holding both the シフト key and the 飾り key. This layer contains handakuten keys. For example, pressing the "ふ や" while holding both the シフト key and the 飾り key outputs `ぷ` (or "pu").
|
||||||
|
|
||||||
|
I've also separated out the #define sections and the macros required for kana for easy copying, in case anyone else should wish to make a kana-based layout.
|
||||||
|
|
||||||
|
When tapped, the シフト key acts as a space key, and the 飾り key acts as a return key. This allows them to function as 変換 and 無変換, respectively, in many IMEs.
|
||||||
|
|
||||||
|
Furthermore the Fn key, when tapped, acts as an F7 key, providing easy switching to katakana in many IMEs.
|
||||||
|
|
||||||
|
### Other features
|
||||||
|
The cut/copy button gives copy functionality on a short press, and cut functionality on a long press.
|
||||||
|
|
||||||
|
The tmux prefix button outputs Control-B.
|
||||||
|
|
||||||
|
The Control & Shift key acts as holding the control and shift keys at the same time.
|
||||||
|
|
||||||
|
SelAll outputs Control-A.
|
||||||
|
|
||||||
|
Undo outputs Control-Z.
|
@ -0,0 +1,6 @@
|
|||||||
|
RGBLIGHT_ENABLE ?= yes
|
||||||
|
MIDI_ENABLE ?= yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|