mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-06 15:23:28 +00:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2bac7cf414 | ||
![]() |
b7c76fda31 | ||
![]() |
d5a76e899d | ||
![]() |
dd05bf0d96 | ||
![]() |
95e68c4ae8 | ||
![]() |
d299d0e72d | ||
![]() |
6fddb31c4c | ||
![]() |
53b043d4ef | ||
![]() |
7b51f050d7 | ||
![]() |
7730dc3e5c | ||
![]() |
0740e84d63 | ||
![]() |
c917888262 |
@@ -131,7 +131,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
|
||||
|
||||
# One Shot Keys
|
||||
|
||||
One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
|
||||
One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
|
||||
|
||||
For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
|
||||
|
||||
|
@@ -87,8 +87,8 @@ These control the RGB Lighting functionality.
|
||||
| Long Name | Short Name | Description |
|
||||
|-----------|------------|-------------|
|
||||
||`RGB_TOG`|toggle on/off|
|
||||
||`RGB_MOD`|cycle through modes|
|
||||
||`RGB_SMOD`|cycle through modes, use reverse direction when shift is hold|
|
||||
|`RGB_MODE_FORWARD`|`RGB_MOD`|cycle through modes, use reverse direction when shift is held|
|
||||
|`RGB_MODE_REVERSE`|`RGB_RMOD`|cycle through modes in reverse (also suppost shift to go forward)|
|
||||
||`RGB_HUI`|hue increase|
|
||||
||`RGB_HUD`|hue decrease|
|
||||
||`RGB_SAI`|saturation increase|
|
||||
@@ -104,6 +104,8 @@ These control the RGB Lighting functionality.
|
||||
|`RGB_MODE_XMAS`|`RGB_M_X`| Switch to the Christmas animation |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G`| Switch to the static gradient mode |
|
||||
|
||||
note: for backwards compatibility, `RGB_SMOD` is an alias for `RGB_MOD`.
|
||||
|
||||
## Hardware Modification
|
||||
|
||||

|
||||
|
@@ -13,7 +13,7 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
|
||||
|
||||
The `<target>` means the following
|
||||
* If no target is given, then it's the same as `all` below
|
||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default:all` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||
|
@@ -110,7 +110,7 @@ A feature that lets you control your mouse cursor and click from your keyboard.
|
||||
A term that applies to keyboards that are capable of reporting any number of key-presses at once.
|
||||
|
||||
## Oneshot Modifier
|
||||
A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key.
|
||||
A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. Also known as a Sticky key or a Dead key.
|
||||
|
||||
## ProMicro
|
||||
A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros.
|
||||
|
52
keyboards/crawlpad/config.h
Executable file
52
keyboards/crawlpad/config.h
Executable file
@@ -0,0 +1,52 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6070
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER WoodKeys.click
|
||||
#define PRODUCT CrawlPad
|
||||
#define DESCRIPTION ATX Keycrawl 2017
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { F0, F1, F4, F5 }
|
||||
#define MATRIX_COL_PINS { D4, D5, D6, D7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* Pins for custom per-row LEDs. Should be changed to use named pins. */
|
||||
#define LED_ROW_PINS { 8, 9, 10, 11 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* 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() ( \
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 3
|
||||
#endif
|
||||
|
||||
#endif
|
1
keyboards/crawlpad/crawlpad.c
Executable file
1
keyboards/crawlpad/crawlpad.c
Executable file
@@ -0,0 +1 @@
|
||||
#include "crawlpad.h"
|
18
keyboards/crawlpad/crawlpad.h
Executable file
18
keyboards/crawlpad/crawlpad.h
Executable file
@@ -0,0 +1,18 @@
|
||||
#ifndef KB_H
|
||||
#define KB_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
K30, K31, K32, K33 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03 }, \
|
||||
{ K10, K11, K12, K13 }, \
|
||||
{ K20, K21, K22, K23 }, \
|
||||
{ K30, K31, K32, K33 } \
|
||||
}
|
||||
|
||||
#endif
|
1
keyboards/crawlpad/crawlpad.json
Normal file
1
keyboards/crawlpad/crawlpad.json
Normal file
File diff suppressed because one or more lines are too long
117
keyboards/crawlpad/keymaps/default/keymap.c
Executable file
117
keyboards/crawlpad/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,117 @@
|
||||
#include "../../crawlpad.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
BL1 = SAFE_RANGE,
|
||||
BL2,
|
||||
BL3,
|
||||
BL4
|
||||
};
|
||||
|
||||
const uint8_t LED_PINS[] = LED_ROW_PINS;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP(
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||
KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||
MO(1), KC_P0, KC_PDOT, KC_ENT),
|
||||
|
||||
KEYMAP(
|
||||
KC_NLCK, BL1, KC_TRNS, KC_PSLS,
|
||||
RESET, BL2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL3, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL4, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
void set_led(int idx, bool enable) {
|
||||
uint8_t pin = LED_PINS[idx];
|
||||
if (enable) {
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF);
|
||||
} else {
|
||||
/* PORTx &= ~n */
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
/* set LED row pins to output and low */
|
||||
DDRB |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
|
||||
PORTB &= ~(1 << 4) & ~(1 << 5) & ~(1 << 6) & ~(1 << 7);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BL1:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 4);
|
||||
} else {
|
||||
PORTB &= ~(1 << 4);
|
||||
}
|
||||
return false;
|
||||
case BL2:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 5);
|
||||
} else {
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
return false;
|
||||
case BL3:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 6);
|
||||
} else {
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
return false;
|
||||
case BL4:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 7);
|
||||
} else {
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
17
keyboards/crawlpad/readme.md
Normal file
17
keyboards/crawlpad/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Crawlpad
|
||||
|
||||

|
||||
|
||||
A 4x4 macropad/numpad, exclusively availabe at Keycrawl events.
|
||||
|
||||
Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
|
||||
Hardware Supported: Crawlpad
|
||||
Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make crawlpad: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.
|
||||
|
||||
For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com].
|
56
keyboards/crawlpad/rules.mk
Executable file
56
keyboards/crawlpad/rules.mk
Executable file
@@ -0,0 +1,56 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= no # [Crawlpad] Custom backlighting code is used, so this should not be enabled
|
||||
AUDIO_ENABLE ?= no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||
RGBLIGHT_ENABLE ?= no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port.
|
@@ -244,9 +244,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_SMOD, KC_RGB_T,
|
||||
RGB_HUI,
|
||||
RGB_M_R, RGB_M_SW, RGB_HUD,
|
||||
|
||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* 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 "woodpad.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
@@ -97,12 +97,6 @@ void matrix_init_keymap(void) {
|
||||
// set Numlock LED to output and low
|
||||
DDRF |= (1 << 7);
|
||||
PORTF &= ~(1 << 7);
|
||||
|
||||
|
||||
if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) {
|
||||
register_code(KC_NUMLOCK);
|
||||
unregister_code(KC_NUMLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
@@ -114,3 +108,9 @@ void matrix_scan_keymap(void) {
|
||||
// Run Diablo 3 macro checking code.
|
||||
}
|
||||
|
||||
void led_set_keymap(uint8_t usb_led) {
|
||||
if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
|
||||
register_code(KC_NUMLOCK);
|
||||
unregister_code(KC_NUMLOCK);
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
#include "rev1.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,10 +1,5 @@
|
||||
#include "rev2.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
@@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -30,10 +20,3 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
193
keyboards/katana60/config.h
Normal file
193
keyboards/katana60/config.h
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Copyright 2017 Baris Tosun
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER RominRonin CandyKeys
|
||||
#define PRODUCT Katana60
|
||||
#define DESCRIPTION QMK keyboard firmware for Katana60
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { F5, F6, F4, F1, D0 }
|
||||
#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* 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)) \
|
||||
)
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* 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
|
43
keyboards/katana60/katana60.c
Normal file
43
keyboards/katana60/katana60.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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 "katana60.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
40
keyboards/katana60/katana60.h
Normal file
40
keyboards/katana60/katana60.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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 KATANA60_H
|
||||
#define KATANA60_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( \
|
||||
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||
k00, k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, KC_NO, KC_NO, k09, k0a, k0b, k0c, k0d, KC_NO }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \
|
||||
}
|
||||
|
||||
#endif
|
24
keyboards/katana60/keymaps/colemak/config.h
Normal file
24
keyboards/katana60/keymaps/colemak/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
106
keyboards/katana60/keymaps/colemak/keymap.c
Normal file
106
keyboards/katana60/keymaps/colemak/keymap.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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 "katana60.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Windows based definitions.
|
||||
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||
#define K_PRVWD LCTL(KC_LEFT) // Previous word
|
||||
#define K_NXTWD LCTL(KC_RIGHT) // Next word
|
||||
#define K_LSTRT KC_HOME // Start of line
|
||||
#define K_LEND KC_END // End of line
|
||||
#define UNDO LCTL(KC_Z) // UNDO
|
||||
#define CUT LCTL(KC_X) // CUT
|
||||
#define COPY LCTL(KC_C) // COPY
|
||||
#define PASTE LCTL(KC_V) // PASTE
|
||||
|
||||
|
||||
#define BASE 0 // Default
|
||||
#define NUMB 1 // Numbers
|
||||
#define SYMB 2 // Symbols
|
||||
#define CURS 3 // Text Editing
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP( /* Base */
|
||||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||
),
|
||||
[NUMB] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||
),
|
||||
[SYMB] = KEYMAP(
|
||||
RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[CURS] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
5
keyboards/katana60/keymaps/colemak/readme.md
Normal file
5
keyboards/katana60/keymaps/colemak/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# The colemak keymap for katana60
|
||||
|
||||
Same as the default layout, but with default Colemal layout.
|
||||
|
||||
# TODO: references to extend layer and symbol layers
|
24
keyboards/katana60/keymaps/default/config.h
Normal file
24
keyboards/katana60/keymaps/default/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
106
keyboards/katana60/keymaps/default/keymap.c
Normal file
106
keyboards/katana60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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 "katana60.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Windows based definitions.
|
||||
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||
#define K_PRVWD LCTL(KC_LEFT) // Previous word
|
||||
#define K_NXTWD LCTL(KC_RIGHT) // Next word
|
||||
#define K_LSTRT KC_HOME // Start of line
|
||||
#define K_LEND KC_END // End of line
|
||||
#define UNDO LCTL(KC_Z) // UNDO
|
||||
#define CUT LCTL(KC_X) // CUT
|
||||
#define COPY LCTL(KC_C) // COPY
|
||||
#define PASTE LCTL(KC_V) // PASTE
|
||||
|
||||
|
||||
#define BASE 0 // Default
|
||||
#define NUMB 1 // Numbers
|
||||
#define SYMB 2 // Symbols
|
||||
#define CURS 3 // Text Editing
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP( /* Base */
|
||||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||
),
|
||||
[NUMB] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||
),
|
||||
[SYMB] = KEYMAP(
|
||||
RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[CURS] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
7
keyboards/katana60/keymaps/default/readme.md
Normal file
7
keyboards/katana60/keymaps/default/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# The default keymap for katana60
|
||||
|
||||
This layout takes my own personal layout (in development at the Colemak forum) and remaps the keys and shortcuts for Windows (I'm a MacOS user).
|
||||
The testing was comducted on my Windows gaming PC, though it was not exhaustive, all the many layers and useful navigation shortcuts worked fine.
|
||||
|
||||
# TODO: references to extend layer and symbol layers
|
||||
# TODO: more information
|
24
keyboards/katana60/keymaps/rominronin/config.h
Normal file
24
keyboards/katana60/keymaps/rominronin/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
106
keyboards/katana60/keymaps/rominronin/keymap.c
Normal file
106
keyboards/katana60/keymaps/rominronin/keymap.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright 2017 Baris Tosun
|
||||
*
|
||||
* 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 "katana60.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// MacOS based definitions.
|
||||
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||
#define K_PRVWD LALT(KC_LEFT) // Previous word
|
||||
#define K_NXTWD LALT(KC_RIGHT) // Next word
|
||||
#define K_LSTRT LGUI(KC_LEFT) // Start of line
|
||||
#define K_LEND LGUI(KC_RIGHT) // End of line
|
||||
#define UNDO LGUI(KC_Z) // UNDO
|
||||
#define CUT LGUI(KC_X) // CUT
|
||||
#define COPY LGUI(KC_C) // COPY
|
||||
#define PASTE LGUI(KC_V) // PASTE
|
||||
|
||||
|
||||
#define BASE 0 // Default
|
||||
#define NUMB 1 // Numbers
|
||||
#define SYMB 2 // Symbols
|
||||
#define CURS 3 // Text Editing
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP( /* Base */
|
||||
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC,
|
||||
MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||
),
|
||||
[NUMB] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||
),
|
||||
[SYMB] = KEYMAP(
|
||||
RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[CURS] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
5
keyboards/katana60/keymaps/rominronin/readme.md
Normal file
5
keyboards/katana60/keymaps/rominronin/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# RominRonin's keymap for katana60
|
||||
|
||||
My own personal daily layout. OS keys are oriented for MacOS and the keys are in COLEMAK Mod-DH layout.
|
||||
|
||||
# TODO: references to extend layer and symbol layers
|
17
keyboards/katana60/readme.md
Normal file
17
keyboards/katana60/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Katana60
|
||||
|
||||

|
||||
|
||||
A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com.
|
||||
|
||||
Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin)
|
||||
Hardware Supported: Katana60 PCB v1, Teensy 2.0
|
||||
Hardware Availability: [CandyKeys.com](https://CandyKeys.com)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make katana60: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.
|
||||
|
||||
There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/)
|
68
keyboards/katana60/rules.mk
Normal file
68
keyboards/katana60/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# 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=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI 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
|
@@ -1,17 +1,7 @@
|
||||
#include "lets_split.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -23,10 +13,3 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
#include "lets_split.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -30,10 +21,3 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
#include "lets_split.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
#include "levinson.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -30,10 +21,3 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,10 +1,5 @@
|
||||
#include "levinson.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
@@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -30,10 +20,3 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
27
keyboards/mf68_ble/README.md
Normal file
27
keyboards/mf68_ble/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
MF68
|
||||
====
|
||||
|
||||
Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
|
||||
|
||||
Keyboard Maintainer: [di0ib](http://www.40percent.club)
|
||||
Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/)
|
||||
Please note: This is 32u4 and not M0
|
||||
Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb)
|
||||
[MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc)
|
||||
Story
|
||||
-----
|
||||
|
||||
The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/)
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
Below is how you wire the Feather to PCB
|
||||
|
||||

