Compare commits
28 Commits
0.5.224
...
arm_audio_
Author | SHA1 | Date | |
---|---|---|---|
|
20b1dbfed8 | ||
|
220adce11b | ||
|
7d79412f99 | ||
|
57dde3ddba | ||
|
8afbd649f0 | ||
|
30b90de7c9 | ||
|
30e413f985 | ||
|
6a9617b1c6 | ||
|
ad01e3c03a | ||
|
9cfcd49406 | ||
|
f26e6fca8a | ||
|
0e31d85b8e | ||
|
84a713b05c | ||
|
9aaa491bc0 | ||
|
9fcda95363 | ||
|
2908c0f927 | ||
|
598384bc10 | ||
|
ac82cd1ba7 | ||
|
31f5229191 | ||
|
2f65ab183d | ||
|
8350d7e607 | ||
|
e7bb975482 | ||
|
a6be48681a | ||
|
e9944bfc8e | ||
|
2165f9d654 | ||
|
31df12c84f | ||
|
d09d9f32bd | ||
|
690a08cbbb |
@@ -8,7 +8,6 @@ indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@@ -16,3 +15,22 @@ insert_final_newline = true
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
|
||||
# Make these match what we have in .gitattributes
|
||||
[*.mk]
|
||||
end_of_line = lf
|
||||
|
||||
[Makefile]
|
||||
end_of_line = lf
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files
|
||||
|
||||
|
||||
# We don't have gitattributes properly for these
|
||||
# So if the user have for example core.autocrlf set to true
|
||||
# the line endings would be wrong.
|
||||
[lib/**]
|
||||
end_of_line = unset
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -52,6 +52,7 @@ util/Win_Check_Output.txt
|
||||
.vscode/last.sql
|
||||
.vscode/temp.sql
|
||||
.stfolder
|
||||
.tags
|
||||
|
||||
# ignore image files
|
||||
*.png
|
||||
@@ -64,4 +65,4 @@ util/Win_Check_Output.txt
|
||||
# things travis sees
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
/.vs
|
||||
/.vs
|
@@ -47,16 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
|
192
keyboards/cu24/config.h
Normal file
192
keyboards/cu24/config.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Yiancar/CapsUnlocked
|
||||
#define PRODUCT CU24
|
||||
#define DESCRIPTION A luxurious fully customisable numpad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { E6, F5, B4, B6, C6, C7 }
|
||||
#define MATRIX_COL_PINS { F0, F1, D0, D1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* Backlight */
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
/* RGB Glow */
|
||||
#define RGB_DI_PIN F4 // The pin the LED strip is connected to
|
||||
#define RGBLED_NUM 5 // Number of LEDs in your strip
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
16
keyboards/cu24/cu24.c
Normal file
16
keyboards/cu24/cu24.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 "cu24.h"
|
42
keyboards/cu24/cu24.h
Normal file
42
keyboards/cu24/cu24.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 CU24_H
|
||||
#define CU24_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The following is an example using the Planck MIT layout
|
||||
// The first section contains all of the 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, k33, \
|
||||
k40, k41, k42, k43, \
|
||||
k50, k51, k52, k53 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, k23 }, \
|
||||
{ k30, k31, k32, k33 }, \
|
||||
{ k40, k41, k42, k43 }, \
|
||||
{ k50, k51, k52, k53 } \
|
||||
}
|
||||
|
||||
#endif
|
56
keyboards/cu24/keymaps/default/keymap.c
Normal file
56
keyboards/cu24/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 "cu24.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP( /* Base */
|
||||
KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, \
|
||||
MO(1) , KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7 , KC_P8 , KC_P9 , KC_PPLS, \
|
||||
KC_P4 , KC_P5 , KC_P6 , KC_PPLS, \
|
||||
KC_P1 , KC_P2 , KC_P3 , KC_PENT, \
|
||||
KC_P0 , KC_P0 , KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
[1] = KEYMAP( /* FN */
|
||||
RGB_TOG, RGB_MOD, BL_STEP, BL_BRTG, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, \
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, RESET , KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
/* Use this function to add macros */
|
||||
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;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
10
keyboards/cu24/keymaps/default/readme.md
Normal file
10
keyboards/cu24/keymaps/default/readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
https://imgur.com/a/vpHFj
|
||||
|
||||

|
||||
|
||||
# Default CU24 Layout
|
||||
|
||||
This is the default layout that comes flashed on every CU24. It is like a normal numpad,
|
||||
with all the led customization on the Fn layer.
|
||||
|
||||
See [All Layouts](https://imgur.com/trwO7dN) for all supported configurations!
|
15
keyboards/cu24/readme.md
Normal file
15
keyboards/cu24/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# CU24
|
||||
|
||||

|
||||
|
||||
A luxurious 24 key keypad with various layouts. Includes RGB underglow, backlight and an aluminium, brass and nylon case.
|
||||
|
||||
Keyboard Maintainer: [Yiancar](https://github.com/yiancar)
|
||||
Hardware Supported: PCB v1.0 (uses a 32u4)
|
||||
Hardware Availability: http://caps-unlocked.com/
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make CU24:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
69
keyboards/cu24/rules.mk
Normal file
69
keyboards/cu24/rules.mk
Normal file
@@ -0,0 +1,69 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
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 yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
RGBLIGHT_ENABLE = yes # RGB drivers
|
@@ -82,15 +82,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -50,16 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
|
85
keyboards/dz60/keymaps/f3d3/keymap.c
Normal file
85
keyboards/dz60/keymaps/f3d3/keymap.c
Normal file
@@ -0,0 +1,85 @@
|
||||
#include "dz60.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Layer 0
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | Bck |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | RSh | U | / |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | GUI | Alt | Space | Fn1 | Play | Pscr | Fn1 | Left |Rght |Down |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
KEYMAP_2_SHIFTS(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC,
|
||||
KC_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_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_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_TRNS, KC_RSFT, KC_UP, KC_SLSH,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_MPLY, KC_PSCR, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
|
||||
|
||||
/* Layer 1
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | PWR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RGBT |RGBM |Hue+ |Hue- |Sat+ |Sat- |Val+ |Val- | | | | | RESET |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | BLT | BL- | BL+ | BLS | | | |Vol+ | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | Stop | | |Prev |Vol- |Next |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
KEYMAP_2_SHIFTS(
|
||||
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@@ -33,15 +33,6 @@ static void init_rows(void);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -82,15 +82,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
#endif
|
||||
#define TAPPING_TERM 150
|
||||
#define TAPPING_TERM 175
|
||||
#undef PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
|
@@ -48,26 +48,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | End | | PgDn | | |
|
||||
* `---------------------' `---------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox(
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
[_QWERTY] = LAYOUT_ergodox_wrapper(
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO),
|
||||
KC_BSPC, _________________QWERTY_L2_________________,
|
||||
KC_LSFT, _________________QWERTY_L3_________________, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE,KC_BSPC, KC_END,
|
||||
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
|
||||
_________________QWERTY_R2_________________, GUI_T(KC_QUOT),
|
||||
TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_RSFT,
|
||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
@@ -91,25 +91,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_COLEMAK] = LAYOUT_ergodox(
|
||||
[_COLEMAK] = LAYOUT_ergodox_wrapper(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO),
|
||||
KC_BSPC, _________________COLEMAK_L2________________,
|
||||
KC_LSFT, _________________COLEMAK_L3________________, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE,KC_BSPC, KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
|
||||
_________________COLEMAK_R2________________, GUI_T(KC_QUOT),
|
||||
TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_RSFT,
|
||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
@@ -134,25 +134,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
[_DVORAK] = LAYOUT_ergodox_wrapper(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO),
|
||||
KC_BSPC, _________________DVORAK_L2_________________,
|
||||
KC_LSFT, _________________DVORAK_L3_________________, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE,KC_BSPC, KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), 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(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), OSM(MOD_RSFT),
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
|
||||
_________________DVORAK_R2_________________, GUI_T(KC_MINS),
|
||||
TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_RSFT,
|
||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
@@ -177,27 +177,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_WORKMAN] = LAYOUT_ergodox(
|
||||
[_WORKMAN] = LAYOUT_ergodox_wrapper(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO),
|
||||
KC_BSPC, _________________WORKMAN_L2________________,
|
||||
KC_LSFT, _________________WORKMAN_L3________________, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE,KC_BSPC, KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
|
||||
_________________WORKMAN_R2________________, GUI_T(KC_QUOT),
|
||||
TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_RSFT,
|
||||
___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
[_MODS] = LAYOUT_ergodox(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
OSM(MOD_LSFT),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, OSM(MOD_RSFT),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
@@ -220,11 +240,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox(
|
||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, TG(_MODS),
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
RGB_SMOD, KC_RGB_T,
|
||||
RGB_HUI,
|
||||
RGB_M_R, RGB_M_SW, RGB_HUD,
|
||||
|
@@ -86,15 +86,6 @@ static matrix_row_t _matrix0[MATRIX_ROWS];
|
||||
static matrix_row_t _matrix1[MATRIX_ROWS];
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -85,15 +85,6 @@ static matrix_row_t _matrix0[MATRIX_ROWS];
|
||||
static matrix_row_t _matrix1[MATRIX_ROWS];
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -74,15 +74,6 @@ static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static void unselect_row(uint8_t row);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -60,15 +60,6 @@ static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -62,15 +62,6 @@ static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static uint8_t matrix_master_scan(void);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -23,6 +23,15 @@ enum custom_keycodes {
|
||||
#define KC_RASE RAISE
|
||||
#define KC_RST RESET
|
||||
#define KC_BL_S BL_STEP
|
||||
#define KC_DBUG DEBUG
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
#define KC_RSAI RGB_SAI
|
||||
#define KC_RSAD RGB_SAD
|
||||
#define KC_RVAI RGB_VAI
|
||||
#define KC_RVAD RGB_VAD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@@ -34,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RGHT,
|
||||
LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LCTL,LOWR,SPC , ENT ,LGUI,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
@@ -68,18 +77,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_ADJUST] = KEYMAP(
|
||||
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
|
||||
BL_STEP, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// `--------+--------+--------' `--------+--------+--------'
|
||||
[_ADJUST] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
BL_S,RST , , , , , , , , , , , , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
)
|
||||
|
||||
};
|
||||
|
41
keyboards/iris/keymaps/hag/config.h
Normal file
41
keyboards/iris/keymaps/hag/config.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.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_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
297
keyboards/iris/keymaps/hag/keymap.c
Normal file
297
keyboards/iris/keymaps/hag/keymap.c
Normal file
@@ -0,0 +1,297 @@
|
||||
#include "iris.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
|
||||
//Heavily modified keymap. Some features:
|
||||
//Multiple layouts, I use dvorak as main.
|
||||
//Nordic(swedish) signs
|
||||
//Symbols, numpad, arrows/navigation reachable under the alpas via the layers
|
||||
//Mirrored ctl, alt and shift to be able to use both hands when doing commands
|
||||
//Gaming layer, qwerty with space on left half.
|
||||
|
||||
#define _QWERTY 2
|
||||
#define _DVORAK 0
|
||||
#define _COLEMAK 1
|
||||
#define _WORKMAN 3
|
||||
#define _GAMING 4
|
||||
#define _NUMPAD 5
|
||||
#define _LOWER 6
|
||||
#define _RAISE 7
|
||||
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DVORAK,
|
||||
COLEMAK,
|
||||
WORKMAN,
|
||||
GAMING,
|
||||
NUMPAD,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
#define KC_XXXX KC_NO
|
||||
|
||||
#define KC_Sw2 RALT(KC_2) // Nordic @
|
||||
#define KC_Sw3 RALT(KC_3) // Nordic something
|
||||
#define KC_Sw4 RALT(KC_4) // Nordic something
|
||||
#define KC_Sw5 RALT(KC_5) // Nordic something
|
||||
#define KC_Sw6 RALT(KC_6) // ...
|
||||
#define KC_Sw7 RALT(KC_7)
|
||||
#define KC_Sw8 RALT(KC_8)
|
||||
#define KC_Sw9 RALT(KC_9)
|
||||
#define KC_Sw0 RALT(KC_0)
|
||||
#define KC_Tild RALT(KC_RBRC)
|
||||
#define KC_Bsls RALT(KC_MINS)
|
||||
#define KC_Bar RALT(KC_NUBS)
|
||||
#define KC_Less S(KC_NUBS)
|
||||
#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del
|
||||
#define KC_TSKMGR LCTL(S(KC_ESC)) // Ctrl shift esc
|
||||
#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in KC_keymaps
|
||||
#define KC_Close RALT(KC_F4) // Alt F4
|
||||
#define KC_Great S(KC_NUBS)
|
||||
#define KC_MEH1 MEH(KC_1)
|
||||
#define KC_MEH2 MEH(KC_2)
|
||||
#define KC_MEH3 MEH(KC_3)
|
||||
#define KC_MEH4 MEH(KC_4)
|
||||
#define KC_MEH5 MEH(KC_5)
|
||||
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
#define KC_RST RESET
|
||||
#define KC_BL_S BL_STEP
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,NUMP, ENT , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LOWR,BSPC, SPC ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_GAMING] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,ESC ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LCTL, A , S , D , F , G , H , J , K , L ,SCLN,RCTL,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , Y , ENT , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LOWR,SPC, BSPC ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_DVORAK] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
DEL ,APP ,VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB ,LBRC,QUOT,SCLN, P , Y , F , G , C , R , L ,DEL,
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
LCTL, A , O , E , U , I , D , H , T , N , S ,RCTL,
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
LSFT,DOT , Q , J , K , X ,NUMP, ENT , B , M , W , V , Z ,RSFT,
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
LALT,LOWR,BSPC, SPC ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_COLEMAK] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , F , P , G , J , L , U , Y ,LBRC,QUOT,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LCTL, A , R , S , T , D , H , N , E , I , O ,SCLN,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,NUMP, ENT , K , M ,COMM, DOT,SLSH,RSFT,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LOWR,BSPC, SPC ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_WORKMAN] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , R , W , B , J , F , U , P ,LBRC,SCLN,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LCTL, A , S , H , T , G , Y , N , E , O , I ,RCTL,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , M , C , V ,NUMP, ENT , K , L ,QUOT, DOT,SLSH,RSFT,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LOWR,BSPC, SPC ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_NUMPAD] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,MEH1,BTN2,MS_U,BTN1,CATDEL, PIPE, P7 , P8 , P9 ,SLSH, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,MEH4,MS_L,MS_D,MS_R,TSKMGR, COMM, P4 , P5 , P6 ,MINS, ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
,MEH5,ACL0,ACL1,ACL2,MEH3, , PENT,DOT , P1 , P2 , P3 , P0 , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LOWR,BSPC, , P0 ,NLCK
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,CAPS,PGUP, UP ,PGDN, ESC, RCBR,EXLM,ASTR,LPRN,UNDS, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,HOME,LEFT,DOWN,RGHT, END, RPRN,QUES,Sw8 ,Sw9 ,LABK, ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
, ENT, , , , DEL, , ,RABK,NUBS,Sw7 ,Sw0 ,Great, ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TILD,EXLM,GRV ,EQL, DLR ,PERC, Sw3 ,Sw5 ,Sw6 ,Sw0 ,RPRN, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,Bar ,Sw2 ,HASH, AT ,PERC, PIPE, 7 , 8 , 9 ,PMNS,PSLS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
,Bsls,Tild,SLSH,AMPR,BSLS, COMM, 4 , 5 , 6 ,PPLS,PAST,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
,PIPE,Sw4 ,PLUS,CIRC,TILD, , PENT,DOT , 1 , 2 , 3 , 0 ,PEQL,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, ,DEL , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_ADJUST] = KEYMAP(
|
||||
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||
GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______,LGUI(KC_UP),_______,LALT(KC_F4), _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, _______,LGUI(KC_LEFT),LGUI(KC_DOWN),LGUI(KC_RGHT),_______, _______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP,
|
||||
//|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// `--------+--------+--------' `--------+--------+--------'
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
// PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMPAD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
// PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_NUMPAD);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
// PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
// PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case GAMING:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
// PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_GAMING);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
6
keyboards/iris/keymaps/hag/rules.mk
Normal file
6
keyboards/iris/keymaps/hag/rules.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -85,15 +85,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -43,15 +43,6 @@ static matrix_row_t read_row(uint8_t row);
|
||||
static void unselect_rows(void);
|
||||
static void select_rows(uint8_t row);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -82,15 +82,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
28
keyboards/levinson/keymaps/losinggeneration/README.md
Normal file
28
keyboards/levinson/keymaps/losinggeneration/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
losinggeneration's Levinson Layout
|
||||
============================
|
||||
|
||||
See description of the layout in the common folder
|
||||
[here](../../../../users/losinggeneration/README.md)
|
||||
|
||||
## Features
|
||||
- Adjust
|
||||
- Removed AGSwap, AGNorm, & Del
|
||||
- Added Caps Lock, F1-F12 in a 4x3 grid, backlight control, arrow cluster,
|
||||
and layer transitions to the new layers.
|
||||
- Moved Reset & Audio control to the right side
|
||||
|
||||
## Layouts
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| CAPS | F9 | F10 | F11 | F12 |BL On ||Audoff| | | | Up | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | XXX | Left | Down |Right |
|
||||
`-----------------------------------------''-----------------------------------------'
|
||||
```
|
42
keyboards/levinson/keymaps/losinggeneration/config.h
Normal file
42
keyboards/levinson/keymaps/losinggeneration/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||
Copyright 2018 Harley Laue <losinggeneration@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
|
||||
long with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
/* #define USE_I2C */
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
/* #define _MASTER_RIGHT */
|
||||
/* #define EE_HANDS */
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
38
keyboards/levinson/keymaps/losinggeneration/keymap.c
Normal file
38
keyboards/levinson/keymaps/losinggeneration/keymap.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "losinggeneration-config.h"
|
||||
#include "losinggeneration-keymap.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = CATMAP( QWERTY_LAYER ),
|
||||
[_COLEMAK] = CATMAP( COLEMAK_LAYER ),
|
||||
[_WORKMAN] = CATMAP( WORKMAN_LAYER ),
|
||||
[_DVORAK] = CATMAP( DVORAK_LAYER ),
|
||||
[_GAME] = CATMAP( GAME_LAYER ),
|
||||
[_NUMPAD] = CATMAP( NUMPAD_LAYER ),
|
||||
[_MOUSE] = CATMAP( MOUSE_LAYER ),
|
||||
[_LOWER] = CATMAP( LOWER_LAYER ),
|
||||
[_RAISE] = CATMAP( RAISE_LAYER ),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------..-----------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | CAPS | F9 | F10 | F11 | F12 |BL On ||Audoff| | | | Up | |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | | | | | | || | | XXX | Left | Down |Right |
|
||||
* `-----------------------------------------''-----------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = CATMAP( \
|
||||
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, _______, \
|
||||
_______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , BL_TOGG, AU_ON , QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \
|
||||
KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , BL_ON , AU_OFF , _______, _______, _______, KC_UP , _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
)
|
||||
|
||||
};
|
||||
|
17
keyboards/levinson/keymaps/losinggeneration/rules.mk
Normal file
17
keyboards/levinson/keymaps/losinggeneration/rules.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
#
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -85,15 +85,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -34,15 +34,6 @@ static void init_rows(void);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -75,15 +75,6 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -60,15 +60,6 @@ static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -47,15 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
29
keyboards/nyquist/keymaps/losinggeneration/README.md
Normal file
29
keyboards/nyquist/keymaps/losinggeneration/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
losinggeneration's Nyquist Layout
|
||||
============================
|
||||
|
||||
See description of the layout in the common folder
|
||||
[here](../../../../users/losinggeneration/README.md)
|
||||
|
||||
## Features
|
||||
- Adjust
|
||||
- Removed AGSwap, AGNorm, & Del
|
||||
- Added Caps Lock, F1-F12 in a 4x3 grid, arrow cluster, and layer transitions
|
||||
to the new layers.
|
||||
|
||||
## Layouts
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| RESET|DEBUG | | | | || | | | | | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| CAPS | F9 | F10 | F11 | F12 | || | | | | Up | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | XXX | Left | Down |Right |
|
||||
`-----------------------------------------''-----------------------------------------'
|
||||
```
|
35
keyboards/nyquist/keymaps/losinggeneration/config.h
Normal file
35
keyboards/nyquist/keymaps/losinggeneration/config.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||
Copyright 2018 Harley Laue <losinggeneration@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
|
||||
long with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
/* #define USE_I2C */
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
/* #define _MASTER_RIGHT */
|
||||
/* #define EE_HANDS */
|
||||
|
||||
#endif
|
55
keyboards/nyquist/keymaps/losinggeneration/keymap.c
Normal file
55
keyboards/nyquist/keymaps/losinggeneration/keymap.c
Normal file
@@ -0,0 +1,55 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "losinggeneration-config.h"
|
||||
#include "losinggeneration-keymap.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define NUMBER_ROW \
|
||||
KC_GRV ,KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = CATMAP( NUMBER_ROW, QWERTY_LAYER ),
|
||||
[_COLEMAK] = CATMAP( NUMBER_ROW, COLEMAK_LAYER ),
|
||||
[_WORKMAN] = CATMAP( NUMBER_ROW, WORKMAN_LAYER ),
|
||||
[_DVORAK] = CATMAP( NUMBER_ROW, DVORAK_LAYER ),
|
||||
[_GAME] = CATMAP( NUMBER_ROW, GAME_LAYER ),
|
||||
[_NUMPAD] = CATMAP( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PAST, KC_PSLS, KC_BSPC, KC_BSPC, \
|
||||
NUMPAD_LAYER \
|
||||
),
|
||||
|
||||
[_MOUSE] = CATMAP( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
MOUSE_LAYER \
|
||||
),
|
||||
|
||||
[_LOWER] = CATMAP( \
|
||||
KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , \
|
||||
LOWER_LAYER \
|
||||
),
|
||||
|
||||
[_RAISE] = CATMAP(NUMBER_ROW, RAISE_LAYER ),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------..-----------------------------------------.
|
||||
* | RESET|DEBUG | | | | || | | | | | |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | CAPS | F9 | F10 | F11 | F12 | || | | | | Up | |
|
||||
* |------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
* | | | | | | || | | XXX | Left | Down |Right |
|
||||
* `-----------------------------------------''-----------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = CATMAP( \
|
||||
RESET , DEBUG , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, TO_GAME, TO_NUM , TO_MS , _______, _______, \
|
||||
_______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \
|
||||
KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
)
|
||||
};
|
||||
|
17
keyboards/nyquist/keymaps/losinggeneration/rules.mk
Normal file
17
keyboards/nyquist/keymaps/losinggeneration/rules.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
#
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -82,15 +82,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -33,15 +33,6 @@ static void init_rows(void);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -33,15 +33,6 @@ static void init_rows(void);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define C6_AUDIO
|
||||
#define STARTUP_SONG SONG(ZELDA_TREASURE)
|
||||
#define STARTUP_SONG SONG(IMPERIAL_MARCH)
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
|
@@ -31,49 +31,54 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define KC_MSHF OSM(MOD_LSFT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KEYMAP(\
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT,CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
[_QWERTY] = KEYMAP_wrapper(\
|
||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, \
|
||||
KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, \
|
||||
KC_LSFT, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI \
|
||||
),
|
||||
|
||||
[_COLEMAK] = KEYMAP(\
|
||||
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
|
||||
[_COLEMAK] = KEYMAP_wrapper(\
|
||||
KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, \
|
||||
KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, \
|
||||
KC_LSFT, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI \
|
||||
),
|
||||
|
||||
[_DVORAK] = KEYMAP(\
|
||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
[_DVORAK] = KEYMAP_wrapper(\
|
||||
KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, \
|
||||
KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, \
|
||||
KC_LSFT, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI \
|
||||
),
|
||||
[_WORKMAN] = KEYMAP(\
|
||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
KC_LSFT,CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||
[_WORKMAN] = KEYMAP_wrapper(\
|
||||
KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, \
|
||||
KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, \
|
||||
KC_LSFT, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI \
|
||||
),
|
||||
[_MODS] = KEYMAP(\
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
OSM(MOD_LSFT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP(\
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
|
||||
),
|
||||
|
||||
[_RAISE] = KEYMAP(\
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
|
||||
),
|
||||
|
||||
[_ADJUST] = KEYMAP(\
|
||||
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
||||
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), \
|
||||
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
||||
)
|
||||
|
||||
|
||||
|
@@ -7,5 +7,3 @@ TAP_DANCE_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
FAUXCLICKY_ENABLE = no
|
||||
USE_I2C = no
|
||||
|
@@ -64,15 +64,6 @@ static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
168
keyboards/planck/keymaps/jirgn/assets/layout.json
Normal file
168
keyboards/planck/keymaps/jirgn/assets/layout.json
Normal file
@@ -0,0 +1,168 @@
|
||||
[
|
||||
{
|
||||
"switchMount": "cherry",
|
||||
"switchBrand": "cherry",
|
||||
"switchType": "MX1A-C1xx",
|
||||
"pcb": true,
|
||||
"css": ".keylabel2 {\n color: #61ba5d !important;\n}\n.keylabel6 {\n color: #fa7a5f !important;\n}\n.keylabel8 {\n color: #7ab7f7 !important;\n}\n.keylabel7 {\n color: #999 !important;\n}"
|
||||
},
|
||||
[
|
||||
{
|
||||
"fa": [
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"\n~\n\n`\n\n\n\n\n\nTab",
|
||||
{
|
||||
"sm": "cherry",
|
||||
"sb": "cherry",
|
||||
"st": "MX1A-C1xx"
|
||||
},
|
||||
"\n!\n\n1\n\n\n\n\n\nQ",
|
||||
{
|
||||
"sm": "",
|
||||
"sb": "",
|
||||
"st": ""
|
||||
},
|
||||
"\n@\n\n2\n\n\n\n\n\nW",
|
||||
"\n#\n\n3\n\n\n\n\n\nE",
|
||||
"\n$\n\n4\n\n\n\n\n\nR",
|
||||
"\n%\n\n5\n\n\n\n\n\nT",
|
||||
"\n^\n\n6\n\n\n\n\n\nY",
|
||||
"\n&\n\n7\n\n\n\n\n\nU",
|
||||
"\n*\n\n8\n\n\n\n\n\nI",
|
||||
"\n(\n\n9\n\n\n\n\n\nO",
|
||||
"\n)\n\n0\n\n\n\n\n\nP",
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"<i class='mss mss-Unicode-BackSpace-DeleteLeft-Big-2'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"c": "#b8b8b8",
|
||||
"a": 5
|
||||
},
|
||||
"\n<i class='mss mss-Unicode-DeleteRight-Big-2'></i>\n\n\nCtrl\n\n<i class='mss mss-Unicode-Escape-3'></i>",
|
||||
{
|
||||
"c": "#61ba5d",
|
||||
"a": 4
|
||||
},
|
||||
"\n¡\n\nF1\nNav\n\n\n\n\nA",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"fa": [
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"\n™\nHome\nF2\n\n\n\n\n\nS",
|
||||
"\n€\nPg Up\nF3\n\n\n\n\n\nD",
|
||||
"\n¢\nPg Dn\nF4\n\n\n\n\n\nF",
|
||||
"\n∞\nEnd\nF5\n\n\n\n\n\nG",
|
||||
{
|
||||
"fa": [
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"\n§\n←\nF6\n\n\n\n\n\nH",
|
||||
"\n_\n↓\n-\n\n\n\n\n\nJ",
|
||||
"\n+\n↑\n=\n\n\n\n\n\nK",
|
||||
"\n{\n→\n[\n\n\n\n\n\nL",
|
||||
{
|
||||
"c": "#61ba5d",
|
||||
"fa": [
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
"\n}\n\n]\nNav\n\n\n:\n\n;",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"\n|\n\n\\\n\n\n\n\"\n\n'"
|
||||
],
|
||||
[
|
||||
{
|
||||
"c": "#b8b8b8",
|
||||
"a": 7
|
||||
},
|
||||
"Shift",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 4
|
||||
},
|
||||
"\n\n\nF7\n\n\n\n\n\nZ",
|
||||
"\n\n\nF8\n\n\n\n\n\nX",
|
||||
"\n\n\nF9\n\n\n\n\n\nC",
|
||||
"\n\n\nF10\n\n\n\n\n\nV",
|
||||
"\n\n\nF11\n\n\n\n\n\nB",
|
||||
"\n\n\nF12\n\n\n\n\n\nN",
|
||||
"\n~\n\n#\n\n\n\n\n\nM",
|
||||
"\n|\n\n/\n\n\n\n<\n\n,",
|
||||
{
|
||||
"a": 6
|
||||
},
|
||||
"\n\n>\n\n\n\n\n\n.",
|
||||
"\n\n?\n\n\n\n\n\n/",
|
||||
{
|
||||
"c": "#b8b8b8",
|
||||
"a": 7
|
||||
},
|
||||
"<i class='kb kb-Return-2'></i>\n\n\n\nShift"
|
||||
],
|
||||
[
|
||||
"",
|
||||
"Hyper",
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"<i class='mss mss-Unicode-Command-3'></i>",
|
||||
{
|
||||
"c": "#fa7a5f"
|
||||
},
|
||||
"⇓",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"w": 2
|
||||
},
|
||||
"",
|
||||
{
|
||||
"c": "#7ab7f7"
|
||||
},
|
||||
"⇑",
|
||||
{
|
||||
"c": "#b8b8b8"
|
||||
},
|
||||
"<i class='mss mss-Unicode-Command-3'></i>",
|
||||
"<i class='mss mss-Unicode-Option-3'></i>",
|
||||
"Hyper",
|
||||
""
|
||||
]
|
||||
]
|
42
keyboards/planck/keymaps/jirgn/config.h
Normal file
42
keyboards/planck/keymaps/jirgn/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#endif
|
221
keyboards/planck/keymaps/jirgn/keymap.c
Normal file
221
keyboards/planck/keymaps/jirgn/keymap.c
Normal file
@@ -0,0 +1,221 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
*
|
||||
* 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST,
|
||||
_NAVIGATION
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
PLOVER,
|
||||
LOWER,
|
||||
RAISE,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
// keycode aliases
|
||||
#define _______ KC_TRNS
|
||||
#define ___x___ KC_NO
|
||||
#define KC_EUR LALT(S(KC_2))
|
||||
#define KC_SEC LALT(KC_6)
|
||||
#define CTL_DEL CTL_T(KC_DEL)
|
||||
#define NAV_SCLN LT(_NAVIGATION, KC_SCLN)
|
||||
#define NAV_A LT(_NAVIGATION, KC_A)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* Tab for Esc--| Ctrl | A Nav| S | D | F | G | H | J | K | L | ; Nav| Ctrl |--Tab for "
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|--Tab for Enter
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Hyper| Alt | Super| Lower| Space | Raise| Super| ALt | Hyper| |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{CTL_T(KC_ESC), NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||
{___x___, KC_HYPR, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LGUI, KC_LALT, KC_HYPR, ___x___}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* Tab to Del---| Ctrl | ¡ | ™ | € | ¢ | ∞ | § | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | |ISO ~ |ISO | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
|
||||
{CTL_DEL, LALT(KC_1), LALT(KC_2), KC_EUR, LALT(KC_4), LALT(KC_5), LALT(KC_6), KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, S(KC_NUHS), S(KC_NUBS), _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* Tab to Del---| Ctrl | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{CTL_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
/* Navigation
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | HOME | PGUP | PGDN | END | LEFT | DOWN | UP | RIGHT| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NAVIGATION] = {
|
||||
{___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
|
||||
{_______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, _______, ___x___},
|
||||
{_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______},
|
||||
{___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, ___x___}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{___x___, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{___x___, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, ___x___, ___x___, KC_C, KC_V, ___x___, ___x___, KC_N, KC_M, ___x___, ___x___, ___x___}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Plover| | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
|
||||
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, PLOVER, _______, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false; break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false; break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false; break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false; break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false; break;
|
||||
}
|
||||
return true;
|
||||
}
|
5
keyboards/planck/keymaps/jirgn/readme.md
Normal file
5
keyboards/planck/keymaps/jirgn/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Jirgns Planck Layout
|
||||
|
||||
This layout was designed with [Layout Designer](http://www.keyboard-layout-editor.com/#/)
|
||||
|
||||
[Permalink to Layout](http://www.keyboard-layout-editor.com/##@_switchMount=cherry&switchBrand=cherry&switchType=MX1A-C1xx&pcb:true&css=.keylabel2%20%7B%0A%20%20%20%20color%2F:%20%2361ba5d%20!important%2F%3B%0A%7D%0A.keylabel6%20%7B%0A%20%20%20%20color%2F:%20%23fa7a5f%20!important%2F%3B%0A%7D%0A.keylabel8%20%7B%0A%20%20%20%20color%2F:%20%237ab7f7%20!important%2F%3B%0A%7D%0A.keylabel7%20%7B%0A%20%20%20%20color%2F:%20%23999%20!important%2F%3B%0A%7D%3B&@_fa@:0&:2&:0&:2%3B%3B&=%0A~%0A%0A%60%0A%0A%0A%0A%0A%0ATab&_sm=cherry&sb=cherry&st=MX1A-C1xx%3B&=%0A!%0A%0A1%0A%0A%0A%0A%0A%0AQ&=%0A%2F@%0A%0A2%0A%0A%0A%0A%0A%0AW&=%0A%23%0A%0A3%0A%0A%0A%0A%0A%0AE&=%0A$%0A%0A4%0A%0A%0A%0A%0A%0AR&=%0A%25%0A%0A5%0A%0A%0A%0A%0A%0AT&=%0A%5E%0A%0A6%0A%0A%0A%0A%0A%0AY&=%0A%2F&%0A%0A7%0A%0A%0A%0A%0A%0AU&=%0A*%0A%0A8%0A%0A%0A%0A%0A%0AI&=%0A(%0A%0A9%0A%0A%0A%0A%0A%0AO&=%0A)%0A%0A0%0A%0A%0A%0A%0A%0AP&_a:7%3B&=%3Ci%20class%2F='mss%20mss-Unicode-BackSpace-DeleteLeft-Big-2'%3E%3C%2F%2Fi%3E%3B&@_c=%23b8b8b8&a:5%3B&=%0A%3Ci%20class%2F='mss%20mss-Unicode-DeleteRight-Big-2'%3E%3C%2F%2Fi%3E%0A%0A%0ACtrl%0A%0A%3Ci%20class%2F='mss%20mss-Unicode-Escape-3'%3E%3C%2F%2Fi%3E&_c=%2361ba5d&a:4%3B&=%0A¡%0A%0AF1%0ANav%0A%0A%0A%0A%0AA&_c=%23cccccc&fa@:0&:2&:1&:2%3B%3B&=%0A™%0AHome%0AF2%0A%0A%0A%0A%0A%0AS&=%0A€%0APg%20Up%0AF3%0A%0A%0A%0A%0A%0AD&=%0A¢%0APg%20Dn%0AF4%0A%0A%0A%0A%0A%0AF&=%0A∞%0AEnd%0AF5%0A%0A%0A%0A%0A%0AG&_f2:2%3B&=%0A§%0A←%0AF6%0A%0A%0A%0A%0A%0AH&_f2:2%3B&=%0A%2F_%0A↓%0A-%0A%0A%0A%0A%0A%0AJ&_f2:2%3B&=%0A+%0A↑%0A%2F=%0A%0A%0A%0A%0A%0AK&_f2:2%3B&=%0A%7B%0A→%0A%5B%0A%0A%0A%0A%0A%0AL&_c=%2361ba5d&fa@:0&:2&:2&:2&:0&:2&:2&:2%3B%3B&=%0A%7D%0A%0A%5D%0ANav%0A%0A%0A%2F:%0A%0A%2F%3B&_c=%23cccccc%3B&=%0A%7C%0A%0A%5C%0A%0A%0A%0A%22%0A%0A'%3B&@_c=%23b8b8b8&a:7%3B&=Shift&_c=%23cccccc&a:4%3B&=%0A%0A%0AF7%0A%0A%0A%0A%0A%0AZ&=%0A%0A%0AF8%0A%0A%0A%0A%0A%0AX&=%0A%0A%0AF9%0A%0A%0A%0A%0A%0AC&=%0A%0A%0AF10%0A%0A%0A%0A%0A%0AV&=%0A%0A%0AF11%0A%0A%0A%0A%0A%0AB&=%0A%0A%0AF12%0A%0A%0A%0A%0A%0AN&=%0A~%0A%0A%23%0A%0A%0A%0A%0A%0AM&=%0A%7C%0A%0A%2F%2F%0A%0A%0A%0A%3C%0A%0A,&_a:6%3B&=%0A%0A%3E%0A%0A%0A%0A%0A%0A.&=%0A%0A%3F%0A%0A%0A%0A%0A%0A%2F%2F&_c=%23b8b8b8&a:7%3B&=%3Ci%20class%2F='kb%20kb-Return-2'%3E%3C%2F%2Fi%3E%0A%0A%0A%0AShift%3B&@=&=Hyper&=%3Ci%20class%2F='mss%20mss-Unicode-Option-3'%3E%3C%2F%2Fi%3E&=%3Ci%20class%2F='mss%20mss-Unicode-Command-3'%3E%3C%2F%2Fi%3E&_c=%23fa7a5f%3B&=%2F&dArr%2F%3B&_c=%23cccccc&w:2%3B&=&_c=%237ab7f7%3B&=%2F&uArr%2F%3B&_c=%23b8b8b8%3B&=%3Ci%20class%2F='mss%20mss-Unicode-Command-3'%3E%3C%2F%2Fi%3E&=%3Ci%20class%2F='mss%20mss-Unicode-Option-3'%3E%3C%2F%2Fi%3E&=Hyper&=)
|
3
keyboards/planck/keymaps/jirgn/rules.mk
Normal file
3
keyboards/planck/keymaps/jirgn/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
42
keyboards/planck/keymaps/kelorean/config.h
Normal file
42
keyboards/planck/keymaps/kelorean/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#endif
|
264
keyboards/planck/keymaps/kelorean/keymap.c
Normal file
264
keyboards/planck/keymaps/kelorean/keymap.c
Normal file
@@ -0,0 +1,264 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
*
|
||||
* 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Sft/En|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC},
|
||||
{KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||
{KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Esc |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |Sft/Es| Z | X | C | V | B | K | M | , | . | / |Sft/En|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC},
|
||||
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||
{KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
|
||||
},
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Esc |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | O | E | U | I | D | H | T | N | S | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |Sft/Es| ; | Q | J | K | X | B | M | W | V | Z |Sft/En|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_ESC},
|
||||
{KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)},
|
||||
{KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL },
|
||||
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
1
keyboards/planck/keymaps/kelorean/readme.md
Normal file
1
keyboards/planck/keymaps/kelorean/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The Default Planck Layout
|
0
keyboards/planck/keymaps/kelorean/rules.mk
Normal file
0
keyboards/planck/keymaps/kelorean/rules.mk
Normal file
150
keyboards/s65_x/keymaps/kelorean/keymap.c
Normal file
150
keyboards/s65_x/keymaps/kelorean/keymap.c
Normal file
@@ -0,0 +1,150 @@
|
||||
#include "s65_x.h"
|
||||
|
||||
#define _BL 0
|
||||
#define _CM 1
|
||||
#define _DV 2
|
||||
#define _AL 3
|
||||
#define _FL 4
|
||||
#define _UL 5
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* 0: Main layer, swapped alt and GUI for Mac
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │BKSPC│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
|
||||
/* 0: ANSI qwerty */
|
||||
[_BL] = ANSI_KEYMAP(
|
||||
KC_GESC, 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_DEL, \
|
||||
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_END, \
|
||||
F(4), 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_PGUP, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* 1: Colemak layer
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │█████│END │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │BKSPC│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
|
||||
/* 1: Colemak layer */
|
||||
[_CM] = ANSI_KEYMAP(
|
||||
KC_GESC, 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_DEL, \
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
|
||||
F(4), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
|
||||
/* 2: Dvorak layer
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│DEL │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ TAB │ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │█████│END │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │BKSPC│ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │▒▒▒▒▒│ENTER│█████│PG_UP│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LSHFT│▒▒▒▒▒│ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
|
||||
/* 2: Dvorak layer */
|
||||
[_DV] = ANSI_KEYMAP(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_END, \
|
||||
F(4), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* 3: Locking arrow keys to WASD for when you need dedicated arrow keys
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ │ Up │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
/* 3: Locking arrow keys to WASD*/
|
||||
[_AL] = ANSI_KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* 4: Fn layer
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │▒▒▒▒▒│_UL │ │_CM │_DV │ │ │ │ │Home │End │▒▒▒▒▒│ │Vol+ │ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
|
||||
[_FL] = ANSI_KEYMAP(
|
||||
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
|
||||
_______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \
|
||||
_______, F(5), _______, F(1), F(2), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY),
|
||||
|
||||
/* 5: Locking layer for controlling the underglow
|
||||
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ On │Mode │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │▒▒▒▒▒│ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
* │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
|
||||
* └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
*/
|
||||
|
||||
[_UL] = ANSI_KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay
|
||||
[1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay
|
||||
[2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay
|
||||
[3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay
|
||||
[4] = ACTION_LAYER_TAP_KEY(_FL, KC_BSPC), // Tap to Backspace and hold to activate function layer
|
||||
[5] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay
|
||||
|
||||
};
|
76
keyboards/s65_x/keymaps/kelorean/readme.md
Normal file
76
keyboards/s65_x/keymaps/kelorean/readme.md
Normal file
@@ -0,0 +1,76 @@
|
||||
### 1 ANSI
|
||||
A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys, Arrow layer, FN layers and Lighting functions layer...
|
||||
I added Colemak and Dvorak layer as layer 1 & 2 under base QWERTY layer.
|
||||
|
||||
#### 1.0 Default layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │▒▒▒▒▒│END │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│BKSPC│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│▒▒▒▒▒│PG_UP│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
#### 1.1: Colemak layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │█████│END │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│BKSPC│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
#### 1.2: Dvorak layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│DEL │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ TAB │ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │█████│END │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│BKSPC│ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │▒▒▒▒▒│ENTER│█████│PG_UP│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LSHFT│▒▒▒▒▒│ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │▒▒▒▒▒│RSHFT│ UP │PG_DN│
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
#### 1.3 Arrow layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ │ Up │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
#### 1.4 Fn layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │▒▒▒▒▒│_UL │ │_CM │_DV │ │ │ │Home │ End │ │▒▒▒▒▒│▒▒▒▒▒│Vol+ │ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
||||
#### 1.5 Underglow layer
|
||||
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||
│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ On │Mode │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │▒▒▒▒▒│ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │
|
||||
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||
│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │
|
||||
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
|
@@ -23,4 +23,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
/* Map RXLED to USB_LED_NUM_LOCK */
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
|
||||
} else {
|
||||
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
|
||||
}
|
||||
|
||||
/* Map TXLED to USB_LED_CAPS_LOCK */
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
|
||||
} else {
|
||||
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
[3] = KEYMAP_ARROW_COMMAND( /* LAYER 3 */
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
@@ -34,7 +34,7 @@ I don't want to be using two key combos constantly, so I also added this symbol
|
||||
I very rarely use Fkeys, but figured I'd throw them on anyway just in case. The setup basically mimics the way Fkeys are usually done on a 60%, with F11 and F12 still on - and =, even though the location of those keys has moved.
|
||||
```
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 | |
|
||||
| | | | | | | | | |F11 |F12 | |
|
||||
| | | | | | | | |F11 |F12 | | |
|
||||
| | | | | | | | | | | | |
|
||||
| | | | | | | | | | |
|
||||
```
|
||||
|
@@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
UNDS, ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,LCBR,RCBR,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,PLUS,LCBR,RCBR, , ,
|
||||
PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR, , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , F7 , F8 , F9 ,F10 ,F11 , F12 , , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
@@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
UNDS, , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,LCBR,RCBR,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,PLUS,LBRC,RBRC, , ,
|
||||
PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC, , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
|
@@ -82,15 +82,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
|
29
keyboards/zen/config.h
Normal file
29
keyboards/zen/config.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.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"
|
||||
|
||||
#endif // CONFIG_H
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 16
|
||||
|
||||
#define TAPPING_TERM 100
|
41
keyboards/zen/keymaps/default/config.h
Normal file
41
keyboards/zen/keymaps/default/config.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.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_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
103
keyboards/zen/keymaps/default/keymap.c
Normal file
103
keyboards/zen/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,103 @@
|
||||
#include "zen.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _NAV 2
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
NAV,
|
||||
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. .-----------------------------------------.
|
||||
* | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------..-----+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |RGBTOG| NAV |Space |Delete||Enter|Space | NAV | - | = | PGUP | PGDN |
|
||||
* `------------------------------------------------''-----------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
|
||||
LT(_NAV, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_DEL, KC_ENT, KC_SPACE, MO(_NAV), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN \
|
||||
),
|
||||
|
||||
/* NAV
|
||||
* ,-----------------------------------------. .-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |RGBSAI|RGBVAI|RGBSAD| RESET| [ | | ] | Pgup | Up | Pgdn |Insert| Home |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |RGBHUD|RGBVAD|RGBHUI| | | | | Left | Down | Right|Delete| End |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |Shift | | | | | | | NKRO | | | Pause| Back | Next |
|
||||
* |------+------+------+------+------+------+------..-----+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |RGBMOD| | | || | | | | Mute | VOLUP| VOLDN|
|
||||
* `------------------------------------------------''-----------------------------------------------'
|
||||
*/
|
||||
[_NAV] = KEYMAP( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , \
|
||||
KC_TRNS, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME , \
|
||||
KC_TRNS, RGB_HUD, RGB_VAD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END , \
|
||||
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT , \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_VOLD \
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
#endif
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//case COLEMAK:
|
||||
//if (record->event.pressed) {
|
||||
//#ifdef AUDIO_ENABLE
|
||||
//PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||
//#endif
|
||||
//persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
//}
|
||||
//return false;
|
||||
//break;
|
||||
}
|
||||
return true;
|
||||
}
|
6
keyboards/zen/keymaps/default/rules.mk
Normal file
6
keyboards/zen/keymaps/default/rules.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
466
keyboards/zen/matrix.c
Normal file
466
keyboards/zen/matrix.c
Normal file
@@ -0,0 +1,466 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* scan matrix
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "split_util.h"
|
||||
#include "pro_micro.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
#include "backlight.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
#else // USE_SERIAL
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
|
||||
#if (DEBOUNCING_DELAY > 0)
|
||||
static uint16_t debouncing_time;
|
||||
static bool debouncing = false;
|
||||
#endif
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#else
|
||||
# error "Currently only supports 8 COLS"
|
||||
#endif
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
#define ERROR_DISCONNECT_COUNT 5
|
||||
|
||||
#define SERIAL_LED_ADDR 0x00
|
||||
|
||||
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||
|
||||
static uint8_t error_count = 0;
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
static void init_cols(void);
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static void unselect_row(uint8_t row);
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
static void init_rows(void);
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||
static void unselect_cols(void);
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void)
|
||||
{
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void)
|
||||
{
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
debug_enable = true;
|
||||
debug_matrix = true;
|
||||
debug_mouse = true;
|
||||
// initialize row and col
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
uint8_t _matrix_scan(void)
|
||||
{
|
||||
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
|
||||
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
PORTD ^= (1 << 2);
|
||||
}
|
||||
|
||||
# else
|
||||
read_cols_on_row(matrix+offset, current_row);
|
||||
# endif
|
||||
|
||||
}
|
||||
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
# else
|
||||
read_rows_on_col(matrix+offset, current_col);
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
# endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef USE_I2C
|
||||
|
||||
// Get rows from other half over i2c
|
||||
int i2c_transaction(void) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
|
||||
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// start of matrix stored at 0x00
|
||||
err = i2c_master_write(0x00);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
// Start read
|
||||
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||
if (err) goto i2c_error;
|
||||
|
||||
if (!err) {
|
||||
int i;
|
||||
for (i = 0; i < ROWS_PER_HAND-1; ++i) {
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
|
||||
}
|
||||
matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
|
||||
i2c_master_stop();
|
||||
} else {
|
||||
i2c_error: // the cable is disconnceted, or something else went wrong
|
||||
i2c_reset_state();
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // USE_SERIAL
|
||||
|
||||
int serial_transaction(void) {
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
|
||||
if (serial_update_buffers()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||
}
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
// Write backlight level for slave to read
|
||||
serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
uint8_t ret = _matrix_scan();
|
||||
|
||||
#ifdef USE_I2C
|
||||
if( i2c_transaction() ) {
|
||||
#else // USE_SERIAL
|
||||
if( serial_transaction() ) {
|
||||
#endif
|
||||
// turn on the indicator led when halves are disconnected
|
||||
TXLED1;
|
||||
|
||||
error_count++;
|
||||
|
||||
if (error_count > ERROR_DISCONNECT_COUNT) {
|
||||
// reset other half if disconnected
|
||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// turn off the indicator led on no error
|
||||
TXLED0;
|
||||
error_count = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void matrix_slave_scan(void) {
|
||||
_matrix_scan();
|
||||
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
#ifdef USE_I2C
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
i2c_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#else // USE_SERIAL
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
serial_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
// Read backlight level sent from master and update level on slave
|
||||
backlight_set(serial_master_buffer[SERIAL_LED_ADDR]);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debouncing) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEF\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
pbin_reverse16(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop16(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
|
||||
static void init_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||
{
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[current_row];
|
||||
|
||||
// Clear data in matrix row
|
||||
current_matrix[current_row] = 0;
|
||||
|
||||
// Select row and wait for row selecton to stabilize
|
||||
select_row(current_row);
|
||||
wait_us(30);
|
||||
|
||||
// For each col...
|
||||
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
|
||||
// Select the col pin to read (active low)
|
||||
uint8_t pin = col_pins[col_index];
|
||||
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
|
||||
|
||||
// Populate the matrix row with the state of the col pin
|
||||
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_row(uint8_t row)
|
||||
{
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
|
||||
static void init_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
|
||||
{
|
||||
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[row_index];
|
||||
|
||||
// Check row pin state
|
||||
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
12
keyboards/zen/readme.md
Normal file
12
keyboards/zen/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
Zen Keyboard
|
||||
====
|
||||
|
||||
A split ergo keyboard with a few goals in mind:
|
||||
- Be as thin as possible. Other split KBs (Let's Split, Nyquist, Iris) are 15.2mm thick. The Zen is only 8.0mm thick.
|
||||
- Layout designed for gaming. 1.5u pinky keys, ortho alphas, and angled thumb keys. After trying Ortholiniear, Atreus62, and Ergodox, this is the best layout for gaming and typing.
|
||||
- RGB backlighting. 16 WS2812b LEDs shine through the perimeter switches. The SK6812 variant are cheap and easy to solder.
|
||||
- Price. Using Arduino Pro Micro, SK6812 LEDs, and PCB FR4 for the case, the cost of each half without switches or caps can be reduced to under $20 when purchased at volume.
|
||||
|
||||
A build guide and more info for this keyboard can be found here: [Zen Build Guide](https://legonut.gitbooks.io/zen-keyboard/content/)
|
||||
|
||||
Maintained by u/legonut3
|
91
keyboards/zen/rev1/config.h
Normal file
91
keyboards/zen/rev1/config.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef REV1_CONFIG_H
|
||||
#define REV1_CONFIG_H
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x1256
|
||||
#define DEVICE_VER 0x0200
|
||||
#define MANUFACTURER Legonut
|
||||
#define PRODUCT Project Zen
|
||||
#define DESCRIPTION Split gaming keyboard
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { B2, B3, B1, F7, F6, D4, B6 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define 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)) \
|
||||
)
|
||||
|
||||
#define BACKLIGHT_PIN F4
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D1
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
/*
|
||||
* 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
|
22
keyboards/zen/rev1/rev1.c
Normal file
22
keyboards/zen/rev1/rev1.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "rev1.h"
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
|
||||
// // orange led on
|
||||
// DDRB |= (1<<0);
|
||||
// PORTB &= ~(1<<0);
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
40
keyboards/zen/rev1/rev1.h
Normal file
40
keyboards/zen/rev1/rev1.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef REV1_H
|
||||
#define REV1_H
|
||||
|
||||
#include "zen.h"
|
||||
|
||||
//void promicro_bootloader_jmp(bool program);
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#ifdef USE_I2C
|
||||
#include <stddef.h>
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//void promicro_bootloader_jmp(bool program);
|
||||
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \
|
||||
k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \
|
||||
k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \
|
||||
k30, k31, k32, k33, k34, k35, k85, k84, k83, k82, k81, k80, \
|
||||
k40, k41, k42, k43, k44, k45, k46, k96, k95, k94, k93, k92, k91, k90 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, KC_NO }, \
|
||||
{ k10, k11, k12, k13, k14, k15, KC_NO }, \
|
||||
{ k20, k21, k22, k23, k24, k25, KC_NO }, \
|
||||
{ k30, k31, k32, k33, k34, k35, KC_NO }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46 }, \
|
||||
{ k50, k51, k52, k53, k54, k55, KC_NO }, \
|
||||
{ k60, k61, k62, k63, k64, k65, KC_NO }, \
|
||||
{ k70, k71, k72, k73, k74, k75, KC_NO }, \
|
||||
{ k80, k81, k82, k83, k84, k85, KC_NO }, \
|
||||
{ k90, k91, k92, k93, k94, k95, k96 } \
|
||||
}
|
||||
|
||||
#endif
|
2
keyboards/zen/rev1/rules.mk
Normal file
2
keyboards/zen/rev1/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
73
keyboards/zen/rules.mk
Normal file
73
keyboards/zen/rules.mk
Normal file
@@ -0,0 +1,73 @@
|
||||
SRC += matrix.c \
|
||||
split_util.c \
|
||||
serial.c
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SUBPROJECT_rev1 = yes
|
||||
USE_I2C = 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
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
DEFAULT_FOLDER = zen/rev1
|
228
keyboards/zen/serial.c
Normal file
228
keyboards/zen/serial.c
Normal file
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
* WARNING: be careful changing this code, it is very timing dependent
|
||||
*/
|
||||
|
||||
#ifndef F_CPU
|
||||
#define F_CPU 16000000
|
||||
#endif
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdbool.h>
|
||||
#include "serial.h"
|
||||
|
||||
#ifndef USE_I2C
|
||||
|
||||
// Serial pulse period in microseconds. Its probably a bad idea to lower this
|
||||
// value.
|
||||
#define SERIAL_DELAY 24
|
||||
|
||||
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
|
||||
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
|
||||
|
||||
#define SLAVE_DATA_CORRUPT (1<<0)
|
||||
volatile uint8_t status = 0;
|
||||
|
||||
inline static
|
||||
void serial_delay(void) {
|
||||
_delay_us(SERIAL_DELAY);
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_output(void) {
|
||||
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
// make the serial pin an input with pull-up resistor
|
||||
inline static
|
||||
void serial_input(void) {
|
||||
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static
|
||||
uint8_t serial_read_pin(void) {
|
||||
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_low(void) {
|
||||
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
inline static
|
||||
void serial_high(void) {
|
||||
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
|
||||
}
|
||||
|
||||
void serial_master_init(void) {
|
||||
serial_output();
|
||||
serial_high();
|
||||
}
|
||||
|
||||
void serial_slave_init(void) {
|
||||
serial_input();
|
||||
|
||||
// Enable INT0
|
||||
EIMSK |= _BV(INT0);
|
||||
// Trigger on falling edge of INT0
|
||||
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
|
||||
}
|
||||
|
||||
// Used by the master to synchronize timing with the slave.
|
||||
static
|
||||
void sync_recv(void) {
|
||||
serial_input();
|
||||
// This shouldn't hang if the slave disconnects because the
|
||||
// serial line will float to high if the slave does disconnect.
|
||||
while (!serial_read_pin());
|
||||
serial_delay();
|
||||
}
|
||||
|
||||
// Used by the slave to send a synchronization signal to the master.
|
||||
static
|
||||
void sync_send(void) {
|
||||
serial_output();
|
||||
|
||||
serial_low();
|
||||
serial_delay();
|
||||
|
||||
serial_high();
|
||||
}
|
||||
|
||||
// Reads a byte from the serial line
|
||||
static
|
||||
uint8_t serial_read_byte(void) {
|
||||
uint8_t byte = 0;
|
||||
serial_input();
|
||||
for ( uint8_t i = 0; i < 8; ++i) {
|
||||
byte = (byte << 1) | serial_read_pin();
|
||||
serial_delay();
|
||||
_delay_us(1);
|
||||
}
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
// Sends a byte with MSB ordering
|
||||
static
|
||||
void serial_write_byte(uint8_t data) {
|
||||
uint8_t b = 8;
|
||||
serial_output();
|
||||
while( b-- ) {
|
||||
if(data & (1 << b)) {
|
||||
serial_high();
|
||||
} else {
|
||||
serial_low();
|
||||
}
|
||||
serial_delay();
|
||||
}
|
||||
}
|
||||
|
||||
// interrupt handle to be used by the slave device
|
||||
ISR(SERIAL_PIN_INTERRUPT) {
|
||||
sync_send();
|
||||
|
||||
uint8_t checksum = 0;
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_slave_buffer[i]);
|
||||
sync_send();
|
||||
checksum += serial_slave_buffer[i];
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_send();
|
||||
|
||||
// wait for the sync to finish sending
|
||||
serial_delay();
|
||||
|
||||
// read the middle of pulses
|
||||
_delay_us(SERIAL_DELAY/2);
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_master_buffer[i] = serial_read_byte();
|
||||
sync_send();
|
||||
checksum_computed += serial_master_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_send();
|
||||
|
||||
serial_input(); // end transaction
|
||||
|
||||
if ( checksum_computed != checksum_received ) {
|
||||
status |= SLAVE_DATA_CORRUPT;
|
||||
} else {
|
||||
status &= ~SLAVE_DATA_CORRUPT;
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
bool serial_slave_DATA_CORRUPT(void) {
|
||||
return status & SLAVE_DATA_CORRUPT;
|
||||
}
|
||||
|
||||
// Copies the serial_slave_buffer to the master and sends the
|
||||
// serial_master_buffer to the slave.
|
||||
//
|
||||
// Returns:
|
||||
// 0 => no error
|
||||
// 1 => slave did not respond
|
||||
int serial_update_buffers(void) {
|
||||
// this code is very time dependent, so we need to disable interrupts
|
||||
cli();
|
||||
|
||||
// signal to the slave that we want to start a transaction
|
||||
serial_output();
|
||||
serial_low();
|
||||
_delay_us(1);
|
||||
|
||||
// wait for the slaves response
|
||||
serial_input();
|
||||
serial_high();
|
||||
_delay_us(SERIAL_DELAY);
|
||||
|
||||
// check if the slave is present
|
||||
if (serial_read_pin()) {
|
||||
// slave failed to pull the line low, assume not present
|
||||
sei();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// if the slave is present syncronize with it
|
||||
sync_recv();
|
||||
|
||||
uint8_t checksum_computed = 0;
|
||||
// receive data from the slave
|
||||
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
|
||||
serial_slave_buffer[i] = serial_read_byte();
|
||||
sync_recv();
|
||||
checksum_computed += serial_slave_buffer[i];
|
||||
}
|
||||
uint8_t checksum_received = serial_read_byte();
|
||||
sync_recv();
|
||||
|
||||
if (checksum_computed != checksum_received) {
|
||||
sei();
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t checksum = 0;
|
||||
// send data to the slave
|
||||
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
|
||||
serial_write_byte(serial_master_buffer[i]);
|
||||
sync_recv();
|
||||
checksum += serial_master_buffer[i];
|
||||
}
|
||||
serial_write_byte(checksum);
|
||||
sync_recv();
|
||||
|
||||
// always, release the line when not in use
|
||||
serial_output();
|
||||
serial_high();
|
||||
|
||||
sei();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
26
keyboards/zen/serial.h
Normal file
26
keyboards/zen/serial.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef MY_SERIAL_H
|
||||
#define MY_SERIAL_H
|
||||
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/* TODO: some defines for interrupt setup */
|
||||
#define SERIAL_PIN_DDR DDRD
|
||||
#define SERIAL_PIN_PORT PORTD
|
||||
#define SERIAL_PIN_INPUT PIND
|
||||
#define SERIAL_PIN_MASK _BV(PD0)
|
||||
#define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
|
||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
|
||||
#define SERIAL_MASTER_BUFFER_LENGTH 1
|
||||
|
||||
// Buffers for master - slave communication
|
||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
|
||||
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
|
||||
|
||||
void serial_master_init(void);
|
||||
void serial_slave_init(void);
|
||||
int serial_update_buffers(void);
|
||||
bool serial_slave_data_corrupt(void);
|
||||
|
||||
#endif
|
41
keyboards/zen/split_rgb.c
Normal file
41
keyboards/zen/split_rgb.c
Normal file
@@ -0,0 +1,41 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "split_util.h"
|
||||
#include "progmem.h"
|
||||
#include "print.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
#else // USE_SERIAL
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
|
||||
rgblight_config_t rgblight_config;
|
||||
|
||||
void rgblight_slave_update(void) {
|
||||
//rgblight_effect_christmas();
|
||||
}
|
||||
|
||||
|
||||
void rgblight_set(void) {
|
||||
if (rgblight_config.enable) {
|
||||
#ifdef RGBW
|
||||
ws2812_setleds_rgbw(led, RGBLED_NUM);
|
||||
#else
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
#endif
|
||||
} else {
|
||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||
led[i].r = 0;
|
||||
led[i].g = 0;
|
||||
led[i].b = 0;
|
||||
}
|
||||
#ifdef RGBW
|
||||
ws2812_setleds_rgbw(led, RGBLED_NUM);
|
||||
#else
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
#endif
|
||||
}
|
||||
}
|
6
keyboards/zen/split_rgb.h
Normal file
6
keyboards/zen/split_rgb.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef SPLIT_RGB_H
|
||||
#define SPLIT_RGB_H
|
||||
|
||||
void rgblight_slave_update(void);
|
||||
|
||||
#endif
|
86
keyboards/zen/split_util.c
Normal file
86
keyboards/zen/split_util.c
Normal file
@@ -0,0 +1,86 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "split_util.h"
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
#else
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
volatile bool isLeftHand = true;
|
||||
|
||||
static void setup_handedness(void) {
|
||||
#ifdef EE_HANDS
|
||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||
#else
|
||||
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
||||
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||
isLeftHand = !has_usb();
|
||||
#else
|
||||
isLeftHand = has_usb();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_master_setup(void) {
|
||||
#ifdef USE_I2C
|
||||
i2c_master_init();
|
||||
#ifdef SSD1306OLED
|
||||
matrix_master_OLED_init ();
|
||||
#endif
|
||||
#else
|
||||
serial_master_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_slave_setup(void) {
|
||||
timer_init();
|
||||
#ifdef USE_I2C
|
||||
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||
#else
|
||||
serial_slave_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool has_usb(void) {
|
||||
USBCON |= (1 << OTGPADE); //enables VBUS pad
|
||||
_delay_us(5);
|
||||
return (USBSTA & (1<<VBUS)); //checks state of VBUS
|
||||
}
|
||||
|
||||
void split_keyboard_setup(void) {
|
||||
setup_handedness();
|
||||
|
||||
if (has_usb()) {
|
||||
keyboard_master_setup();
|
||||
} else {
|
||||
keyboard_slave_setup();
|
||||
}
|
||||
sei();
|
||||
}
|
||||
|
||||
void keyboard_slave_loop(void) {
|
||||
matrix_init();
|
||||
|
||||
while (1) {
|
||||
matrix_slave_scan();
|
||||
}
|
||||
}
|
||||
|
||||
// this code runs before the usb and keyboard is initialized
|
||||
void matrix_setup(void) {
|
||||
split_keyboard_setup();
|
||||
|
||||
if (!has_usb()) {
|
||||
keyboard_slave_loop();
|
||||
}
|
||||
}
|
20
keyboards/zen/split_util.h
Normal file
20
keyboards/zen/split_util.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef SPLIT_KEYBOARD_UTIL_H
|
||||
#define SPLIT_KEYBOARD_UTIL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "eeconfig.h"
|
||||
|
||||
#define SLAVE_I2C_ADDRESS 0x32
|
||||
|
||||
extern volatile bool isLeftHand;
|
||||
|
||||
// slave version of matix scan, defined in matrix.c
|
||||
void matrix_slave_scan(void);
|
||||
|
||||
void split_keyboard_setup(void);
|
||||
bool has_usb(void);
|
||||
void keyboard_slave_loop(void);
|
||||
|
||||
void matrix_master_OLED_init (void);
|
||||
|
||||
#endif
|
1
keyboards/zen/zen.c
Normal file
1
keyboards/zen/zen.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "zen.h"
|
23
keyboards/zen/zen.h
Normal file
23
keyboards/zen/zen.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef ZEN_H
|
||||
#define ZEN_H
|
||||
|
||||
#include "rev1.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
L00, L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, R06,\
|
||||
L10, L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, R16,\
|
||||
L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26,\
|
||||
L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36,\
|
||||
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
||||
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46, \
|
||||
)
|
||||
|
||||
#endif
|
Submodule lib/chibios updated: 8fce03b3a7...e26cb16a72
Submodule lib/chibios-contrib updated: cc401cf017...432bc1762f
@@ -77,23 +77,48 @@ bool glissando = true;
|
||||
#endif
|
||||
float startup_song[][2] = STARTUP_SONG;
|
||||
|
||||
static void gpt_cb6(GPTDriver *gptp);
|
||||
static void gpt_cb7(GPTDriver *gptp);
|
||||
static void gpt_cb8(GPTDriver *gptp);
|
||||
|
||||
#define DAC_BUFFER_SIZE 360
|
||||
|
||||
#define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \
|
||||
gptStartContinuous(&GPTD6, 2U)
|
||||
#define START_CHANNEL_2() gptStart(&GPTD7, &gpt7cfg1); \
|
||||
gptStartContinuous(&GPTD7, 2U)
|
||||
#define STOP_CHANNEL_1() gptStopTimer(&GPTD6)
|
||||
#define STOP_CHANNEL_2() gptStopTimer(&GPTD7)
|
||||
#define RESTART_CHANNEL_1() STOP_CHANNEL_1(); \
|
||||
START_CHANNEL_1()
|
||||
#define RESTART_CHANNEL_2() STOP_CHANNEL_2(); \
|
||||
START_CHANNEL_2()
|
||||
#define UPDATE_CHANNEL_1_FREQ(freq) gpt6cfg1.frequency = freq * DAC_BUFFER_SIZE; \
|
||||
RESTART_CHANNEL_1()
|
||||
#define UPDATE_CHANNEL_2_FREQ(freq) gpt7cfg1.frequency = freq * DAC_BUFFER_SIZE; \
|
||||
RESTART_CHANNEL_2()
|
||||
#define GET_CHANNEL_1_FREQ gpt6cfg1.frequency
|
||||
#define GET_CHANNEL_2_FREQ gpt7cfg1.frequency
|
||||
|
||||
|
||||
/*
|
||||
* GPT6 configuration.
|
||||
*/
|
||||
// static const GPTConfig gpt6cfg1 = {
|
||||
// .frequency = 1000000U,
|
||||
// .callback = NULL,
|
||||
// .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */
|
||||
// .dier = 0U
|
||||
// };
|
||||
|
||||
GPTConfig gpt6cfg1 = {
|
||||
.frequency = 440,
|
||||
.callback = gpt_cb6,
|
||||
.frequency = 440U*DAC_BUFFER_SIZE,
|
||||
.callback = NULL,
|
||||
.cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */
|
||||
.dier = 0U
|
||||
};
|
||||
|
||||
GPTConfig gpt7cfg1 = {
|
||||
.frequency = 440,
|
||||
.callback = gpt_cb7,
|
||||
.frequency = 440U*DAC_BUFFER_SIZE,
|
||||
.callback = NULL,
|
||||
.cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */
|
||||
.dier = 0U
|
||||
};
|
||||
@@ -105,15 +130,169 @@ GPTConfig gpt8cfg1 = {
|
||||
.dier = 0U
|
||||
};
|
||||
|
||||
static void gpt_cb6(GPTDriver *gptp) {
|
||||
palTogglePad(GPIOA, 4);
|
||||
|
||||
/*
|
||||
* DAC test buffer (sine wave).
|
||||
*/
|
||||
// static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = {
|
||||
// 2047, 2082, 2118, 2154, 2189, 2225, 2260, 2296, 2331, 2367, 2402, 2437,
|
||||
// 2472, 2507, 2542, 2576, 2611, 2645, 2679, 2713, 2747, 2780, 2813, 2846,
|
||||
// 2879, 2912, 2944, 2976, 3008, 3039, 3070, 3101, 3131, 3161, 3191, 3221,
|
||||
// 3250, 3278, 3307, 3335, 3362, 3389, 3416, 3443, 3468, 3494, 3519, 3544,
|
||||
// 3568, 3591, 3615, 3637, 3660, 3681, 3703, 3723, 3744, 3763, 3782, 3801,
|
||||
// 3819, 3837, 3854, 3870, 3886, 3902, 3917, 3931, 3944, 3958, 3970, 3982,
|
||||
// 3993, 4004, 4014, 4024, 4033, 4041, 4049, 4056, 4062, 4068, 4074, 4078,
|
||||
// 4082, 4086, 4089, 4091, 4092, 4093, 4094, 4093, 4092, 4091, 4089, 4086,
|
||||
// 4082, 4078, 4074, 4068, 4062, 4056, 4049, 4041, 4033, 4024, 4014, 4004,
|
||||
// 3993, 3982, 3970, 3958, 3944, 3931, 3917, 3902, 3886, 3870, 3854, 3837,
|
||||
// 3819, 3801, 3782, 3763, 3744, 3723, 3703, 3681, 3660, 3637, 3615, 3591,
|
||||
// 3568, 3544, 3519, 3494, 3468, 3443, 3416, 3389, 3362, 3335, 3307, 3278,
|
||||
// 3250, 3221, 3191, 3161, 3131, 3101, 3070, 3039, 3008, 2976, 2944, 2912,
|
||||
// 2879, 2846, 2813, 2780, 2747, 2713, 2679, 2645, 2611, 2576, 2542, 2507,
|
||||
// 2472, 2437, 2402, 2367, 2331, 2296, 2260, 2225, 2189, 2154, 2118, 2082,
|
||||
// 2047, 2012, 1976, 1940, 1905, 1869, 1834, 1798, 1763, 1727, 1692, 1657,
|
||||
// 1622, 1587, 1552, 1518, 1483, 1449, 1415, 1381, 1347, 1314, 1281, 1248,
|
||||
// 1215, 1182, 1150, 1118, 1086, 1055, 1024, 993, 963, 933, 903, 873,
|
||||
// 844, 816, 787, 759, 732, 705, 678, 651, 626, 600, 575, 550,
|
||||
// 526, 503, 479, 457, 434, 413, 391, 371, 350, 331, 312, 293,
|
||||
// 275, 257, 240, 224, 208, 192, 177, 163, 150, 136, 124, 112,
|
||||
// 101, 90, 80, 70, 61, 53, 45, 38, 32, 26, 20, 16,
|
||||
// 12, 8, 5, 3, 2, 1, 0, 1, 2, 3, 5, 8,
|
||||
// 12, 16, 20, 26, 32, 38, 45, 53, 61, 70, 80, 90,
|
||||
// 101, 112, 124, 136, 150, 163, 177, 192, 208, 224, 240, 257,
|
||||
// 275, 293, 312, 331, 350, 371, 391, 413, 434, 457, 479, 503,
|
||||
// 526, 550, 575, 600, 626, 651, 678, 705, 732, 759, 787, 816,
|
||||
// 844, 873, 903, 933, 963, 993, 1024, 1055, 1086, 1118, 1150, 1182,
|
||||
// 1215, 1248, 1281, 1314, 1347, 1381, 1415, 1449, 1483, 1518, 1552, 1587,
|
||||
// 1622, 1657, 1692, 1727, 1763, 1798, 1834, 1869, 1905, 1940, 1976, 2012
|
||||
// };
|
||||
|
||||
// squarewave
|
||||
static const dacsample_t dac_buffer[DAC_BUFFER_SIZE] = {
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
// squarewave
|
||||
static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = {
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
|
||||
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
/*
|
||||
* DAC streaming callback.
|
||||
*/
|
||||
size_t nx = 0, ny = 0, nz = 0;
|
||||
static void end_cb1(DACDriver *dacp, dacsample_t *buffer, size_t n) {
|
||||
|
||||
(void)dacp;
|
||||
|
||||
nz++;
|
||||
if (dac_buffer == buffer) {
|
||||
nx += n;
|
||||
}
|
||||
else {
|
||||
ny += n;
|
||||
}
|
||||
|
||||
if ((nz % 1000) == 0) {
|
||||
// palTogglePad(GPIOD, GPIOD_LED3);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* DAC error callback.
|
||||
*/
|
||||
static void error_cb1(DACDriver *dacp, dacerror_t err) {
|
||||
|
||||
static void gpt_cb7(GPTDriver *gptp) {
|
||||
palTogglePad(GPIOA, 5);
|
||||
(void)dacp;
|
||||
(void)err;
|
||||
|
||||
chSysHalt("DAC failure");
|
||||
}
|
||||
|
||||
static const DACConfig dac1cfg1 = {
|
||||
.init = 2047U,
|
||||
.datamode = DAC_DHRM_12BIT_RIGHT
|
||||
};
|
||||
|
||||
static const DACConversionGroup dacgrpcfg1 = {
|
||||
.num_channels = 1U,
|
||||
.end_cb = end_cb1,
|
||||
.error_cb = error_cb1,
|
||||
.trigger = DAC_TRG(0)
|
||||
};
|
||||
|
||||
static const DACConfig dac1cfg2 = {
|
||||
.init = 2047U,
|
||||
.datamode = DAC_DHRM_12BIT_RIGHT
|
||||
};
|
||||
|
||||
static const DACConversionGroup dacgrpcfg2 = {
|
||||
.num_channels = 1U,
|
||||
.end_cb = end_cb1,
|
||||
.error_cb = error_cb1,
|
||||
.trigger = DAC_TRG(0)
|
||||
};
|
||||
|
||||
void audio_init()
|
||||
{
|
||||
|
||||
@@ -128,8 +307,30 @@ void audio_init()
|
||||
// audio_config.raw = eeconfig_read_audio();
|
||||
audio_config.enable = true;
|
||||
|
||||
palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
/*
|
||||
* Starting DAC1 driver, setting up the output pin as analog as suggested
|
||||
* by the Reference Manual.
|
||||
*/
|
||||
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG);
|
||||
palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG);
|
||||
dacStart(&DACD1, &dac1cfg1);
|
||||
dacStart(&DACD2, &dac1cfg2);
|
||||
|
||||
/*
|
||||
* Starting GPT6 driver, it is used for triggering the DAC.
|
||||
*/
|
||||
START_CHANNEL_1();
|
||||
START_CHANNEL_2();
|
||||
|
||||
/*
|
||||
* Starting a continuous conversion.
|
||||
*/
|
||||
dacStartConversion(&DACD1, &dacgrpcfg1,
|
||||
(dacsample_t *)dac_buffer, DAC_BUFFER_SIZE);
|
||||
dacStartConversion(&DACD2, &dacgrpcfg2,
|
||||
(dacsample_t *)dac_buffer_2, DAC_BUFFER_SIZE);
|
||||
// gptStartContinuous(&GPTD6, 2U);
|
||||
|
||||
|
||||
audio_initialized = true;
|
||||
|
||||
@@ -193,8 +394,8 @@ void stop_note(float freq)
|
||||
voice_place = 0;
|
||||
}
|
||||
if (voices == 0) {
|
||||
gptStopTimer(&GPTD6);
|
||||
gptStopTimer(&GPTD7);
|
||||
STOP_CHANNEL_1();
|
||||
STOP_CHANNEL_2();
|
||||
gptStopTimer(&GPTD8);
|
||||
frequency = 0;
|
||||
frequency_alt = 0;
|
||||
@@ -224,20 +425,6 @@ float vibrato(float average_freq) {
|
||||
|
||||
#endif
|
||||
|
||||
static void restart_gpt6(void) {
|
||||
// gptStopTimer(&GPTD6);
|
||||
|
||||
gptStart(&GPTD6, &gpt6cfg1);
|
||||
gptStartContinuous(&GPTD6, 2U);
|
||||
}
|
||||
|
||||
static void restart_gpt7(void) {
|
||||
// gptStopTimer(&GPTD7);
|
||||
|
||||
gptStart(&GPTD7, &gpt7cfg1);
|
||||
gptStartContinuous(&GPTD7, 2U);
|
||||
}
|
||||
|
||||
static void gpt_cb8(GPTDriver *gptp) {
|
||||
float freq;
|
||||
|
||||
@@ -280,13 +467,10 @@ static void gpt_cb8(GPTDriver *gptp) {
|
||||
freq_alt = 30.52;
|
||||
}
|
||||
|
||||
if (gpt6cfg1.frequency != (uint16_t)freq_alt) {
|
||||
gpt6cfg1.frequency = freq_alt;
|
||||
restart_gpt6();
|
||||
if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) {
|
||||
UPDATE_CHANNEL_2_FREQ(freq_alt);
|
||||
}
|
||||
//note_timbre;
|
||||
} else {
|
||||
// gptStopTimer(&GPTD6);
|
||||
}
|
||||
|
||||
if (polyphony_rate > 0) {
|
||||
@@ -342,13 +526,10 @@ static void gpt_cb8(GPTDriver *gptp) {
|
||||
}
|
||||
|
||||
|
||||
if (gpt7cfg1.frequency != (uint16_t)freq) {
|
||||
gpt7cfg1.frequency = freq;
|
||||
restart_gpt7();
|
||||
if (GET_CHANNEL_1_FREQ != (uint16_t)freq) {
|
||||
UPDATE_CHANNEL_1_FREQ(freq);
|
||||
}
|
||||
//note_timbre;
|
||||
} else {
|
||||
// gptStopTimer(&GPTD7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,11 +551,9 @@ static void gpt_cb8(GPTDriver *gptp) {
|
||||
freq = voice_envelope(freq);
|
||||
|
||||
|
||||
if (gpt6cfg1.frequency != (uint16_t)freq) {
|
||||
gpt6cfg1.frequency = freq;
|
||||
restart_gpt6();
|
||||
gpt7cfg1.frequency = freq;
|
||||
restart_gpt7();
|
||||
if (GET_CHANNEL_1_FREQ != (uint16_t)freq) {
|
||||
UPDATE_CHANNEL_1_FREQ(freq);
|
||||
UPDATE_CHANNEL_2_FREQ(freq);
|
||||
}
|
||||
//note_timbre;
|
||||
} else {
|
||||
@@ -384,8 +563,8 @@ static void gpt_cb8(GPTDriver *gptp) {
|
||||
|
||||
note_position++;
|
||||
bool end_of_note = false;
|
||||
if (gpt6cfg1.frequency > 0) {
|
||||
if (!note_resting)
|
||||
if (GET_CHANNEL_1_FREQ > 0) {
|
||||
if (!note_resting)
|
||||
end_of_note = (note_position >= (note_length*16 - 1));
|
||||
else
|
||||
end_of_note = (note_position >= (note_length*16));
|
||||
@@ -399,8 +578,8 @@ static void gpt_cb8(GPTDriver *gptp) {
|
||||
if (notes_repeat) {
|
||||
current_note = 0;
|
||||
} else {
|
||||
gptStopTimer(&GPTD6);
|
||||
gptStopTimer(&GPTD7);
|
||||
STOP_CHANNEL_1();
|
||||
STOP_CHANNEL_2();
|
||||
// gptStopTimer(&GPTD8);
|
||||
playing_notes = false;
|
||||
return;
|
||||
@@ -459,7 +638,8 @@ void play_note(float freq, int vol) {
|
||||
|
||||
gptStart(&GPTD8, &gpt8cfg1);
|
||||
gptStartContinuous(&GPTD8, 2U);
|
||||
|
||||
RESTART_CHANNEL_1();
|
||||
RESTART_CHANNEL_2();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -492,8 +672,8 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat)
|
||||
|
||||
gptStart(&GPTD8, &gpt8cfg1);
|
||||
gptStartContinuous(&GPTD8, 2U);
|
||||
restart_gpt6();
|
||||
restart_gpt7();
|
||||
RESTART_CHANNEL_1();
|
||||
RESTART_CHANNEL_2();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -21,6 +21,15 @@ uint8_t get_oneshot_mods(void);
|
||||
static uint16_t last_td;
|
||||
static int8_t highest_td = -1;
|
||||
|
||||
void qk_tap_dance_pair_on_each_tap (qk_tap_dance_state_t *state, void *user_data) {
|
||||
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
|
||||
|
||||
if (state->count == 2) {
|
||||
register_code16 (pair->kc2);
|
||||
state->finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
|
||||
|
||||
@@ -41,6 +50,15 @@ void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
void qk_tap_dance_dual_role_on_each_tap (qk_tap_dance_state_t *state, void *user_data) {
|
||||
qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data;
|
||||
|
||||
if (state->count == 2) {
|
||||
layer_move (pair->layer);
|
||||
state->finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
void qk_tap_dance_dual_role_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data;
|
||||
|
||||
@@ -92,14 +110,31 @@ static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *act
|
||||
send_keyboard_report();
|
||||
}
|
||||
|
||||
void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
||||
qk_tap_dance_action_t *action;
|
||||
|
||||
if (!record->event.pressed)
|
||||
return;
|
||||
|
||||
if (highest_td == -1)
|
||||
return;
|
||||
|
||||
for (int i = 0; i <= highest_td; i++) {
|
||||
action = &tap_dance_actions[i];
|
||||
if (action->state.count) {
|
||||
if (keycode == action->state.keycode && keycode == last_td)
|
||||
continue;
|
||||
action->state.interrupted = true;
|
||||
process_tap_dance_action_on_dance_finished (action);
|
||||
reset_tap_dance (&action->state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t idx = keycode - QK_TAP_DANCE;
|
||||
qk_tap_dance_action_t *action;
|
||||
|
||||
if (last_td && last_td != keycode) {
|
||||
(&tap_dance_actions[last_td - QK_TAP_DANCE])->state.interrupted = true;
|
||||
}
|
||||
|
||||
switch(keycode) {
|
||||
case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
|
||||
if ((int16_t)idx > highest_td)
|
||||
@@ -116,34 +151,14 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
||||
action->state.weak_mods |= get_weak_mods();
|
||||
process_tap_dance_action_on_each_tap (action);
|
||||
|
||||
if (last_td && last_td != keycode) {
|
||||
qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE];
|
||||
paction->state.interrupted = true;
|
||||
process_tap_dance_action_on_dance_finished (paction);
|
||||
reset_tap_dance (&paction->state);
|
||||
}
|
||||
|
||||
last_td = keycode;
|
||||
} else {
|
||||
if (action->state.count && action->state.finished) {
|
||||
reset_tap_dance (&action->state);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!record->event.pressed)
|
||||
return true;
|
||||
|
||||
if (highest_td == -1)
|
||||
return true;
|
||||
|
||||
for (int i = 0; i <= highest_td; i++) {
|
||||
action = &tap_dance_actions[i];
|
||||
if (action->state.count == 0)
|
||||
continue;
|
||||
action->state.interrupted = true;
|
||||
process_tap_dance_action_on_dance_finished (action);
|
||||
reset_tap_dance (&action->state);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -156,7 +171,7 @@ void matrix_scan_tap_dance () {
|
||||
return;
|
||||
uint16_t tap_user_defined;
|
||||
|
||||
for (uint8_t i = 0; i <= highest_td; i++) {
|
||||
for (uint8_t i = 0; i <= highest_td; i++) {
|
||||
qk_tap_dance_action_t *action = &tap_dance_actions[i];
|
||||
if(action->custom_tapping_term > 0 ) {
|
||||
tap_user_defined = action->custom_tapping_term;
|
||||
|
@@ -62,12 +62,12 @@ typedef struct
|
||||
} qk_tap_dance_dual_role_t;
|
||||
|
||||
#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \
|
||||
.fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \
|
||||
.fn = { qk_tap_dance_pair_on_each_tap, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \
|
||||
.user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \
|
||||
}
|
||||
|
||||
#define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) { \
|
||||
.fn = { NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, \
|
||||
.fn = { qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, \
|
||||
.user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer }), \
|
||||
}
|
||||
|
||||
@@ -91,13 +91,16 @@ extern qk_tap_dance_action_t tap_dance_actions[];
|
||||
|
||||
/* To be used internally */
|
||||
|
||||
void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_tap_dance(uint16_t keycode, keyrecord_t *record);
|
||||
void matrix_scan_tap_dance (void);
|
||||
void reset_tap_dance (qk_tap_dance_state_t *state);
|
||||
|
||||
void qk_tap_dance_pair_on_each_tap (qk_tap_dance_state_t *state, void *user_data);
|
||||
void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||
void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
|
||||
void qk_tap_dance_dual_role_on_each_tap (qk_tap_dance_state_t *state, void *user_data);
|
||||
void qk_tap_dance_dual_role_finished (qk_tap_dance_state_t *state, void *user_data);
|
||||
void qk_tap_dance_dual_role_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
|
||||
|
@@ -209,6 +209,10 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
preprocess_tap_dance(keycode, record);
|
||||
#endif
|
||||
|
||||
if (!(
|
||||
#if defined(KEY_LOCK_ENABLE)
|
||||
// Must run first to be able to mask key_up events.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# Stack size to be allocated to the Cortex-M process stack. This stack is
|
||||
# the stack used by the main() thread.
|
||||
ifeq ($(USE_PROCESS_STACKSIZE),)
|
||||
USE_PROCESS_STACKSIZE = 0x200
|
||||
USE_PROCESS_STACKSIZE = 0x800
|
||||
endif
|
||||
|
||||
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
|
||||
|
@@ -165,8 +165,8 @@ int main(void) {
|
||||
#endif
|
||||
suspend_power_down(); // on AVR this deep sleeps for 15ms
|
||||
/* Remote wakeup */
|
||||
if((USB_DRIVER.status & 2) && suspend_wakeup_condition()) {
|
||||
send_remote_wakeup(&USB_DRIVER);
|
||||
if(suspend_wakeup_condition()) {
|
||||
usbWakeupHost(&USB_DRIVER);
|
||||
}
|
||||
}
|
||||
/* Woken up */
|
||||
|
@@ -778,10 +778,6 @@ static const USBEndpointConfig nkro_ep_config = {
|
||||
* TODO: maybe disable some things when connection is lost? */
|
||||
static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
|
||||
switch(event) {
|
||||
case USB_EVENT_RESET:
|
||||
//TODO: from ISR! print("[R]");
|
||||
return;
|
||||
|
||||
case USB_EVENT_ADDRESS:
|
||||
return;
|
||||
|
||||
@@ -804,12 +800,15 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
|
||||
#endif /* NKRO_ENABLE */
|
||||
osalSysUnlockFromISR();
|
||||
return;
|
||||
|
||||
case USB_EVENT_SUSPEND:
|
||||
//TODO: from ISR! print("[S]");
|
||||
#ifdef SLEEP_LED_ENABLE
|
||||
sleep_led_enable();
|
||||
#endif /* SLEEP_LED_ENABLE */
|
||||
/* Falls into.*/
|
||||
case USB_EVENT_UNCONFIGURED:
|
||||
/* Falls into.*/
|
||||
case USB_EVENT_RESET:
|
||||
return;
|
||||
|
||||
case USB_EVENT_WAKEUP:
|
||||
@@ -1032,32 +1031,11 @@ void init_usb_driver(USBDriver *usbp) {
|
||||
|
||||
chVTObjectInit(&keyboard_idle_timer);
|
||||
#ifdef CONSOLE_ENABLE
|
||||
obqObjectInit(&console_buf_queue, console_queue_buffer, CONSOLE_EPSIZE, CONSOLE_QUEUE_CAPACITY, console_queue_onotify, (void*)usbp);
|
||||
obqObjectInit(&console_buf_queue, false, console_queue_buffer, CONSOLE_EPSIZE, CONSOLE_QUEUE_CAPACITY, console_queue_onotify, (void*)usbp);
|
||||
chVTObjectInit(&console_flush_timer);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Send remote wakeup packet
|
||||
* Note: should not be called from ISR
|
||||
*/
|
||||
void send_remote_wakeup(USBDriver *usbp) {
|
||||
(void)usbp;
|
||||
#if defined(K20x) || defined(KL2x)
|
||||
#if KINETIS_USB_USE_USB0
|
||||
USB0->CTL |= USBx_CTL_RESUME;
|
||||
wait_ms(15);
|
||||
USB0->CTL &= ~USBx_CTL_RESUME;
|
||||
#endif /* KINETIS_USB_USE_USB0 */
|
||||
#elif defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) /* End K20x || KL2x */
|
||||
STM32_USB->CNTR |= CNTR_RESUME;
|
||||
wait_ms(15);
|
||||
STM32_USB->CNTR &= ~CNTR_RESUME;
|
||||
#else /* End STM32F0XX || STM32F1XX || STM32F3XX */
|
||||
#warning Sending remote wakeup packet not implemented for your platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------
|
||||
* Keyboard functions
|
||||
* ---------------------------------------------------------
|
||||
|
@@ -36,9 +36,6 @@
|
||||
/* Initialize the USB driver and bus */
|
||||
void init_usb_driver(USBDriver *usbp);
|
||||
|
||||
/* Send remote wakeup packet */
|
||||
void send_remote_wakeup(USBDriver *usbp);
|
||||
|
||||
/* ---------------
|
||||
* Keyboard header
|
||||
* ---------------
|
||||
|
@@ -166,7 +166,7 @@ void matrix_init_user(void) {
|
||||
}
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
// _delay_ms(21); // gets rid of tick
|
||||
// wait_ms(21); // gets rid of tick
|
||||
// stop_all_notes();
|
||||
// PLAY_SONG(tone_hackstartup);
|
||||
#endif
|
||||
@@ -329,7 +329,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Salt, salt, salt...");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -340,7 +340,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Please sir, can I have some more salt?!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -351,7 +351,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Your salt only makes me harder, and even more aggressive!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -362,7 +362,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Good game, everyone!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Good luck, have fun!!!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -384,7 +384,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("Left click to win!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -395,7 +395,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -406,7 +406,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("That was positively riveting!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -417,9 +417,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER));
|
||||
_delay_ms(3000);
|
||||
wait_ms(3000);
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
SEND_STRING("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!" SS_TAP(X_ENTER));
|
||||
@@ -430,7 +430,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("OMG!!! C9!!!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -441,7 +441,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
|
||||
_delay_ms(50);
|
||||
wait_ms(50);
|
||||
SEND_STRING("That was a fantastic game, though it was a bit easy. Try harder next time!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
@@ -470,16 +470,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
":teensy"
|
||||
//#elif defined(BOOTLOADER_CATERINA)
|
||||
// ":avrdude"
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
" RGBLIGHT_ENABLE=yes"
|
||||
#else
|
||||
" RGBLIGHT_ENABLE=no"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
" AUDIO_ENABLE=yes"
|
||||
#else
|
||||
" AUDIO_ENABLE=no"
|
||||
#endif
|
||||
SS_TAP(X_ENTER));
|
||||
}
|
||||
|
@@ -26,8 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _WORKMAN 3
|
||||
#define _NAV 5
|
||||
#define _COVECUBE 6
|
||||
#define _MODS 4
|
||||
//#define _MISC 5
|
||||
#define _NAV 6
|
||||
#define _COVECUBE 7
|
||||
#define _SYMB 8
|
||||
#define _GAMEPAD 9
|
||||
#define _DIABLO 10
|
||||
@@ -142,4 +144,61 @@ enum {
|
||||
#define AUD_OFF AU_OFF
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Since our quirky block definitions are basically a list of comma separated
|
||||
// arguments, we need a wrapper in order for these definitions to be
|
||||
// expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define KEYMAP_wrapper(...) KEYMAP(__VA_ARGS__)
|
||||
|
||||
// Blocks for each of the four major keyboard layouts
|
||||
// Organized so we can quickly adapt and modify all of them
|
||||
// at once, rather than for each keyboard, one at a time.
|
||||
// And this allows wor much cleaner blocks in the keymaps.
|
||||
// For instance Tap/Hold for Control on all of the layouts
|
||||
|
||||
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
|
||||
#define _________________QWERTY_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
||||
|
||||
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
|
||||
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
|
||||
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
||||
|
||||
|
||||
#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
|
||||
#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
|
||||
#define _________________COLEMAK_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
||||
|
||||
#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
||||
#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
|
||||
#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
||||
|
||||
|
||||
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
||||
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
|
||||
#define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
|
||||
|
||||
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
|
||||
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
|
||||
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
|
||||
|
||||
|
||||
#define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
||||
#define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I
|
||||
#define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
|
||||
|
||||
#define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L
|
||||
#define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S
|
||||
#define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
|
||||
|
||||
|
||||
|
||||
// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
|
||||
// this allows us to quickly modify the bottom row for all of the layouts
|
||||
// so we don't have to alter it 4 times and hope that we haven't missed
|
||||
// anything
|
||||
#define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_LGUI, KC_LBRC, KC_RBRC
|
||||
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
#endif
|
||||
|
@@ -20,6 +20,22 @@ This allows for keyboard specific configuration while maintaining the ability to
|
||||
My [Ergodox EZ Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/drashna/keymap.c#L399) is a good example of this, as it uses the LEDs as modifier indicators.
|
||||
|
||||
|
||||
Keyboard Layout Templates
|
||||
-------------------------
|
||||
|
||||
This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once.
|
||||
|
||||
This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once.
|
||||
|
||||
The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance:
|
||||
|
||||
`#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)`
|
||||
|
||||
Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine.
|
||||
|
||||
Credit goes to @jola5 for first implementing this awesome idea.
|
||||
|
||||
|
||||
Custom Keycodes
|
||||
---------------
|
||||
|
||||
|
185
users/losinggeneration/README.md
Normal file
185
users/losinggeneration/README.md
Normal file
@@ -0,0 +1,185 @@
|
||||
losinggeneration's ortholinear layout
|
||||
============================
|
||||
|
||||
### Features
|
||||
|
||||
- Main layer(s)
|
||||
- The left space bar key has been changed to delete to have backspace
|
||||
& delete on the same main layer.
|
||||
- Adujst is a tap dance with one tap goes to the Adjust layer, second tap
|
||||
goes to the Numpad layer, a third tap goes to the Mouse layer. More taps
|
||||
are an error and disables tapping until you stop and try again.
|
||||
- Ctrl when tapped once & Ctrl+Alt when tapped twice
|
||||
- Left Alt when tapped once & Right Alt when tapped twice.
|
||||
- Left GUI when tapped once & right GUI when tapped twice. This is
|
||||
because I have a compose key on the right GUI key.
|
||||
- Left shift is a one shot modifier.
|
||||
- Enter when tapped Shift when held.
|
||||
- Esc when tapped Ctrl when held.
|
||||
- Lower & Raise
|
||||
- Removed ISO ~, ISO |, ISO #, ISO /, Media Next, & Media Play
|
||||
- Added PgUp, PgDn, Home, & End under the home row
|
||||
- Added Mute next to Vol-
|
||||
- New layers: Workman, Game, Numpad, & Mouse
|
||||
|
||||
## Layouts
|
||||
These include the 5x12 layout since it's nearly identical to the 4x12 layout.
|
||||
The only difference is the top row is removed for the 4x12 layout.
|
||||
|
||||
The Adjust layer keyboard specific, so it's described with the specific
|
||||
keyboard.
|
||||
|
||||
### Qwerty
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | A | S | D | F | G || H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B || N | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
|
||||
```
|
||||
,-----------------------------------------.,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G || J | L | U | Y | ; | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | A | R | S | T | D || H | N | E | I | O | " |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B || K | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Workman
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | D | R | W | B || J | F | U | P | ; | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | A | S | H | T | G || Y | N | E | O | I | " |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Shift| Z | X | M | C | V || K | L | , | . | / |Enter |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | " | , | . | P | Y || F | G | C | R | L | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | A | O | E | U | I || D | H | T | N | S | / |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Shift| ; | Q | J | K | X || B | M | W | V | Z |Enter |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI |Lower | Bksp ||Space |Raise | Left | Down | Up |Right |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Game (Qwerty without one shot modifiers & tap dancing)
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T || Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | A | S | D | F | G || H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B || N | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI |Lower |Space ||Space |Raise | Left | Down | Up |Right |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Number pad
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| XXX | XXX | XXX | XXX | XXX | XXX || XXX | NLCK | * | / | BKSP | BKSP |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | XXX | XXX | XXX | XXX | XXX || NLCK | 7 | 8 | 9 | - | BKSP |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | XXX | XXX | XXX | XXX | XXX || * | 4 | 5 | 6 | + | BKSP |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Shift | XXX | XXX | XXX | XXX | XXX || / | 1 | 2 | 3 | ENT | XXX |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI | XXX |Space ||Space | 0 | 0 | . | ENT | XXX |
|
||||
`-----------------------------------------''-----------------------------------------'
|
||||
```
|
||||
|
||||
### Mouse movement
|
||||
|
||||
* M is short for Mouse
|
||||
* MW is short for Mouse Wheel
|
||||
* MB is short for Mouse Button
|
||||
* MA is short for Mouse Acceleration
|
||||
|
||||
|
||||
* MB\_1 is the left click
|
||||
* MB\_2 is the right click
|
||||
* MB\_3 is the middle click
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| XXX | XXX | XXX | XXX | XXX | XXX || XXX | XXX | XXX | XXX | XXX | XXX |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Tab | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 || MA_0 | MB_1 | MB_3 | MB_2 | MB_4 | MB_5 |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Esc | MW_L | MW_U | MW_D | MW_R | XXX || MA_1 | M_LT | M_UP | M_DN | M_RT | XXX |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Shift | MA_0 | MA_1 | MA_2 | XXX | XXX || MA_2 | MW_L | MW_U | MW_D | MW_R | XXX |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
|Adjust| Ctrl | Alt | GUI | XXX |Space || XXX | XXX | XXX | XXX | XXX | XXX |
|
||||
`-----------------------------------------''-----------------------------------------'
|
||||
```
|
||||
|
||||
### Lower
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Del | F1 | F2 | F3 | F4 | F5 || F6 | _ | + | | \ | | |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | Mute | Vol- | Vol+ | ⏯ |
|
||||
`-----------------------------------------'`-----------------------------------------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
|
||||
```
|
||||
,-----------------------------------------..-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| ` | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| Del | F1 | F2 | F3 | F4 | F5 || F6 | - | = | [ | ] | \ |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ |
|
||||
|------+------+------+------+------+------||------+------+------+------+------+------|
|
||||
| | | | | | || | | Mute | Vol- | Vol+ | ⏯ |
|
||||
`-----------------------------------------''-----------------------------------------'
|
||||
```
|
||||
|
74
users/losinggeneration/losinggeneration-common.h
Normal file
74
users/losinggeneration/losinggeneration-common.h
Normal file
@@ -0,0 +1,74 @@
|
||||
#ifndef LOSINGGENERATION_COMMON_H
|
||||
#define LOSINGGENERATION_COMMON_H
|
||||
|
||||
/* Custom keys & combinations to be shorter for keymaps */
|
||||
#define KC_LCA LCA(KC_NO)
|
||||
/* Fillers to make layering more clear */
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define OSM_LSFT OSM(MOD_LSFT)
|
||||
#define TD_CTL TD(TD_CTL_CTLALT)
|
||||
#define TD_GUI TD(TD_LGUI_RGUI)
|
||||
#define TD_ALT TD(TD_LALT_RALT)
|
||||
#define MT_ENT SFT_T(KC_ENT)
|
||||
#define MT_ESC CTL_T(KC_ESC)
|
||||
|
||||
/* Custom layer movements for keymaps */
|
||||
#define TD_ADJ TD(TD_ADJUST)
|
||||
#define TO_GAME TO(_GAME)
|
||||
#define TO_MS TO(_MOUSE)
|
||||
#define TO_NUM TO(_NUMPAD)
|
||||
#define MO_ADJ MO(_ADJUST)
|
||||
|
||||
/* Mouse keys */
|
||||
#define MS_BTN1 KC_MS_BTN1
|
||||
#define MS_BTN2 KC_MS_BTN2
|
||||
#define MS_BTN3 KC_MS_BTN3
|
||||
#define MS_BTN4 KC_MS_BTN4
|
||||
#define MS_BTN5 KC_MS_BTN5
|
||||
#define MS_LEFT KC_MS_LEFT
|
||||
#define MS_DOWN KC_MS_DOWN
|
||||
#define MS_UP KC_MS_UP
|
||||
#define MS_RGHT KC_MS_RIGHT
|
||||
#define MW_LEFT KC_MS_WH_LEFT
|
||||
#define MW_DOWN KC_MS_WH_DOWN
|
||||
#define MW_UP KC_MS_WH_UP
|
||||
#define MW_RGHT KC_MS_WH_RIGHT
|
||||
#define MS_ACL0 KC_MS_ACCEL0
|
||||
#define MS_ACL1 KC_MS_ACCEL1
|
||||
#define MS_ACL2 KC_MS_ACCEL2
|
||||
|
||||
/*
|
||||
* This will expand values sent to it to send to the KEYMAP macro so defines
|
||||
* can be used by KEYMAP
|
||||
*/
|
||||
#define CATMAP(...) KEYMAP(__VA_ARGS__)
|
||||
|
||||
/*
|
||||
Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
entirely and just use numbers.
|
||||
*/
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _WORKMAN 2
|
||||
#define _DVORAK 3
|
||||
#define _GAME 4
|
||||
#define _NUMPAD 5
|
||||
#define _MOUSE 6
|
||||
#define _LOWER 14
|
||||
#define _RAISE 15
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
WORKMAN,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
#endif
|
29
users/losinggeneration/losinggeneration-config.h
Normal file
29
users/losinggeneration/losinggeneration-config.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||
Copyright 2018 Harley Laue <losinggeneration@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
|
||||
long with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOSINGGENERATION_CONFIG_H
|
||||
#define LOSINGGENERATION_CONFIG_H
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 10
|
||||
#define MOUSEKEY_TIME_TO_MAX 20
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 20
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user