Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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()
|
||||||
|
|||||||
+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>
|
||||||
```
|
```
|
||||||
+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)
|
||||||
@@ -64,5 +64,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
|
|
||||||
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,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 \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
@@ -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)
|
|
||||||
Reference in new issue
Block a user