Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c27aa60c50 | ||
|
|
931e9bdbe4 | ||
|
|
5ef7367e6c | ||
|
|
5c6c556933 | ||
|
|
d2ce12d15d | ||
|
|
bc86eb2233 | ||
|
|
f2d9f912b1 | ||
|
|
0b89809ac4 | ||
|
|
957070a6b5 | ||
|
|
f22c5c17b6 | ||
|
|
c289a4cb20 | ||
|
|
cbe1af47de | ||
|
|
f6da00b85d | ||
|
|
43b0309970 |
No files matched your search
@@ -38,7 +38,7 @@ with open('requirements.txt', 'r') as fd:
|
|||||||
|
|
||||||
# Figure out our version
|
# Figure out our version
|
||||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
||||||
result = subprocess.run(command, universal_newlines=True, capture_output=True)
|
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
||||||
@@ -47,7 +47,7 @@ else:
|
|||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc
|
import milc
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
|
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
|
||||||
# This means we can't accept arguments to the qmk script itself.
|
# This means we can't accept arguments to the qmk script itself.
|
||||||
|
|||||||
+12
-5
@@ -6,7 +6,8 @@ This page describes how to setup and use the QMK CLI.
|
|||||||
|
|
||||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
|
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
|
||||||
|
|
||||||
* `qmk compile-json`
|
* `qmk compile`
|
||||||
|
* `qmk doctor`
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
@@ -20,12 +21,18 @@ You may want to add this to your `.profile`, `.bash_profile`, `.zsh_profile`, or
|
|||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
## `qmk compile-json`
|
## `qmk compile`
|
||||||
|
|
||||||
This command allows you to compile JSON files you have downloaded from <https://config.qmk.fm>.
|
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.
|
||||||
|
|
||||||
**Usage**:
|
**Usage for Configurator Exports**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk compile-json mine.json
|
qmk compile <configuratorExport.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for Keymaps**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||||
```
|
```
|
||||||
+13
-11
@@ -96,17 +96,19 @@ void oled_task_user(void) {
|
|||||||
|
|
||||||
## Basic Configuration
|
## Basic Configuration
|
||||||
|
|
||||||
| Define | Default | Description |
|
| Define | Default | Description |
|
||||||
|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|
||||||
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|
||||||
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|
||||||
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|
||||||
| `OLED_FONT_WIDTH` | `6` | The font width |
|
| `OLED_FONT_WIDTH` | `6` | The font width |
|
||||||
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
|
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
|
||||||
| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
|
| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||||
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||||
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. |
|
||||||
|
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||||
|
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|
||||||
|
|
||||||
## 128x64 & Custom sized OLED Displays
|
## 128x64 & Custom sized OLED Displays
|
||||||
|
|
||||||
|
|||||||
@@ -114,8 +114,11 @@ bool oled_active = false;
|
|||||||
bool oled_scrolling = false;
|
bool oled_scrolling = false;
|
||||||
uint8_t oled_rotation = 0;
|
uint8_t oled_rotation = 0;
|
||||||
uint8_t oled_rotation_width = 0;
|
uint8_t oled_rotation_width = 0;
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
uint16_t oled_last_activity;
|
uint32_t oled_timeout;
|
||||||
|
#endif
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
uint32_t oled_scroll_timeout;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Internal variables to reduce math instructions
|
// Internal variables to reduce math instructions
|
||||||
@@ -209,6 +212,13 @@ bool oled_init(uint8_t rotation) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OLED_TIMEOUT > 0
|
||||||
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
|
#endif
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
|
||||||
|
#endif
|
||||||
|
|
||||||
oled_clear();
|
oled_clear();
|
||||||
oled_initialized = true;
|
oled_initialized = true;
|
||||||
oled_active = true;
|
oled_active = true;
|
||||||
@@ -457,8 +467,8 @@ void oled_write_ln_P(const char *data, bool invert) {
|
|||||||
#endif // defined(__AVR__)
|
#endif // defined(__AVR__)
|
||||||
|
|
||||||
bool oled_on(void) {
|
bool oled_on(void) {
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
oled_last_activity = timer_read();
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON };
|
static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON };
|
||||||
@@ -522,6 +532,7 @@ bool oled_scroll_off(void) {
|
|||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
}
|
}
|
||||||
oled_scrolling = false;
|
oled_scrolling = false;
|
||||||
|
oled_dirty = -1;
|
||||||
}
|
}
|
||||||
return !oled_scrolling;
|
return !oled_scrolling;
|
||||||
}
|
}
|
||||||
@@ -549,15 +560,32 @@ void oled_task(void) {
|
|||||||
|
|
||||||
oled_task_user();
|
oled_task_user();
|
||||||
|
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
if (oled_dirty && oled_scrolling) {
|
||||||
|
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
|
||||||
|
oled_scroll_off();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Smart render system, no need to check for dirty
|
// Smart render system, no need to check for dirty
|
||||||
oled_render();
|
oled_render();
|
||||||
|
|
||||||
// Display timeout check
|
// Display timeout check
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) {
|
if (oled_active && timer_expired32(timer_read32(), oled_timeout)) {
|
||||||
oled_off();
|
oled_off();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) {
|
||||||
|
#ifdef OLED_SCROLL_TIMEOUT_RIGHT
|
||||||
|
oled_scroll_right();
|
||||||
|
#else
|
||||||
|
oled_scroll_left();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
|
|||||||
@@ -138,6 +138,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define OLED_FONT_HEIGHT 8
|
#define OLED_FONT_HEIGHT 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(OLED_TIMEOUT)
|
||||||
|
#if defined(OLED_DISABLE_TIMEOUT)
|
||||||
|
#define OLED_TIMEOUT 0
|
||||||
|
#else
|
||||||
|
#define OLED_TIMEOUT 60000
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// OLED Rotation enum values are flags
|
// OLED Rotation enum values are flags
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OLED_ROTATION_0 = 0,
|
OLED_ROTATION_0 = 0,
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,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/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pegasushoof.h"
|
#include "2013.h"
|
||||||
|
|
||||||
|
|
||||||
extern inline void ph_caps_led_on(void);
|
extern inline void ph_caps_led_on(void);
|
||||||
+16
-19
@@ -15,8 +15,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/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PEGASUSHOOF_H
|
#pragma once
|
||||||
#define PEGASUSHOOF_H
|
|
||||||
|
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
@@ -56,21 +55,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
)
|
)
|
||||||
|
|
||||||
#define LAYOUT_tkl_jis( \
|
#define LAYOUT_tkl_jis( \
|
||||||
KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
|
KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
|
||||||
KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO7, KO2, KR4, KC4, KE4, \
|
KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO7, KO2, KR4, KC4, KE4, \
|
||||||
KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \
|
KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \
|
||||||
KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \
|
KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \
|
||||||
KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KL0, KB3, KC6, \
|
KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KL0, KB3, KC6, \
|
||||||
KP4, KD2, KN6, KG0, KQ6, KH0, KI0, KN0, KM0, KP1, KC0, KQ0, KR0 \
|
KP4, KD2, KN6, KG0, KQ6, KH0, KI0, KN0, KM0, KP1, KC0, KQ0, KR0 \
|
||||||
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
||||||
/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KG0, KH0, KI0, KJ0, KK0, KL0, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \
|
/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KG0, KH0, KI0, KJ0, KK0, KL0, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \
|
||||||
/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \
|
/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \
|
||||||
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KC_NO, KO2, KC_NO, KC_NO, KC_NO }, \
|
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KC_NO, KO2, KC_NO, KC_NO, KC_NO }, \
|
||||||
/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KC_NO, KO3, KC_NO, KC_NO, KC_NO }, \
|
/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KC_NO, KO3, KC_NO, KC_NO, KC_NO }, \
|
||||||
/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \
|
/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \
|
||||||
/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \
|
/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \
|
||||||
/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO, KN6, KO6, KC_NO, KQ6, KC_NO }, \
|
/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO, KN6, KO6, KC_NO, KQ6, KC_NO }, \
|
||||||
/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KK7, KL7, KO7, KP7, KC_NO, KC_NO } \
|
/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KK7, KL7, KO7, KP7, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
|
inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
|
||||||
@@ -79,5 +78,3 @@ inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); }
|
|||||||
inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); }
|
inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); }
|
||||||
inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); }
|
inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); }
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Daniel Svensson <[email protected]>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Filco
|
||||||
|
#define PRODUCT Majestouch TKL \\w The Pegasus Hoof 2013
|
||||||
|
#define DESCRIPTION QMK firmware for Majestouch TKL
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
File renamed without changes.
@@ -0,0 +1,2 @@
|
|||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC = matrix.c
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Daniel Svensson <[email protected]>
|
||||||
|
|
||||||
|
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 "2015.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern inline void ph_caps_led_on(void);
|
||||||
|
extern inline void ph_caps_led_off(void);
|
||||||
|
|
||||||
|
extern inline void ph_sclk_led_on(void);
|
||||||
|
extern inline void ph_sclk_led_off(void);
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_action_user(keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_action_kb(keyrecord_t *record) {
|
||||||
|
return process_action_user(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Daniel Svensson <[email protected]>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define ___ XXXXXXX
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
|
||||||
|
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||||
|
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
||||||
|
/* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \
|
||||||
|
/* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \
|
||||||
|
/* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \
|
||||||
|
/* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \
|
||||||
|
/* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \
|
||||||
|
/* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \
|
||||||
|
/* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \
|
||||||
|
/* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_tkl_ansi( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
|
||||||
|
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||||
|
) LAYOUT( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \
|
||||||
|
KN2,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define LAYOUT_tkl_jis( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB5, KB2, KL4, KO4, KQ4, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KK4, KO7, KQ7, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \
|
||||||
|
KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KE0, KN3, KO6, \
|
||||||
|
KA4, KP2, KC6, KJ0, KK6, KI0, KH0, KC0, KD0, KA1, KO0, KK0, KL0 \
|
||||||
|
) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
|
||||||
|
/* 0 */ { ___ , KB0 , KC0 , KD0 , KE0 , KF0 , KG0 , KH0 , KI0 , KJ0 , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \
|
||||||
|
/* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , }, \
|
||||||
|
/* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \
|
||||||
|
/* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , ___ , KN3 , ___ , ___ , ___ , KR3 }, \
|
||||||
|
/* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \
|
||||||
|
/* 5 */ { KA5 , KB5 , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \
|
||||||
|
/* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , ___ , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \
|
||||||
|
/* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
|
||||||
|
inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); }
|
||||||
|
|
||||||
|
inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); }
|
||||||
|
inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); }
|
||||||
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Daniel Svensson <[email protected]>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Filco
|
||||||
|
#define PRODUCT Majestouch TKL \\w The Pegasus Hoof 2015
|
||||||
|
#define DESCRIPTION QMK firmware for Majestouch TKL
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 Ralf Schmitt <[email protected]>
|
||||||
|
Copyright 2016 Daniel Svensson <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "wait.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "debounce.h"
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void);
|
||||||
|
static void select_row(uint8_t col);
|
||||||
|
|
||||||
|
inline uint8_t matrix_rows(void)
|
||||||
|
{
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint8_t matrix_cols(void)
|
||||||
|
{
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
/* Column output pins */
|
||||||
|
DDRD |= 0b01111011;
|
||||||
|
/* Row input pins */
|
||||||
|
DDRC &= ~0b10000000;
|
||||||
|
DDRB &= ~0b01111111;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
PORTB |= 0b01111111;
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < matrix_rows(); i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
bool changed = false;
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_row(col);
|
||||||
|
wait_us(30);
|
||||||
|
matrix_row_t rows = read_cols();
|
||||||
|
for (uint8_t row = 0; row < matrix_rows(); row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = rows & (1<<row);
|
||||||
|
if ((changed |= prev_bit != curr_bit)) {
|
||||||
|
matrix_debouncing[row] ^= (matrix_row_t) 1 << col;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
debounce(matrix_debouncing, matrix, matrix_rows(), changed);
|
||||||
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
return (uint8_t)changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
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_get_row(i));
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(void)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(PINB&(1<<5) ? 0 : ((matrix_row_t)1<<0)) |
|
||||||
|
(PINC&(1<<7) ? 0 : ((matrix_row_t)1<<1)) |
|
||||||
|
(PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) |
|
||||||
|
(PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) |
|
||||||
|
(PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) |
|
||||||
|
(PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) |
|
||||||
|
(PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) |
|
||||||
|
(PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t col)
|
||||||
|
{
|
||||||
|
switch (col) {
|
||||||
|
case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break;
|
||||||
|
case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break;
|
||||||
|
case 2: PORTD = (PORTD & ~0b01111011) | 0b01100000; break;
|
||||||
|
case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break;
|
||||||
|
case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break;
|
||||||
|
case 5: PORTD = (PORTD & ~0b01111011) | 0b01101010; break;
|
||||||
|
case 6: PORTD = (PORTD & ~0b01111011) | 0b01110001; break;
|
||||||
|
case 7: PORTD = (PORTD & ~0b01111011) | 0b01101001; break;
|
||||||
|
case 8: PORTD = (PORTD & ~0b01111011) | 0b01100001; break;
|
||||||
|
case 9: PORTD = (PORTD & ~0b01111011) | 0b01111000; break;
|
||||||
|
case 10: PORTD = (PORTD & ~0b01111011) | 0b00100011; break;
|
||||||
|
case 11: PORTD = (PORTD & ~0b01111011) | 0b00101011; break;
|
||||||
|
case 12: PORTD = (PORTD & ~0b01111011) | 0b00110011; break;
|
||||||
|
case 13: PORTD = (PORTD & ~0b01111011) | 0b01110000; break;
|
||||||
|
case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break;
|
||||||
|
case 15: PORTD = (PORTD & ~0b01111011) | 0b01101000; break;
|
||||||
|
case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break;
|
||||||
|
case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC = matrix.c
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2016 Daniel Svensson <dsvensson@gmail.com>
|
Copyright 2017 Danny Nguyen <danny@hexwire.com>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,27 +15,6 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
#define VENDOR_ID 0xFEED
|
|
||||||
#define PRODUCT_ID 0x6050
|
|
||||||
#define DEVICE_VER 0x0104
|
|
||||||
#define MANUFACTURER Filco
|
|
||||||
#define PRODUCT Majestouch TKL \\w The Pegasus Hoof
|
|
||||||
#define DESCRIPTION QMK firmware for Majestouch TKL
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 8
|
|
||||||
#define MATRIX_COLS 18
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
A replacement controller that turns your Filco Majestouch 87/88 mechanical keyboard into a fully programmable keyboard.
|
A replacement controller that turns your Filco Majestouch 87/88 mechanical keyboard into a fully programmable keyboard.
|
||||||
|
|
||||||
Keyboard Maintainer: QMK Community
|
Keyboard Maintainer: QMK Community
|
||||||
Hardware Supported: Pegasus Hoof
|
Hardware Supported: Pegasus Hoof, revisions [20131001](2013/) and [20150108](2015/)
|
||||||
Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/controllers/filco-pegasus-hoof-controller/)
|
Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/controllers/filco-pegasus-hoof-controller/)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
@@ -11,3 +11,11 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
make bpiphany/pegasus_hoof:default
|
make bpiphany/pegasus_hoof:default
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
### Additional Resources
|
||||||
|
|
||||||
|
With many thanks to Bathroom Epiphanies for all the kind advice and help.
|
||||||
|
|
||||||
|
* [Schematic](https://deskthority.net/wiki/Costar_replacement_controllers#Schematic)
|
||||||
|
* [bpiphany TMK source](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard)
|
||||||
|
* [bpiphany QMK source](https://github.com/BathroomEpiphanies/epiphanies_qmk_keyboard)
|
||||||
@@ -36,15 +36,7 @@ F_USB = $(F_CPU)
|
|||||||
# Interrupt driven control endpoint task(+60)
|
# Interrupt driven control endpoint task(+60)
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
BOOTLOADER=atmel-dfu
|
||||||
# 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
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
@@ -64,5 +56,4 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
|||||||
|
|
||||||
LAYOUTS = tkl_ansi
|
LAYOUTS = tkl_ansi
|
||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
DEFAULT_FOLDER=bpiphany/pegasushoof/2013
|
||||||
SRC = matrix.c
|
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
{ \
|
{ \
|
||||||
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
|
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
|
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
|
||||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \
|
||||||
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \
|
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
{ \
|
{ \
|
||||||
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
|
{ k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
|
{ k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
|
||||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \
|
||||||
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \
|
{ KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \
|
||||||
|
|||||||
Executable
+55
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xA71C
|
||||||
|
#define DEVICE_VER 0x0003
|
||||||
|
#define MANUFACTURER Maartenwut
|
||||||
|
#define PRODUCT Wonderland
|
||||||
|
#define DESCRIPTION "QMK Firmware for the Wonderland"
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS {B0,D1,D2,D3,D5}
|
||||||
|
#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,C7,C6,B6,B5,B4,D7,D6,D4}
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Backlight configuration
|
||||||
|
*/
|
||||||
|
#define RGB_DI_PIN B7
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
|
||||||
|
#define QMK_ESC_OUTPUT F0 // usually COL
|
||||||
|
#define QMK_ESC_INPUT B0 // usually ROW
|
||||||
|
#define QMK_LED B1
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Maartenwut Wonderland",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "Maartenwut",
|
||||||
|
"width": 18.25,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 66,
|
||||||
|
"layout": [
|
||||||
|
{"label":"k10", "x":0, "y":0},
|
||||||
|
{"label":"k00", "x":1.25, "y":0},
|
||||||
|
{"label":"k01", "x":2.25, "y":0},
|
||||||
|
{"label":"k02", "x":3.25, "y":0},
|
||||||
|
{"label":"k03", "x":4.25, "y":0},
|
||||||
|
{"label":"k04", "x":5.25, "y":0},
|
||||||
|
{"label":"k05", "x":6.25, "y":0},
|
||||||
|
{"label":"k06", "x":7.25, "y":0},
|
||||||
|
{"label":"k07", "x":10.25, "y":0},
|
||||||
|
{"label":"k08", "x":11.25, "y":0},
|
||||||
|
{"label":"k09", "x":12.25, "y":0},
|
||||||
|
{"label":"k0a", "x":13.25, "y":0},
|
||||||
|
{"label":"k0b", "x":14.25, "y":0},
|
||||||
|
{"label":"k0c", "x":15.25, "y":0},
|
||||||
|
{"label":"k0d", "x":16.25, "y":0},
|
||||||
|
{"label":"k0e", "x":17.25, "y":0},
|
||||||
|
{"label":"k20", "x":0, "y":1},
|
||||||
|
{"label":"k11", "x":1.25, "y":1, "w":1.5},
|
||||||
|
{"label":"k12", "x":2.75, "y":1},
|
||||||
|
{"label":"k13", "x":3.75, "y":1},
|
||||||
|
{"label":"k14", "x":4.75, "y":1},
|
||||||
|
{"label":"k15", "x":5.75, "y":1},
|
||||||
|
{"label":"k16", "x":6.75, "y":1},
|
||||||
|
{"label":"k17", "x":9.75, "y":1},
|
||||||
|
{"label":"k18", "x":10.75, "y":1},
|
||||||
|
{"label":"k19", "x":11.75, "y":1},
|
||||||
|
{"label":"k1a", "x":12.75, "y":1},
|
||||||
|
{"label":"k1b", "x":13.75, "y":1},
|
||||||
|
{"label":"k1c", "x":14.75, "y":1},
|
||||||
|
{"label":"k1d", "x":15.75, "y":1},
|
||||||
|
{"label":"k1e", "x":16.75, "y":1, "w":1.5},
|
||||||
|
{"label":"k30", "x":0, "y":2},
|
||||||
|
{"label":"k21", "x":1.25, "y":2, "w":1.75},
|
||||||
|
{"label":"k22", "x":3, "y":2},
|
||||||
|
{"label":"k23", "x":4, "y":2},
|
||||||
|
{"label":"k24", "x":5, "y":2},
|
||||||
|
{"label":"k25", "x":6, "y":2},
|
||||||
|
{"label":"k26", "x":7, "y":2},
|
||||||
|
{"label":"k27", "x":10, "y":2},
|
||||||
|
{"label":"k28", "x":11, "y":2},
|
||||||
|
{"label":"k29", "x":12, "y":2},
|
||||||
|
{"label":"k2a", "x":13, "y":2},
|
||||||
|
{"label":"k2b", "x":14, "y":2},
|
||||||
|
{"label":"k2c", "x":15, "y":2},
|
||||||
|
{"label":"k2e", "x":16, "y":2, "w":2.25},
|
||||||
|
{"label":"k31", "x":1.25, "y":3, "w":2.25},
|
||||||
|
{"label":"k32", "x":3.5, "y":3},
|
||||||
|
{"label":"k33", "x":4.5, "y":3},
|
||||||
|
{"label":"k34", "x":5.5, "y":3},
|
||||||
|
{"label":"k35", "x":6.5, "y":3},
|
||||||
|
{"label":"k36", "x":7.5, "y":3},
|
||||||
|
{"label":"k37", "x":9.5, "y":3},
|
||||||
|
{"label":"k38", "x":10.5, "y":3},
|
||||||
|
{"label":"k39", "x":11.5, "y":3},
|
||||||
|
{"label":"k3a", "x":12.5, "y":3},
|
||||||
|
{"label":"k3b", "x":13.5, "y":3},
|
||||||
|
{"label":"k3c", "x":14.5, "y":3},
|
||||||
|
{"label":"k3d", "x":15.5, "y":3, "w":1.75},
|
||||||
|
{"label":"k3e", "x":17.25, "y":3},
|
||||||
|
{"label":"k41", "x":1.25, "y":4, "w":1.5},
|
||||||
|
{"label":"k43", "x":4.25, "y":4, "w":1.5},
|
||||||
|
{"label":"k45", "x":5.75, "y":4, "w":2},
|
||||||
|
{"label":"k46", "x":7.75, "y":4, "w":1.25},
|
||||||
|
{"label":"k48", "x":9.5, "y":4, "w":2.75},
|
||||||
|
{"label":"k4a", "x":12.25, "y":4, "w":1.5},
|
||||||
|
{"label":"k4e", "x":16.75, "y":4, "w":1.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_BASE,
|
||||||
|
_FUNC
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, 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_DEL, KC_BSPC, \
|
||||||
|
KC_F10, 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, \
|
||||||
|
RGB_TOG, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \
|
||||||
|
KC_LCTL, KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, KC_RCTRL \
|
||||||
|
),
|
||||||
|
[_FUNC] = LAYOUT(
|
||||||
|
RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \
|
||||||
|
RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \
|
||||||
|
KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, \
|
||||||
|
_______, KC_LALT, _______, _______, _______, KC_RALT, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_BASE,
|
||||||
|
_FUNC
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, \
|
||||||
|
KC_F10, 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, \
|
||||||
|
RGB_HUI, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \
|
||||||
|
KC_LCTL, KC_LAPO, KC_LGUI, RGUI(KC_SPC), KC_SPC, KC_RAPC, KC_RCTRL \
|
||||||
|
),
|
||||||
|
[_FUNC] = LAYOUT(
|
||||||
|
RGB_TOG, VLK_TOG, KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, \
|
||||||
|
RGB_MODE_FORWARD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
RGB_MODE_REVERSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, \
|
||||||
|
KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX, \
|
||||||
|
KC_LCTL, KC_LALT, KC_BSPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTRL \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Wonderland USB-c and USB-mini
|
||||||
|
======
|
||||||
|
|
||||||
|
Only the USB-mini part is compatible with the original Alice case. The USB-c version was created for the Lubrigante, a case designed by Zambumon and a GB run by homerowco.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut)<br>
|
||||||
|
Hardware Supported: Wonderland-C and Wonderland-Mini<br>
|
||||||
|
Hardware Availability: https://maartenwut.com/product/wonderland-mini-usb-only/<br>
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make maartenwut/wonderland:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
BOOTLOADER = qmk-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150)
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUTO_SHIFT_ENABLE = no
|
||||||
|
VELOCIKEY_ENABLE = yes
|
||||||
Executable
+42
@@ -0,0 +1,42 @@
|
|||||||
|
#include "wonderland.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
matrix_init_user();
|
||||||
|
led_init_ports();
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
matrix_scan_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
// * Set our LED pins as output
|
||||||
|
setPinOutput(B1);
|
||||||
|
setPinOutput(B2);
|
||||||
|
setPinOutput(B3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||||
|
writePinLow(B1);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
writePinLow(B2);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||||
|
writePinLow(B3);
|
||||||
|
} else {
|
||||||
|
writePinHigh(B3);
|
||||||
|
}
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define XXX KC_NO
|
||||||
|
#define LAYOUT( \
|
||||||
|
k10, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
|
||||||
|
k20, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||||
|
k30, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
|
||||||
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
||||||
|
k41, k43, k45, k46, k48, k4a, k4e \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, k2e}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
|
||||||
|
{XXX, k41, XXX, k43, XXX, k45, k46, XXX, k48, XXX, k4a, XXX, XXX, XXX, k4e} \
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void);
|
||||||
|
void matrix_scan_user(void);
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// 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.
|
// 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
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
@@ -19,11 +17,10 @@ enum custom_keycodes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Shortcut to make keymap more readable
|
// Shortcut to make keymap more readable
|
||||||
#define KC_BKSL KC_BSLASH
|
|
||||||
#define SYM_L MO(_SYMB)
|
#define SYM_L MO(_SYMB)
|
||||||
|
|
||||||
#define KC_ALAS LALT_T(KC_PAST)
|
#define KC_ALAS LALT_T(KC_PAST)
|
||||||
#define KC_CTPL LCTL_T(KC_PSLS)
|
#define KC_CTPL LCTL_T(KC_BSLS)
|
||||||
|
|
||||||
#define KC_NAGR LT(_NAV, KC_GRV)
|
#define KC_NAGR LT(_NAV, KC_GRV)
|
||||||
#define KC_NAMI LT(_NAV, KC_MINS)
|
#define KC_NAMI LT(_NAV, KC_MINS)
|
||||||
@@ -41,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
|
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT ,
|
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
|
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
@@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
|
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
|
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -88,5 +85,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// 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.
|
// 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
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
@@ -19,11 +17,10 @@ enum custom_keycodes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Shortcut to make keymap more readable
|
// Shortcut to make keymap more readable
|
||||||
#define KC_BKSL KC_BSLASH
|
|
||||||
#define SYM_L MO(_SYMB)
|
#define SYM_L MO(_SYMB)
|
||||||
|
|
||||||
#define KC_ALAS LALT_T(KC_PAST)
|
#define KC_ALAS LALT_T(KC_PAST)
|
||||||
#define KC_CTPL LCTL_T(KC_PSLS)
|
#define KC_CTPL LCTL_T(KC_BSLS)
|
||||||
|
|
||||||
#define KC_NAGR LT(_NAV, KC_GRV)
|
#define KC_NAGR LT(_NAV, KC_GRV)
|
||||||
#define KC_NAMI LT(_NAV, KC_MINS)
|
#define KC_NAMI LT(_NAV, KC_MINS)
|
||||||
@@ -41,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
|
KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_BKSL ,KC_RSFT ,
|
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
|
KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -51,13 +48,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
|
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
|
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
|
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -71,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -85,16 +82,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
uint8_t layer = biton32(layer_state);
|
switch (get_highest_layer(state)) {
|
||||||
|
|
||||||
switch (layer) {
|
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
set_led_off;
|
set_led_off;
|
||||||
break;
|
break;
|
||||||
@@ -110,6 +105,7 @@ void matrix_scan_user(void) {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -66,91 +66,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
/*
|
/* RGB Setup */
|
||||||
* Force NKRO
|
#define RGB_DI_PIN D0
|
||||||
*
|
#define RGBLED_NUM 3
|
||||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
#define RGBLIGHT_SLEEP
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 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
|
#endif
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PERMISSIVE_HOLD
|
#define PERMISSIVE_HOLD
|
||||||
#endif
|
#define RGBLIGHT_EFFECT_BREATHING
|
||||||
@@ -11,13 +11,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
[1] = LAYOUT_arrow_command( /* LAYER 2 */
|
[1] = LAYOUT_arrow_command( /* LAYER 2 */
|
||||||
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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
KC_TRNS, KC_MINS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS,
|
KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||||
),
|
),
|
||||||
[2] = LAYOUT_arrow_command( /* LAYER 1 */
|
[2] = LAYOUT_arrow_command( /* LAYER 1 */
|
||||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||||
KC_TRNS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS,
|
KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||||
),
|
),
|
||||||
@@ -30,7 +30,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[4] = LAYOUT_arrow_command( /* Gaming Layer*/
|
[4] = LAYOUT_arrow_command( /* Gaming Layer*/
|
||||||
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
|
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
|
||||||
KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(5, KC_SLSH),
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
[5] = LAYOUT_arrow_command( /* RESET Layer*/
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
// Set up RGB effects on _only_ the third LED (index 2)
|
||||||
|
rgblight_set_effect_range(2, 1);
|
||||||
|
// Set LED effects to breathing mode in a tealish blue color
|
||||||
|
rgblight_sethsv_noeeprom(185, 255, 255);
|
||||||
|
rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2);
|
||||||
|
|
||||||
|
// Init the first two LEDs to a static color
|
||||||
|
setrgb(0, 0, 0, (LED_TYPE *)&led[0]);
|
||||||
|
setrgb(0, 0, 0, (LED_TYPE *)&led[1]);
|
||||||
|
rgblight_set();
|
||||||
|
#endif //RGBLIGHT_ENABLE
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state){
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
uint8_t led0r = 0; uint8_t led0g = 0; uint8_t led0b = 0;
|
||||||
|
uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0;
|
||||||
|
|
||||||
|
if (layer_state_cmp(state, 1)) {
|
||||||
|
led0r = 255;
|
||||||
|
}
|
||||||
|
if (layer_state_cmp(state, 2)) {
|
||||||
|
led0g = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (layer_state_cmp(state, 4)) {
|
||||||
|
led1b = 255;
|
||||||
|
}
|
||||||
|
if (layer_state_cmp(state, 5)) {
|
||||||
|
led1r = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]);
|
||||||
|
setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]);
|
||||||
|
rgblight_set();
|
||||||
|
#endif //RGBLIGHT_ENABLE
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -13,5 +13,5 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -1,28 +1 @@
|
|||||||
#include "minivan.h"
|
#include "minivan.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);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer {
|
||||||
|
LAYER_DEFAULT,
|
||||||
|
LAYER_FUNCTION,
|
||||||
|
LAYER_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Switch to function layer when held. */
|
||||||
|
#define LY_FUNC MO(LAYER_FUNCTION)
|
||||||
|
|
||||||
|
/* Switch to adjust layer when held; send menu key when tapped. */
|
||||||
|
#define LY_ADJST LT(LAYER_ADJUST, KC_APP)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default layer: http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77 */
|
||||||
|
[LAYER_DEFAULT] = LAYOUT_60_tsangan_hhkb(
|
||||||
|
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_BSLS, KC_GRV,
|
||||||
|
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_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */
|
||||||
|
[LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb(
|
||||||
|
_______, 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_INS, KC_DEL,
|
||||||
|
_______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______,
|
||||||
|
KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
|
||||||
|
_______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */
|
||||||
|
[LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG,
|
||||||
|
_______, _______, _______, _______, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# bcat's 60% Tsangan HHKB layout
|
||||||
|
|
||||||
|
This is a normal Tsangan/HHKB (split backspace, split right shift) layout with
|
||||||
|
arrow and navigation keys that match a standard HHKB layout, as well as media
|
||||||
|
keys centered around the WASD cluster. Additionally, the redundant right Super
|
||||||
|
key on the bottom row actives an adjust layer to control RGB underglow.
|
||||||
|
|
||||||
|
## Default layer
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Function layer
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Adjust layer
|
||||||
|
|
||||||
|

|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
"""Compile a QMK Firmware.
|
||||||
|
|
||||||
|
You can compile a keymap already in the repo or using a QMK Configurator export.
|
||||||
|
"""
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
from argparse import FileType
|
||||||
|
|
||||||
|
from milc import cli
|
||||||
|
|
||||||
|
import qmk.keymap
|
||||||
|
import qmk.path
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('filename', nargs='?', type=FileType('r'), help='The configurator export to compile')
|
||||||
|
@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.')
|
||||||
|
@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.')
|
||||||
|
@cli.entrypoint('Compile a QMK Firmware.')
|
||||||
|
def main(cli):
|
||||||
|
"""Compile a QMK Firmware.
|
||||||
|
|
||||||
|
If a Configurator export is supplied this command will create a new keymap, overwriting an existing keymap if one exists.
|
||||||
|
|
||||||
|
FIXME(skullydazed): add code to check and warn if the keymap already exists
|
||||||
|
|
||||||
|
If --keyboard and --keymap are provided this command will build a firmware based on that.
|
||||||
|
|
||||||
|
"""
|
||||||
|
if cli.args.filename:
|
||||||
|
# Parse the configurator json
|
||||||
|
user_keymap = json.load(cli.args.filename)
|
||||||
|
|
||||||
|
# Generate the keymap
|
||||||
|
keymap_path = qmk.path.keymap(user_keymap['keyboard'])
|
||||||
|
cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path)
|
||||||
|
qmk.keymap.write(user_keymap['keyboard'], user_keymap['keymap'], user_keymap['layout'], user_keymap['layers'])
|
||||||
|
cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap'])
|
||||||
|
|
||||||
|
# Compile the keymap
|
||||||
|
command = ['make', ':'.join((user_keymap['keyboard'], user_keymap['keymap']))]
|
||||||
|
|
||||||
|
elif cli.config.general.keyboard and cli.config.general.keymap:
|
||||||
|
# Generate the make command for a specific keyboard/keymap.
|
||||||
|
command = ['make', ':'.join((cli.config.general.keyboard, cli.config.general.keymap))]
|
||||||
|
|
||||||
|
else:
|
||||||
|
cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.')
|
||||||
|
return False
|
||||||
|
|
||||||
|
cli.log.info('Compiling keymap with {fg_cyan}%s\n\n', ' '.join(command))
|
||||||
|
subprocess.run(command)
|
||||||
Whitespace-only changes.
@@ -1,44 +0,0 @@
|
|||||||
"""Create a keymap directory from a configurator export.
|
|
||||||
"""
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from milc import cli
|
|
||||||
|
|
||||||
import qmk.keymap
|
|
||||||
import qmk.path
|
|
||||||
|
|
||||||
|
|
||||||
@cli.argument('filename', help='Configurator JSON export')
|
|
||||||
@cli.entrypoint('Compile a QMK Configurator export.')
|
|
||||||
def main(cli):
|
|
||||||
"""Compile a QMK Configurator export.
|
|
||||||
|
|
||||||
This command creates a new keymap from a configurator export, overwriting an existing keymap if one exists.
|
|
||||||
|
|
||||||
FIXME(skullydazed): add code to check and warn if the keymap already exists
|
|
||||||
"""
|
|
||||||
# Error checking
|
|
||||||
if cli.args.filename == ('-'):
|
|
||||||
cli.log.error('Reading from STDIN is not (yet) supported.')
|
|
||||||
exit(1)
|
|
||||||
if not os.path.exists(qmk.path.normpath(cli.args.filename)):
|
|
||||||
cli.log.error('JSON file does not exist!')
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
# Parse the configurator json
|
|
||||||
with open(qmk.path.normpath(cli.args.filename), 'r') as fd:
|
|
||||||
user_keymap = json.load(fd)
|
|
||||||
|
|
||||||
# Generate the keymap
|
|
||||||
keymap_path = qmk.path.keymap(user_keymap['keyboard'])
|
|
||||||
cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path)
|
|
||||||
qmk.keymap.write(user_keymap['keyboard'], user_keymap['keymap'], user_keymap['layout'], user_keymap['layers'])
|
|
||||||
cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap'])
|
|
||||||
|
|
||||||
# Compile the keymap
|
|
||||||
command = ['make', ':'.join((user_keymap['keyboard'], user_keymap['keymap']))]
|
|
||||||
cli.log.info('Compiling keymap with {fg_cyan}%s\n\n', ' '.join(command))
|
|
||||||
subprocess.run(command)
|
|
||||||
+1
-1
@@ -347,5 +347,5 @@ else ifeq ($(strip $(BOOTLOADER)), USBasp)
|
|||||||
else ifeq ($(strip $(BOOTLOADER)), bootloadHID)
|
else ifeq ($(strip $(BOOTLOADER)), bootloadHID)
|
||||||
$(call EXEC_BOOTLOADHID)
|
$(call EXEC_BOOTLOADHID)
|
||||||
else
|
else
|
||||||
$(PRINT_OK); $(SILENT) || printf "&(MSG_FLASH_BOOTLOADER)"
|
$(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)"
|
||||||
endif
|
endif
|
||||||
@@ -22,7 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|
||||||
#define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEED
|
#ifndef EECONFIG_MAGIC_NUMBER
|
||||||
|
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEC
|
||||||
|
#endif
|
||||||
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
||||||
|
|
||||||
/* EEPROM parameter address */
|
/* EEPROM parameter address */
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define TIMER_H 1
|
#define TIMER_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#if defined(__AVR__)
|
#if defined(__AVR__)
|
||||||
#include "avr/timer_avr.h"
|
#include "avr/timer_avr.h"
|
||||||
@@ -46,6 +47,16 @@ uint32_t timer_read32(void);
|
|||||||
uint16_t timer_elapsed(uint16_t last);
|
uint16_t timer_elapsed(uint16_t last);
|
||||||
uint32_t timer_elapsed32(uint32_t last);
|
uint32_t timer_elapsed32(uint32_t last);
|
||||||
|
|
||||||
|
// Utility functions to check if a future time has expired & autmatically handle time wrapping if checked / reset frequently (half of max value)
|
||||||
|
inline bool timer_expired(uint16_t current, uint16_t last)
|
||||||
|
{
|
||||||
|
return current - last < 0x8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool timer_expired32(uint32_t current, uint32_t future) {
|
||||||
|
return current - future < 0x80000000;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,14 +4,13 @@
|
|||||||
#define __DELAY_BACKWARD_COMPATIBLE__
|
#define __DELAY_BACKWARD_COMPATIBLE__
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
#include "common/timer.h"
|
#include "common/timer.h"
|
||||||
#include "Arduino.h"
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long millis()
|
unsigned long millis(void)
|
||||||
{
|
{
|
||||||
return timer_read32();
|
return timer_read32();
|
||||||
}
|
}
|
||||||
unsigned long micros()
|
unsigned long micros(void)
|
||||||
{
|
{
|
||||||
return timer_read32() * 1000UL;
|
return timer_read32() * 1000UL;
|
||||||
}
|
}
|
||||||
@@ -23,7 +22,7 @@ void delayMicroseconds(unsigned int us)
|
|||||||
{
|
{
|
||||||
_delay_us(us);
|
_delay_us(us);
|
||||||
}
|
}
|
||||||
void init()
|
void init(void)
|
||||||
{
|
{
|
||||||
timer_init();
|
timer_init();
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "custom_tap_dance.h"
|
#include "custom_tap_dance.h"
|
||||||
#include "custom_keycodes.h"
|
#include "custom_keycodes.h"
|
||||||
#include "timer_utils.h"
|
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
|
#define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||||
#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G
|
#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G
|
||||||
#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B
|
#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC
|
#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC
|
||||||
|
|
||||||
#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC
|
#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC
|
||||||
#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
|
#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "process_records.h"
|
#include "process_records.h"
|
||||||
#include "custom_keycodes.h"
|
#include "custom_keycodes.h"
|
||||||
#include "timer_utils.h"
|
|
||||||
|
|
||||||
#ifdef RGB_ENABLE
|
#ifdef RGB_ENABLE
|
||||||
#include "custom_rgb.h"
|
#include "custom_rgb.h"
|
||||||
@@ -34,7 +33,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
|||||||
{
|
{
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
reset_timer = timer_read() + 500;
|
reset_timer = timer_read() + 500;
|
||||||
else if (timer_expired(reset_timer))
|
else if (timer_expired(timer_read(), reset_timer))
|
||||||
reset_keyboard();
|
reset_keyboard();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
SRC += xulkal.c \
|
SRC += xulkal.c \
|
||||||
process_records.c \
|
process_records.c \
|
||||||
custom_tap_dance.c \
|
custom_tap_dance.c
|
||||||
timer_utils.c
|
|
||||||
|
|
||||||
# Some usual defaults
|
# Some usual defaults
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys (+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys (+4700)
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
#include "timer_utils.h"
|
|
||||||
|
|
||||||
bool timer_expired(uint16_t last)
|
|
||||||
{
|
|
||||||
return timer_read() - last < 0x8000;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool timer_expired32(uint32_t last)
|
|
||||||
{
|
|
||||||
return timer_read32() - last < 0x80000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include "timer.h"
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
bool timer_expired(uint16_t last);
|
|
||||||
bool timer_expired32(uint32_t last);
|
|
||||||
@@ -2,6 +2,5 @@
|
|||||||
|
|
||||||
#include "process_records.h"
|
#include "process_records.h"
|
||||||
#include "layouts.h"
|
#include "layouts.h"
|
||||||
#include "timer_utils.h"
|
|
||||||
#include "custom_keycodes.h"
|
#include "custom_keycodes.h"
|
||||||
#include "custom_tap_dance.h"
|
#include "custom_tap_dance.h"
|
||||||
Reference in new issue
Block a user