|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make mf68_ble: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.
|
162
keyboards/mf68_ble/config.h
Normal file
162
keyboards/mf68_ble/config.h
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x0510
|
||||
#define DEVICE_VER 0x0101
|
||||
#define MANUFACTURER di0ib
|
||||
#define PRODUCT MF68
|
||||
#define DESCRIPTION Magicforce 68 BLE
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
/*
|
||||
* 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 { D1, D0, C6, D7, B5, B6, B7, D6 }
|
||||
#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 }
|
||||
#define UNUSED_PINS {B5}
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
/*
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
*/
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
68
keyboards/mf68_ble/keymaps/default/keymap.c
Normal file
68
keyboards/mf68_ble/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,68 @@
|
||||
#include "mf68.h"
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _FN1 1
|
||||
#define _FN2 2
|
||||
#define KC_ KC_TRNS
|
||||
#define KC_X0 LT(_FN2, KC_GRV)
|
||||
#define KC_X1 MO(_FN1)
|
||||
#define KC_X2 BL_STEP
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
|
||||
/*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
|
||||
/*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
|
||||
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
|
||||
/*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
|
||||
LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
|
||||
/*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
|
||||
LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
|
||||
/*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
|
||||
),
|
||||
|
||||
[_FN1] = KC_KEYMAP(
|
||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||
, , , UP , , , , , , , , , X2 , , VOLD,END,
|
||||
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||
, ,LEFT,DOWN,RGHT, , , , , , , , ,
|
||||
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||
, , , , , , ,MUTE, , , , , MUTE,
|
||||
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||
, , , , , , , MPRV,MPLY,MNXT
|
||||
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||
),
|
||||
|
||||
[_FN2] = KC_KEYMAP(
|
||||
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||
, , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
|
||||
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||
, ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
|
||||
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||
, , , , , , 0 , 1 , 2 , 3 , , , MUTE,
|
||||
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||
, , , , , , , MPRV,MPLY,MNXT
|
||||
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||
)
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
8
keyboards/mf68_ble/mf68.c
Normal file
8
keyboards/mf68_ble/mf68.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "mf68.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
40
keyboards/mf68_ble/mf68.h
Normal file
40
keyboards/mf68_ble/mf68.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef MF68_H
|
||||
#define MF68_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
||||
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
||||
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
||||
{ K70, K71, K72, K73, K74 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
||||
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
||||
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
||||
) KEYMAP( \
|
||||
KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
|
||||
KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
|
||||
KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
|
||||
KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
|
||||
KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
|
||||
KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
|
||||
KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
|
||||
KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
|
||||
)
|
||||
|
||||
#endif
|
67
keyboards/mf68_ble/rules.mk
Normal file
67
keyboards/mf68_ble/rules.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 8000000
|
||||
|
||||
|
||||
#
|
||||
# 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 ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
BLUETOOTH = AdafruitBLE
|
@@ -63,6 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define C6_AUDIO
|
||||
#define STARTUP_SONG SONG(ZELDA_PUZZLE)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -19,7 +19,7 @@ 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 "orthodox.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
|
||||
|
||||
@@ -32,6 +32,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
||||
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 2); // (_C4, 0.25);
|
||||
#define AUD_ON FC_ON
|
||||
#define AUD_OFF FC_OFF
|
||||
#else
|
||||
#define AUD_ON AU_ON
|
||||
#define AUD_OFF AU_OFF
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@@ -48,20 +60,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_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, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, 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 \
|
||||
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, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, 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(\
|
||||
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, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, 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 \
|
||||
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, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, 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 \
|
||||
),
|
||||
|
||||
[_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, XXXXXXX, KC_F12, _______, XXXXXXX, 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, XXXXXXX, KC_F12, _______, XXXXXXX, 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(\
|
||||
@@ -72,15 +84,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_ADJUST] = KEYMAP(\
|
||||
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
RGB_SMOD,RGB_HUI, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||
RGB_SMOD,RGB_HUI, _______, AUD_ON, AUD_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, 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 \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
||||
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 2); // (_C4, 0.25);
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "viterbi.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include "drashna.h"
|
||||
|
@@ -1,9 +1,5 @@
|
||||
#include "viterbi.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
#ifdef SSD1306OLED
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||
#endif
|
||||
|
||||
// // green led on
|
||||
// DDRD |= (1<<5);
|
||||
// PORTD &= ~(1<<5);
|
||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
@@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN F5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
|
||||
|
||||
|
@@ -26,6 +26,46 @@ firmware likely requires a command line like:
|
||||
$ sudo make xd75:default:dfu
|
||||
```
|
||||
|
||||
### LED control
|
||||
|
||||
There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB.
|
||||
|
||||
TODO: it would be nice to have PWM support on these LEDs for fade-in/fade-out effects.
|
||||
|
||||
```c
|
||||
capslock_led_on();
|
||||
gp100_led_on();
|
||||
gp103_led_on();
|
||||
keycaps_led_on();
|
||||
|
||||
|
||||
// led_set_user example - you could also turn these on/off in response
|
||||
// to events in process_record_user or matrix_scan_user
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
capslock_led_on();
|
||||
} else {
|
||||
capslock_led_off();
|
||||
}
|
||||
|
||||
if (some_custom_state) {
|
||||
gp100_led_on();
|
||||
}
|
||||
else {
|
||||
gp100_led_off();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For the curious:
|
||||
|
||||
```
|
||||
CAPSLOCK_LED B2
|
||||
GP103_LED F4
|
||||
KEYCAPS_LED F5
|
||||
GP100_LED F7
|
||||
```
|
||||
|
||||
### Other Keymaps
|
||||
|
||||
The "default" keymap included is basically the OLKB Atomic keymap with
|
||||
|
@@ -15,10 +15,20 @@
|
||||
*/
|
||||
#include "xd75.h"
|
||||
|
||||
#define XD75_CAPSLOCK_LED 2 // B2
|
||||
#define XD75_GP103_LED 4 // F4
|
||||
#define XD75_KEYCAPS_LED 5 // F5
|
||||
#define XD75_GP100_LED 7 // F7
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
capslock_led_init();
|
||||
gp100_led_init();
|
||||
gp103_led_init();
|
||||
keycaps_led_init();
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
@@ -41,3 +51,55 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
void capslock_led_init(void) {
|
||||
DDRB |= (1 << XD75_CAPSLOCK_LED);
|
||||
capslock_led_off();
|
||||
}
|
||||
|
||||
void capslock_led_off(void) {
|
||||
PORTB |= (1 << XD75_CAPSLOCK_LED);
|
||||
}
|
||||
|
||||
void capslock_led_on(void) {
|
||||
PORTB &= ~(1 << XD75_CAPSLOCK_LED);
|
||||
}
|
||||
|
||||
void gp100_led_init(void) {
|
||||
DDRF |= (1 << XD75_GP100_LED);
|
||||
gp100_led_off();
|
||||
}
|
||||
|
||||
void gp100_led_off(void) {
|
||||
PORTF |= (1 << XD75_GP100_LED);
|
||||
}
|
||||
|
||||
void gp100_led_on(void) {
|
||||
PORTF &= ~(1 << XD75_GP100_LED);
|
||||
}
|
||||
|
||||
void gp103_led_init(void) {
|
||||
DDRF |= (1 << XD75_GP103_LED);
|
||||
gp103_led_off();
|
||||
}
|
||||
|
||||
void gp103_led_off(void) {
|
||||
PORTF &= ~(1 << XD75_GP103_LED);
|
||||
}
|
||||
|
||||
void gp103_led_on(void) {
|
||||
PORTF |= (1 << XD75_GP103_LED);
|
||||
}
|
||||
|
||||
void keycaps_led_init(void) {
|
||||
DDRF |= (1 << XD75_KEYCAPS_LED);
|
||||
keycaps_led_off();
|
||||
}
|
||||
|
||||
void keycaps_led_off(void) {
|
||||
PORTF |= (1 << XD75_KEYCAPS_LED);
|
||||
}
|
||||
|
||||
void keycaps_led_on(void) {
|
||||
PORTF &= ~(1 << XD75_KEYCAPS_LED);
|
||||
}
|
||||
|
@@ -52,4 +52,20 @@
|
||||
|
||||
#define LAYOUT_ortho_5x15 KEYMAP
|
||||
|
||||
void capslock_led_init(void);
|
||||
void capslock_led_off(void);
|
||||
void capslock_led_on(void);
|
||||
|
||||
void gp100_led_init(void);
|
||||
void gp100_led_off(void);
|
||||
void gp100_led_on(void);
|
||||
|
||||
void gp103_led_init(void);
|
||||
void gp103_led_off(void);
|
||||
void gp103_led_on(void);
|
||||
|
||||
void keycaps_led_init(void);
|
||||
void keycaps_led_off(void);
|
||||
void keycaps_led_on(void);
|
||||
|
||||
#endif
|
||||
|
@@ -286,13 +286,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
rgblight_toggle();
|
||||
}
|
||||
return false;
|
||||
case RGB_MOD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_step();
|
||||
}
|
||||
return false;
|
||||
case RGB_SMOD:
|
||||
// same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead.
|
||||
case RGB_MODE_FORWARD:
|
||||
if (record->event.pressed) {
|
||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
if(shifted) {
|
||||
@@ -303,6 +297,17 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case RGB_MODE_REVERSE:
|
||||
if (record->event.pressed) {
|
||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
if(shifted) {
|
||||
rgblight_step();
|
||||
}
|
||||
else {
|
||||
rgblight_step_reverse();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case RGB_HUI:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_hue();
|
||||
@@ -930,6 +935,11 @@ void backlight_task(void) {
|
||||
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
|
||||
#ifdef NO_BACKLIGHT_CLOCK
|
||||
void breathing_defaults(void) {}
|
||||
void breathing_intensity_default(void) {}
|
||||
#else
|
||||
|
||||
#define BREATHING_NO_HALT 0
|
||||
#define BREATHING_HALT_OFF 1
|
||||
#define BREATHING_HALT_ON 2
|
||||
@@ -1129,6 +1139,7 @@ ISR(TIMER1_COMPA_vect)
|
||||
|
||||
}
|
||||
|
||||
#endif // NO_BACKLIGHT_CLOCK
|
||||
#endif // breathing
|
||||
|
||||
#else // backlight
|
||||
|
@@ -399,8 +399,8 @@ enum quantum_keycodes {
|
||||
|
||||
// RGB functionality
|
||||
RGB_TOG,
|
||||
RGB_MOD,
|
||||
RGB_SMOD,
|
||||
RGB_MODE_FORWARD,
|
||||
RGB_MODE_REVERSE,
|
||||
RGB_HUI,
|
||||
RGB_HUD,
|
||||
RGB_SAI,
|
||||
@@ -553,6 +553,10 @@ enum quantum_keycodes {
|
||||
|
||||
#define KC_GESC GRAVE_ESC
|
||||
|
||||
#define RGB_MOD RGB_MODE_FORWARD
|
||||
#define RGB_SMOD RGB_MODE_FORWARD
|
||||
#define RGB_RMOD RGB_MODE_REVERSE
|
||||
|
||||
#define RGB_M_P RGB_MODE_PLAIN
|
||||
#define RGB_M_B RGB_MODE_BREATHE
|
||||
#define RGB_M_R RGB_MODE_RAINBOW
|
||||
|
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
#include "version.h"
|
||||
#include "sensitive.h"
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
//define diablo macro timer variables
|
||||
@@ -78,6 +79,14 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_workman[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_hackstartup[][2] = SONG(ONE_UP_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
// Add reconfigurable functions here, for keymap customization
|
||||
// This allows for a global, userspace functions, and continued
|
||||
@@ -137,6 +146,11 @@ void matrix_init_user(void) {
|
||||
rgblight_set_red;
|
||||
rgblight_mode(5);
|
||||
}
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
// _delay_ms(21); // gets rid of tick
|
||||
// stop_all_notes();
|
||||
// PLAY_SONG(tone_hackstartup);
|
||||
#endif
|
||||
matrix_init_keymap();
|
||||
}
|
||||
@@ -190,13 +204,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_workman[][2] = SONG(PLOVER_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
@@ -427,28 +434,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#endif
|
||||
case KC_MAKE:
|
||||
if (!record->event.pressed) {
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||
#ifndef BOOTLOADER_CATERINA
|
||||
SEND_STRING(":teensy ");
|
||||
#else
|
||||
SEND_STRING(" ");
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
||||
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
|
||||
":dfu"
|
||||
#elif defined(BOOTLOADER_HALFKAY)
|
||||
":teensy"
|
||||
#elif defined(BOOTLOADER_CATERINA)
|
||||
":avrdude"
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
SEND_STRING("RGBLIGHT_ENABLE=yes ");
|
||||
" RGBLIGHT_ENABLE=yes"
|
||||
#else
|
||||
SEND_STRING("RGBLIGHT_ENABLE=no ");
|
||||
" RGBLIGHT_ENABLE=no"
|
||||
#endif
|
||||
#ifdef AUDIO_ENABLE
|
||||
SEND_STRING("AUDIO_ENABLE=yes ");
|
||||
" AUDIO_ENABLE=yes"
|
||||
#else
|
||||
SEND_STRING("AUDIO_ENABLE=no ");
|
||||
" AUDIO_ENABLE=no"
|
||||
#endif
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
SEND_STRING("FAUXCLICKY_ENABLE=yes ");
|
||||
" FAUXCLICKY_ENABLE=yes"
|
||||
#else
|
||||
SEND_STRING("FAUXCLICKY_ENABLE=no ");
|
||||
" FAUXCLICKY_ENABLE=no"
|
||||
#endif
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@@ -475,33 +484,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication
|
||||
if (record->event.pressed) {
|
||||
rgb_layer_change = !rgb_layer_change;
|
||||
case KC_SECRET_1 ... KC_SECRET_5:
|
||||
if (!record->event.pressed) {
|
||||
send_string(secret[keycode - KC_SECRET_1]);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_MOD:
|
||||
case RGB_SMOD:
|
||||
case RGB_HUI:
|
||||
case RGB_HUD:
|
||||
case RGB_SAI:
|
||||
case RGB_SAD:
|
||||
case RGB_VAI:
|
||||
case RGB_VAD:
|
||||
case RGB_MODE_PLAIN:
|
||||
case RGB_MODE_BREATHE:
|
||||
case RGB_MODE_RAINBOW:
|
||||
case RGB_MODE_SWIRL:
|
||||
case RGB_MODE_SNAKE:
|
||||
case RGB_MODE_KNIGHT:
|
||||
case RGB_MODE_XMAS:
|
||||
case RGB_MODE_GRADIENT:
|
||||
case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
rgb_layer_change = !rgb_layer_change;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
|
||||
if (record->event.pressed) { //This disrables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||
rgb_layer_change = false;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return process_record_keymap(keycode, record);
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USERSPACE
|
||||
|
||||
#include "quantum.h"
|
||||
#include "song_list.h"
|
||||
|
||||
// Define layer names
|
||||
#define _QWERTY 0
|
||||
@@ -86,6 +87,11 @@ enum userrpace_custom_keycodes {
|
||||
KC_MAKE,
|
||||
KC_RESET,
|
||||
KC_RGB_T,
|
||||
KC_SECRET_1,
|
||||
KC_SECRET_2,
|
||||
KC_SECRET_3,
|
||||
KC_SECRET_4,
|
||||
KC_SECRET_5,
|
||||
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
|
||||
};
|
||||
|
||||
@@ -99,6 +105,10 @@ enum {
|
||||
#endif
|
||||
|
||||
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_SLEEP
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
8
users/drashna/sensitive.h
Normal file
8
users/drashna/sensitive.h
Normal file
@@ -0,0 +1,8 @@
|
||||
const char secret[][64] = {
|
||||
"test1",
|
||||
"test2",
|
||||
"test3",
|
||||
"test4",
|
||||
"test5"
|
||||
};
|
||||
|
@@ -21,6 +21,8 @@ __attribute__ ((weak))
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
return state;
|
||||
}
|
||||
__attribute__ ((weak))
|
||||
void led_set_keymap(uint8_t usb_led) {}
|
||||
|
||||
// Call user matrix init, then call the keymap's init function
|
||||
void matrix_init_user(void) {
|
||||
@@ -82,3 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint32_t layer_state_set_user (uint32_t state) {
|
||||
return layer_state_set_keymap (state);
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
led_set_keymap(usb_led);
|
||||
}
|
||||
|
Reference in New Issue
Block a user